From leonp@plris.com Sun Apr 1 09:03:00 2001 From: leonp@plris.com (leonp@plris.com) Date: Sun, 01 Apr 2001 09:03:00 -0000 Subject: Small suggestion and question Message-ID: <5.0.2.1.0.20010401175711.00a7dd60@plris.com> Hello, I use the SN for cross development (this time under Win2K without CygWin). 1 - Suggestion: It seems to be comfortable to have the "build" window be open as a subwindow in text editor - it is always accessible and one can rebuild his target fast after any small changes. What seems to be not so comfortable is: a) The necessity to confirm each change before build starts (may be by default, if I pressed "build" button - save). b) This "build" subwindow seems to occupy too much place with the information which isn't so necessary at the moment - build command, build directory, target. If you ask me, the result window with 3 buttons at the same horizontal level will be brilliant. 2 - Question: When I run SN under Win2K it is VERY slow, which, besides making the work nervous, causes SN errors. For example, pressing Ctrl-S and Ctrl-W sequentually, causes an error below. This effect doesn't occur when running under Linux on the same machine. Does somebody know any medicine to the problem? Error: wrong # ".multiwindow-2.nbook.nbframe.edit.paned.edit.edit.edit" does not exist ----------------------------------------------------------- Comment: ----------------------------------------------------------- Version: 4.5.2 ----------------------------------------------------------- Full Name: Red Hat Embedded DevKit ----------------------------------------------------------- Product Name: :Source-Navigator ----------------------------------------------------------- sn_home: c:/program files/cygnus/sn452 pwd: C:/AGM142CP/SOURCES project_dir: C:/AGM142CP/SOURCES project_file: C:/AGM142CP/SOURCES/ofp.proj db created with SN version: 4.5.2 db project version: 41001 db_prefix: .snprj/ofp db-directory: .snprj mode: 040744 directory .snprj/ofp.f: mode: 0100644 size: 2048 .snprj/ofp.fu: mode: 0100644 size: 4608 .snprj/ofp.fil: mode: 0100644 size: 37376 .snprj/ofp.iu: mode: 0100644 size: 2560 .snprj/ofp.ma: mode: 0100644 size: 14336 .snprj/ofp.gv: mode: 0100644 size: 4096 .snprj/ofp.iv: mode: 0100644 size: 7680 .snprj/ofp.cl: mode: 0100644 size: 1024 .snprj/ofp.ctr: mode: 0100644 size: 0 .snprj/ofp.to: mode: 0100644 size: 71168 .snprj/ofp.by: mode: 0100644 size: 73216 .snprj/ofp.un: mode: 0100644 size: 1024 .snprj/ofp.fd: mode: 0100644 size: 3584 ----------------------------------------------------------- osVersion: 5.0 byteOrder: littleEndian machine: intel platform: windows os: Windows NT ----------------------------------------------------------- Stack: wrong # ".multiwindow-2.nbook.nbframe.edit.paned.edit.edit.edit" does not exist while invoking "Sn_Syntax_Highlight -delall c++ .multiwindow-2.nbook.nbframe.edit.paned.edit.ed..." invoked from within "Sn_Syntax_Highlight -delall $grp $editor 1.0 end" (object ".multiwindow-2.nbook.nbframe.edit.paned." method "Editor&@@UpdateHighlights" body line 35) invoked from within "UpdateHighlights $run_parse" (object ".multiwindow-2.nbook.nbframe.edit.paned." method "Editor&@@color_file" body line 3) invoked from within "color_file" (object ".multiwindow-2.nbook.nbframe.edit.paned." method "Editor&@@save_file" body line 56) invoked from within ".multiwindow-2.nbook.nbframe.edit.paned.edit.edit save_file" (command bound to event) Thanks a lot. Leon Pollak leonp@plris.com From leonp@plris.com Mon Apr 2 02:22:00 2001 From: leonp@plris.com (leonp@plris.com) Date: Mon, 02 Apr 2001 02:22:00 -0000 Subject: Small bug Message-ID: <5.0.2.1.0.20010402112505.00acd2f0@plris.com> Hello, I use the SN for cross development (this time under Win2K without CygWin) and discovered a small bug: When a file was deleted manually in the project directory, while the SN wasn't running, it starts, suggest the project selection and then informs that the file is not present and suggests to delete, (add and so on) it. If I choose "delete" option, the SN ends execution - nothing happens and there is no job running. But when I start SN again, it starts "2 copies of SN" - one totally new, another - the continuation of the "delete" dialog. Thanks. Leon Pollak leonp@plris.com From rfweber@link.com Mon Apr 2 05:59:00 2001 From: rfweber@link.com (Richard F Weber) Date: Mon, 02 Apr 2001 05:59:00 -0000 Subject: New Parser/highlighter howto Message-ID: <3AC8779E.8080900@link.com> Ok, granted I'm a bit new to Source navigator and hacking on the API, but here it goes. I'm working on creating an Ada Parser/Highlighter. I know another company (CAS I think) is supposed to have an Ada parser, but I've contacted them on numerous occasions by phone & e-mail and they don't seem to want to respond. So, as a result, I'm looking to hack out an Ada parser on my own. I've found the grammer9x.y & lexer9x.l files from a mirror of the falls-church Ada site to give a basic start as to how to parse out Ada. Now I'm just trying to work on actually getting something working. So my question is: 1) How does the color highlighter exactly work for SN? Does it use the parser to identify what is a comment, what is a function, etc? Or do I have to code the syntax checking in separately (ala VIM) 2) Testing parser offline. Is there a way to test the parser offline to make sure the database is getting what I think it's getting? I've got the lex code checking and handling comments right now, but the syntax highlighter doesn't highlight the right code as a comment. So I'm not sure if I'm doing this stuff right. Any pointers would be very much appreciated. I've kind of looked at the chill & python lexer's, but they seem a bit advanced for me. Of course, if there's a perl module that interfaces with the SN API calls I could probobally whip something out quicker (but I'm not sure how to make Perl interface with C ) Thanks in advance. --Rich From jrandrews@hotmail.com Mon Apr 2 09:25:00 2001 From: jrandrews@hotmail.com (Jason Andrews) Date: Mon, 02 Apr 2001 09:25:00 -0000 Subject: New Parser/highlighter howto References: <3AC8779E.8080900@link.com> Message-ID: Richard, Good questions, I had the same ones when I created my own Verilog parser. > > 1) How does the color highlighter exactly work for SN? Does it use the > parser to identify what is a comment, what is a function, etc? Or do I > have to code the syntax checking in separately (ala VIM) The colors are not at all related to the parser. You have to hook into snavigator/hyper/highlight.c and create your own flex .l file to specify what keywords to highlight. I used ch_high.l as a template. You also have to find and edit sninit.tcl to turn it on, this was the trick for me to get it working. > > 2) Testing parser offline. Is there a way to test the parser offline to > make sure the database is getting what I think it's getting? Create a file with the list of files you want to parse and feed this to your parser. My verilog parser is named snvp so I run % snvp -y files.f -p /bin/more Now I can see what goes into the database and I can also debug easier using gdb From rfweber@link.com Mon Apr 2 10:59:00 2001 From: rfweber@link.com (Richard F Weber) Date: Mon, 02 Apr 2001 10:59:00 -0000 Subject: New Parser/highlighter howto Message-ID: <3AC8BE00.4030700@link.com> Jason Andrews wrote: > Richard, > > Good questions, I had the same ones when I created my own > Verilog parser. > >> 1) How does the color highlighter exactly work for SN? Does it use the >> parser to identify what is a comment, what is a function, etc? Or do I >> have to code the syntax checking in separately (ala VIM) > > > The colors are not at all related to the parser. > You have to hook into snavigator/hyper/highlight.c and create > your own flex .l file to specify what keywords to highlight. > I used ch_high.l as a template. > > You also have to find and edit sninit.tcl to turn it on, this was the trick > for me to get it working. Hey, that was easy. Now my ada code is color coded. But I do have to ask why other languages aren't included for color-coding. I mean adding support was _really_ easy (unless I really messed it up). But this does raise another question below: > >> 2) Testing parser offline. Is there a way to test the parser offline to >> make sure the database is getting what I think it's getting? > > > Create a file with the list of files you want to parse and feed this > to your parser. My verilog parser is named snvp so I run > > % snvp -y files.f -p /bin/more > > Now I can see what goes into the database and I can also debug > easier using gdb Thanks. Now I can see the first line going into the DB, but it decides to stop parsing after that line. I'm sure I'm just doing something stupid though. After perusing through the lists, I saw that there is plans to have a new system to dynamically load the highlighters(ala .so's & .dll's). So my question now is: 1) How is the new system going to be different with regards to the highlighter. I wouldn't imagine too different, but... 2) How is the new system going to be different with regards to the parser. I'd hate to have to dump a lot of time into working on a parser/highlighter if the syntax is just going to change in a few months (that is when v5.0 is getting released. right?) Thanks for the help --Rich From mdejong@cygnus.com Mon Apr 2 12:06:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Mon, 02 Apr 2001 12:06:00 -0000 Subject: New Parser/highlighter howto References: <3AC8BE00.4030700@link.com> Message-ID: On Mon, 2 Apr 2001, Richard F Weber wrote: > Hey, that was easy. Now my ada code is color coded. But I do have to > ask why other languages aren't included for color-coding. I mean adding > support was _really_ easy (unless I really messed it up). But this does > raise another question below: Because nobody has actually sat down and done it. > After perusing through the lists, I saw that there is plans to have a > new system to dynamically load the highlighters(ala .so's & .dll's). So > my question now is: > > 1) How is the new system going to be different with regards to the > highlighter. I wouldn't imagine too different, but... It would just load the .so or .dll off the system. None of this code has been written at this point, it is just an idea bouncing around. > 2) How is the new system going to be different with regards to the parser. > > I'd hate to have to dump a lot of time into working on a > parser/highlighter if the syntax is just going to change in a few months > (that is when v5.0 is getting released. right?) Please don't avoid playing with any parser interfaces out of fear that they will change wildly in the near future. That is simply not the case. Most of the 5.0 work is in "infrastructure". Basically, we just took out all kinds of nasty stuff that had built up over the years and replaced it with nice clean new code. We tried to make no GUI changes and keep the old APIs working, so 4.5 stuff should not break. If it did, we would be really hosed since we don't really have time to rewrite all the parsers. Mo DeJong Red Hat Inc From spolk@redhat.com Mon Apr 2 13:21:00 2001 From: spolk@redhat.com (Syd Polk) Date: Mon, 02 Apr 2001 13:21:00 -0000 Subject: Source-Navigator 5.0 has been released Message-ID: <4.2.0.58.20010402132056.00d90220@pop.cygnus.com> Source-Navigator 5.0 has been released, and is now available from http://source.redhat.com/sourcenav/download.html . Syd Polk spolk@redhat.com Engineering Manager +1 408 543 9430 Red Hat, Inc. From brecht.vermeulen@rug.ac.be Mon Apr 2 13:31:00 2001 From: brecht.vermeulen@rug.ac.be (Brecht Vermeulen) Date: Mon, 02 Apr 2001 13:31:00 -0000 Subject: Source-Navigator 5.0 has been released References: <4.2.0.58.20010402132056.00d90220@pop.cygnus.com> Message-ID: <3AC8E18A.F8A74F52@rug.ac.be> Well, I guess it's http://sources.redhat.com/sourcenav/download.html :) best regards, Brecht Syd Polk wrote: > > Source-Navigator 5.0 has been released, and is now available from > http://source.redhat.com/sourcenav/download.html . > > Syd Polk spolk@redhat.com > Engineering Manager +1 408 543 9430 > Red Hat, Inc. From mdejong@cygnus.com Mon Apr 2 15:02:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Mon, 02 Apr 2001 15:02:00 -0000 Subject: Source-Navigator 5.0 has been released References: <4.2.0.58.20010402132056.00d90220@pop.cygnus.com> Message-ID: On Mon, 2 Apr 2001, Syd Polk wrote: > Source-Navigator 5.0 has been released, and is now available from > http://sources.redhat.com/sourcenav/download.html . Whooohooo! A quick note for you hackers out there. There is a hidden feature in 5.0, autoconf/automake/libtool support. You need to edit the installed share/etc/sn_prop.cfg file to enable it, just change the "set use_m4parser 0" to "set use_m4parser 1" and create a project. SN will include any configure.in, Makefile.am or .m4 macro files it finds and highlight them. Mo DeJong Red Hat Inc From hugo@synopsys.COM Mon Apr 2 17:50:00 2001 From: hugo@synopsys.COM (Hugo Carvalho) Date: Mon, 02 Apr 2001 17:50:00 -0000 Subject: Source-Navigator 5.0 has been released References: <4.2.0.58.20010402132056.00d90220@pop.cygnus.com> Message-ID: <01040217475000.08676@dhcp-146-225-38-59.synopsys.com> On Monday 02 April 2001 13:21, Syd Polk wrote: > Source-Navigator 5.0 has been released, and is now available from > http://source.redhat.com/sourcenav/download.html . is the replace tabs with spaces bug fixed? is there a change log? thx h > > > Syd Polk spolk@redhat.com > Engineering Manager +1 408 543 9430 > Red Hat, Inc. From echristo@redhat.com Mon Apr 2 17:54:00 2001 From: echristo@redhat.com (Eric Christopher) Date: Mon, 02 Apr 2001 17:54:00 -0000 Subject: Source-Navigator 5.0 has been released References: <4.2.0.58.20010402132056.00d90220@pop.cygnus.com> <01040217475000.08676@dhcp-146-225-38-59.synopsys.com> Message-ID: <3AC91208.ED7DFAB9@redhat.com> > is there a change log? Sure. In the sources. -eric -- I will not dissect things unless instructed From khamis@knuut.de Tue Apr 3 00:35:00 2001 From: khamis@knuut.de (Khamis Abuelkomboz (UUNET)) Date: Tue, 03 Apr 2001 00:35:00 -0000 Subject: Source-Navigator 5.0 has been released References: <4.2.0.58.20010402132056.00d90220@pop.cygnus.com> <3AC8E18A.F8A74F52@rug.ac.be> Message-ID: <3AC979D3.7000504@knuut.de> Maybe it's even better to put the binaries on an HTTP site or extend the possible FTP logins, I'm trying for hours to get to the ftp server, but I get allowys the message: Sorry, the ftp server has too many active ftp connections (30/30) For redhat it should be possible to let >300 insted of laked 30 users login :-) khamis Brecht Vermeulen wrote: > Well, I guess it's > > http://sources.redhat.com/sourcenav/download.html > > :) > > best regards, > Brecht > > Syd Polk wrote: > >> Source-Navigator 5.0 has been released, and is now available from >> http://source.redhat.com/sourcenav/download.html . >> >> Syd Polk spolk@redhat.com >> Engineering Manager +1 408 543 9430 >> Red Hat, Inc. From timo@qeradiant.com Tue Apr 3 00:51:00 2001 From: timo@qeradiant.com (Timothee Besset) Date: Tue, 03 Apr 2001 00:51:00 -0000 Subject: SN 5.0 binaries / windows installation? Message-ID: <5.0.2.1.2.20010403094652.00a6efe8@mail.qeradiant.com> I grabbed the binary distribution SN50-010322-Windows.zip H-i686-pc-cygwin\Readme.txt says "Windows systems: You must have about 25 MB free on your Windows system drive. You must have about 10 MB free on your installation drive. Double-click on the file SNWindows20000421.exe (or whatever the date of the release you are installing is) and following the on-screen instructions." Doesn't seem to apply to this zip .. where do I unzip it? Do I need to run something to setup? Thanks TTimo From spolk@redhat.com Tue Apr 3 01:51:00 2001 From: spolk@redhat.com (Syd Polk) Date: Tue, 03 Apr 2001 01:51:00 -0000 Subject: Source-Navigator 5.0 has been released References: <4.2.0.58.20010402132056.00d90220@pop.cygnus.com> <3AC8E18A.F8A74F52@rug.ac.be> <3AC979D3.7000504@knuut.de> Message-ID: <3AC98DCE.E4F61737@redhat.com> The mirror sites should pick it up soon, and then it will be easier to get. "Khamis Abuelkomboz (UUNET)" wrote: > > Maybe it's even better to put the binaries on an HTTP site > or extend the possible FTP logins, I'm trying for hours to > get to the ftp server, but I get allowys the message: > > Sorry, the ftp server has too many active ftp connections (30/30) > > For redhat it should be possible to let >300 insted of laked 30 users > login :-) > > khamis > > Brecht Vermeulen wrote: > > > Well, I guess it's > > > > http://sources.redhat.com/sourcenav/download.html > > > > :) > > > > best regards, > > Brecht > > > > Syd Polk wrote: > > > >> Source-Navigator 5.0 has been released, and is now available from > >> http://source.redhat.com/sourcenav/download.html . > >> > >> Syd Polk spolk@redhat.com > >> Engineering Manager +1 408 543 9430 > >> Red Hat, Inc. From spolk@redhat.com Tue Apr 3 01:52:00 2001 From: spolk@redhat.com (Syd Polk) Date: Tue, 03 Apr 2001 01:52:00 -0000 Subject: SN 5.0 binaries / windows installation? References: <5.0.2.1.2.20010403094652.00a6efe8@mail.qeradiant.com> Message-ID: <3AC98E1C.549D0EAF@redhat.com> Timothee Besset wrote: > > I grabbed the binary distribution > SN50-010322-Windows.zip > > H-i686-pc-cygwin\Readme.txt says > > "Windows systems: > > You must have about 25 MB free on your Windows system drive. You must > have about 10 MB free on your installation drive. > > Double-click on the file SNWindows20000421.exe (or whatever > the date of the release you are installing is) and following the on-screen > instructions." > > Doesn't seem to apply to this zip .. where do I unzip it? Do I need to run > something to setup? Hmm. Looks like that readme is out of date. You do not need to run a setup anymore; you should be able to unzip it, go to H-i686-pc-cygwin\bin, and double-click on the snavigator icon. From wgacquer@ubisoft.fr Tue Apr 3 02:14:00 2001 From: wgacquer@ubisoft.fr (William Gacquer) Date: Tue, 03 Apr 2001 02:14:00 -0000 Subject: Source-Navigator 5.0 has been released Message-ID: <5D2A198567EED311BD0F009027A25C876F09CF@SRVMAIL-ANN> ok :) this is an hidden feature but it's a very very important feature. Just unhide it and this is a reason for calling it SN 5.1! :) Thanks Wiliam Gacquer -----Original Message----- From: Mo DeJong [ mailto:mdejong@cygnus.com ] Sent: mardi 3 avril 2001 00:03 To: sourcenav@sources.redhat.com Subject: Re: Source-Navigator 5.0 has been released On Mon, 2 Apr 2001, Syd Polk wrote: > Source-Navigator 5.0 has been released, and is now available from > http://sources.redhat.com/sourcenav/download.html . Whooohooo! A quick note for you hackers out there. There is a hidden feature in 5.0, autoconf/automake/libtool support. You need to edit the installed share/etc/sn_prop.cfg file to enable it, just change the "set use_m4parser 0" to "set use_m4parser 1" and create a project. SN will include any configure.in, Makefile.am or .m4 macro files it finds and highlight them. Mo DeJong Red Hat Inc From leonp@plris.com Tue Apr 3 03:41:00 2001 From: leonp@plris.com (leonp@plris.com) Date: Tue, 03 Apr 2001 03:41:00 -0000 Subject: New version - new question Message-ID: <5.0.2.1.0.20010403123136.00aca3b0@plris.com> Hello, I downloaded the new version 5.0 for Windows - great! It seems to work faster. There must be new features too, but the Changelog file is insources, which are 15MB - too large! Is it possible to put it alone? The question: in previous version an opened editor window with "reuse" option behaved a little bit differently - when the opened file was not saved yet it always opened new window. The new version tries to save the current file - this, IMHO, is not comfortable. Is there any way to restore the "old" fashion behavior? The new version seems to open editor windows without paying attention to the "project preferences", where the new window size is assigned, while the old version did this. And how can I force the SN to open a new editor window at the same position and size as current one? Many thanks ahead for any reply. Leon Pollak leonp@plris.com From leonp@plris.com Tue Apr 3 04:45:00 2001 From: leonp@plris.com (leonp@plris.com) Date: Tue, 03 Apr 2001 04:45:00 -0000 Subject: One more small bug Message-ID: <5.0.2.1.0.20010403134553.00adf700@plris.com> Each time one opens the project, the "Symbol" window becomes smaller and smaller in its vertical dimension. After 10 sequential open/close operations it became less than half a screen. The effect appears when the horizontal window size is small enough to force the "Help" menu item to move to the next string. Leon Pollak leonp@plris.com From erayo@cs.bilkent.edu.tr Tue Apr 3 06:04:00 2001 From: erayo@cs.bilkent.edu.tr (Eray Ozkural (exa)) Date: Tue, 03 Apr 2001 06:04:00 -0000 Subject: Source-Navigator 5.0 has been released References: <4.2.0.58.20010402132056.00d90220@pop.cygnus.com> Message-ID: <3AC9CAA5.E36905D2@cs.bilkent.edu.tr> Hi, Could you please summarize the major changes from the last release? This is essential information for packagers. For instance, can I now use upstream tcl/tk libraries? Regards, Syd Polk wrote: > > Source-Navigator 5.0 has been released, and is now available from > http://source.redhat.com/sourcenav/download.html . > > Syd Polk spolk@redhat.com > Engineering Manager +1 408 543 9430 > Red Hat, Inc. -- Eray (exa) Ozkural Comp. Sci. Dept., Bilkent University, Ankara e-mail: erayo@cs.bilkent.edu.tr www: http://www.cs.bilkent.edu.tr/~erayo From khamis@knuut.de Tue Apr 3 06:17:00 2001 From: khamis@knuut.de (Khamis Abuelkomboz (UUNET)) Date: Tue, 03 Apr 2001 06:17:00 -0000 Subject: New version - new question References: <5.0.2.1.0.20010403123136.00aca3b0@plris.com> Message-ID: <3AC9CD25.5080302@knuut.de> this release is really alot faster. Just now I didn't figure out any real new feuture, except the support for makefiles and configure, what has to be enabled manually! What I noticed is following: - Tcl source code of SN/Gui has changed to support fully Tcl/Tk8.1 and Itcl3.0 - Really annouying that the Tcl Parser doesn't understand the new source code of SN (itcl3.0), like: itcl::class Editor& So if you are browing SN source code with SN, you will get difficulty to retrieve symbols like Editor&::InsertTab - Nasty behavior with "reuse" option (see below) - Naming of some source files have been changed - There are some older casting characters "@@" still used in prefrences.tcl, what seems to be buggy! - Refresh issues on windows has been fixed. - Maybe there are some new feutures in Build Tool, but I don't use it to valuate it. - Older problem with unloading files from the project still exists, it seems that this problem got bigger. I wasn't able to unload any file. leonp@plris.com wrote: > Hello, > I downloaded the new version 5.0 for Windows - great! It seems > to work faster. There must be new features too, but the Changelog file > is insources, which are 15MB - too large! Is it possible to put it alone? > The question: in previous version an opened editor window with > "reuse" option behaved a little bit differently - when the opened file > was not saved yet it always opened new window. The new version tries to > save the current file - this, IMHO, is not comfortable. Is there any way > to restore the "old" fashion behavior? > I noticed more nasty behavior with this option, when "reuse" is unset and you are trying to retrieve a symbol defined in the same file, SN opens a new window and put a "duplication" of the current edited file in a new window. > The new version seems to open editor windows without paying > attention to the "project preferences", where the new window size is > assigned, while the old version did this. > > And how can I force the SN to open a new editor window at the > same position and size as current one? > > Many thanks ahead for any reply. > > > Leon Pollak > leonp@plris.com khamis From leonp@plris.com Tue Apr 3 06:34:00 2001 From: leonp@plris.com (leonp@plris.com) Date: Tue, 03 Apr 2001 06:34:00 -0000 Subject: New version - new question References: <5.0.2.1.0.20010403123136.00aca3b0@plris.com> <3AC9CD25.5080302@knuut.de> Message-ID: <5.0.2.1.0.20010403153717.00ae6ae0@plris.com> At 15:16 03/04/01 +0200, you wrote: >- Older problem with unloading files from the project still exists, > it seems that this problem got bigger. I wasn't able to unload > any file. Hmmm.... I am afraid that I didn't understand exactly what you mean - I was able to unload files form the project without any problems. You still need to delete the unloaded file from the "build" list manually (which is funny), but this was always so... Leon Pollak leonp@plris.com From khamis@knuut.de Tue Apr 3 06:41:00 2001 From: khamis@knuut.de (Khamis Abuelkomboz (UUNET)) Date: Tue, 03 Apr 2001 06:41:00 -0000 Subject: New version - new question References: <5.0.2.1.0.20010403123136.00aca3b0@plris.com> <5.0.2.1.0.20010403153717.00ae6ae0@plris.com> Message-ID: <3AC9D2BA.60803@knuut.de> leonp@plris.com wrote: > At 15:16 03/04/01 +0200, you wrote: > >> - Older problem with unloading files from the project still exists, >> it seems that this problem got bigger. I wasn't able to unload >> any file. > > > Hmmm.... I am afraid that I didn't understand exactly what you mean - I > was able to unload files form the project without any problems. You > still need to delete the unloaded file from the "build" list manually > (which is funny), but this was always so... > > > > Leon Pollak > leonp@plris.com I'm using Windows2k. As you understod, I can't unload files from the project using the projet editor, just go and try to delete some files, the file list doesn't change. I tried it with the demo project examples. The project list doesn't delete the selected files after applying the unload action. khamis From wgacquer@ubisoft.fr Tue Apr 3 07:54:00 2001 From: wgacquer@ubisoft.fr (William Gacquer) Date: Tue, 03 Apr 2001 07:54:00 -0000 Subject: #warning 5.0 Message-ID: <5D2A198567EED311BD0F009027A25C876F0BBC@SRVMAIL-ANN> I am compiling the new 5.0 release fo linux/i686..... lot of warnings... From mdejong@cygnus.com Tue Apr 3 10:03:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Tue, 03 Apr 2001 10:03:00 -0000 Subject: Source-Navigator 5.0 has been released References: <5D2A198567EED311BD0F009027A25C876F09CF@SRVMAIL-ANN> Message-ID: On Tue, 3 Apr 2001, William Gacquer wrote: > ok :) this is an hidden feature but it's a very very important feature. Just > unhide it and this is a reason for calling it SN 5.1! :) > > Thanks > Wiliam Gacquer That is what development versions are for. 5.0 is aimed at getting a stable base out to users. The Itcl upgrade is an important part of that, some of the old Itcl @@ hacks would make your head hurt. We changed a lot of GUI code, but not the interface. It was important to keep the Tcl/Tk code the same, so that we have something to compare to. Now we can focus on the upgrade to Tcl/Tk 8.3 to solve the packaging problems. Mo DeJong Red Hat Inc From mdejong@cygnus.com Tue Apr 3 10:07:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Tue, 03 Apr 2001 10:07:00 -0000 Subject: New version - new question References: <3AC9D2BA.60803@knuut.de> Message-ID: On Tue, 3 Apr 2001, Khamis Abuelkomboz (UUNET) wrote: > I'm using Windows2k. As you understod, I can't unload files from the project > using the projet editor, just go and try to delete some files, the file list > doesn't change. > I tried it with the demo project examples. The project list doesn't delete > the selected files after applying the unload action. > > khamis We had a tester report this problem, but we were not able to reproduce it. It would really help if you could jump in there and debug it on your system. Mo DeJong Red Hat Inc From mdejong@cygnus.com Tue Apr 3 15:22:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Tue, 03 Apr 2001 15:22:00 -0000 Subject: Small suggestion and question References: <5.0.2.1.0.20010401175711.00a7dd60@plris.com> Message-ID: On Sun, 1 Apr 2001 leonp@plris.com wrote: > Hello, > I use the SN for cross development (this time under Win2K without > CygWin). > > 1 - Suggestion: > It seems to be comfortable to have the "build" window be open as a > subwindow in text editor - it is always accessible and one can rebuild his > target fast after any small changes. What seems to be not so > comfortable is: > a) The necessity to confirm each change before build starts (may > be by default, if I pressed "build" button - save). Sounds interesting, basically a "fast save all" by default. A prefs option for that would not be too hard to add. > b) This "build" subwindow seems to occupy too much place with the > information which isn't so necessary at the moment - build command, build > directory, target. If you ask me, the result window with 3 buttons at the > same horizontal level will be brilliant. I think we would like to merge the dir and the command into the target itself. That way you could have targets like: autoconf: run ./configure make: run make You could also have targets that just call other targets, like autoconf + make. A little bit of work on the targets piece of the tools could make SN a whole lot more useful. You could do neat stuff like kick off a simulator. > 2 - Question: > When I run SN under Win2K it is VERY slow, which, besides making > the work nervous, causes SN errors. For example, pressing Ctrl-S and Ctrl-W > sequentually, causes an error below. This effect doesn't occur when running > under Linux on the same machine. Does somebody know any medicine to the > problem? I think that problem was fixed in the soon to be released 5.0 version. The attached patch should fix it for you in 4.5. Mo Index: busy.tcl =================================================================== RCS file: /cvs/cvsfiles/devo/snavigator/gui/Attic/busy.tcl,v retrieving revision 1.6.10.2 retrieving revision 1.6.10.2.14.1 diff -u -r1.6.10.2 -r1.6.10.2.14.1 --- busy.tcl 2000/02/11 23:48:55 1.6.10.2 +++ busy.tcl 2000/12/14 00:23:46 1.6.10.2.14.1 @@ -215,7 +215,7 @@ #already called if {! [info exists watch_num_calls($win)]} { sn_blt_busy hold_update $win - set watch_num_calls($win) 1 + set watch_num_calls($win) {} } else { sn_log "WARNING: (watch y $win) already called"; flush stderr } @@ -226,10 +226,35 @@ update idletasks; # Important ! } sn_blt_busy release $win + + # Run any watch_done callbacks + if {$watch_num_calls($win) != {}} { + foreach cmd $watch_num_calls($win) { + sn_log "running watch $win release command \"$cmd\"" + uplevel #0 $cmd + } + } catch {unset watch_num_calls($win)} } else { sn_log "WARNING: (watch n $win) wrongly called"; flush stderr } + } +} + +# This procedure will run the given cmd when the watch for a given window +# is released. If the given window is not currently locked with a watch +# then the command will be run right away. + +proc watch_done { win cmd } { + global watch_num_calls + if {! [info exists watch_num_calls($win)]} { + # Run the command right away + sn_log "!!!!!!!!!!!!!! Watch NOT held for $win, executing \"$cmd\"" + uplevel #0 $cmd + } else { + # Save it so that it will get run when the watch is released + sn_log "!!!!!!!!!!!!!! Watch HELD for $win release command \"$cmd\"" + lappend watch_num_calls($win) $cmd } } Index: multiappl.tcl =================================================================== RCS file: /cvs/cvsfiles/devo/snavigator/gui/Attic/multiappl.tcl,v retrieving revision 1.32.2.17.2.5.4.7 retrieving revision 1.32.2.17.2.5.4.7.14.1 diff -u -r1.32.2.17.2.5.4.7 -r1.32.2.17.2.5.4.7.14.1 --- multiappl.tcl 2000/02/11 23:49:20 1.32.2.17.2.5.4.7 +++ multiappl.tcl 2000/12/14 00:23:46 1.32.2.17.2.5.4.7.14.1 @@ -4099,7 +4099,11 @@ #this procedure is bound on Control-w, so don't #close window when it's the last one in the project if {[MultiWindow& @@ num_Existing_windows] > 1} { - catch {[winfo toplevel $w] windows_close dummy} + # Protect against destruction of the toplevel + # while the window is locked by a call to + # [watch $top y]. If there is no watch + set top [winfo toplevel $w] + watch_done $top "$top windows_close dummy" } } proc find_dialog {w} { From spolk@redhat.com Tue Apr 3 17:36:00 2001 From: spolk@redhat.com (Syd Polk) Date: Tue, 03 Apr 2001 17:36:00 -0000 Subject: Source-Navigator 5.0 has been released References: <4.2.0.58.20010402132056.00d90220@pop.cygnus.com> <3AC9CAA5.E36905D2@cs.bilkent.edu.tr> Message-ID: <4.2.0.58.20010403173624.01af9d30@pop.cygnus.com> At 04:05 PM 4/3/01 +0300, Eray Ozkural (exa) wrote: >Hi, > >Could you please summarize the major changes from the last release? >This is essential information for packagers. For instance, can I now >use upstream tcl/tk libraries? No, we still use our own version of Tcl/Tk. As for information about what we fixed, I will leave Ian and Mo to dig out that detail. >Regards, > >Syd Polk wrote: > > > > Source-Navigator 5.0 has been released, and is now available from > > http://source.redhat.com/sourcenav/download.html . > > > > Syd Polk spolk@redhat.com > > Engineering Manager +1 408 543 9430 > > Red Hat, Inc. > >-- >Eray (exa) Ozkural >Comp. Sci. Dept., Bilkent University, Ankara >e-mail: erayo@cs.bilkent.edu.tr >www: http://www.cs.bilkent.edu.tr/~erayo Syd Polk spolk@redhat.com Engineering Manager +1 408 543 9430 Red Hat, Inc. From spolk@redhat.com Tue Apr 3 17:42:00 2001 From: spolk@redhat.com (Syd Polk) Date: Tue, 03 Apr 2001 17:42:00 -0000 Subject: Maintainership Message-ID: <4.2.0.58.20010403174135.01af9460@pop.cygnus.com> As of today, I am resigning as head maintainer of Source-Navigator. Ian Roxborough , Mo DeJong will split that duty, at least until we start getting enough code contributed from others. I will still be contributing here and there, especially with build problems. Syd Polk spolk@redhat.com Engineering Manager +1 408 543 9430 Red Hat, Inc. From mdejong@cygnus.com Wed Apr 4 05:37:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Wed, 04 Apr 2001 05:37:00 -0000 Subject: sourcenav/17: SN-50 on SuSE-Linux-7.1 References: <0104041024120C.14025@wptnb8> Message-ID: On Wed, 4 Apr 2001, Michael Karbach wrote: > Hi! > > > Please don't send us core files, it does no good. > > Sorry, but the form has complained that no attachment was added, so I have > decided to add the core. Again, excuse me! Don't worry about it, it is just a pain because the attached files gets sent in the email to me which means a painful download. > wptnb8:local/bin> ./snavigator > Error: invalid command name "Preferences&::load_default_settings" Gak! That sounds like the old permissions on tclIndex problem. Could you try this: $ cd $INSTALL/bin $ hyper % Grep If those error out, then I would check to make sure you had read perms on $INSTALL/share/sourcenav/gui/tclIndex. I am CCing the list in case anyone else runs into this. Mo DeJong Red Hat Inc From irios@proin.es Wed Apr 4 05:47:00 2001 From: irios@proin.es (Nacho de los Ríos Tormo) Date: Wed, 04 Apr 2001 05:47:00 -0000 Subject: Weird permissions in SN5 Message-ID: <01040411582900.08677@irios> I have downloaded the Snav5 binary for Linux with great anticipation, and have uncompressed the tar.gz file to /opt/snavigator . I can start the program with /opt/snavigator/bin/snavigator only when root, because files belong to user 1105 in group 1002, neither of which exist in my system. This disallows me to execute Snav5 as a user. However, it DOES work when called by root -- though this is useless to me, because my personal directory resides in a network server, and it is unavailable for my station's root user. To chown everything to root.root is not enough, because the file permissions are wrong for users not in the group, and access is disalowed. Chowning to root.users looked as it might have worked, but then /opt/snavigator/bin/snavigator originates an inmediate segmentation fault. chmod everything to 755 also produces a segmentation fault. Finally, I created a "snavigator" user 1105 and a "snavigator" group 1002 and added my own user to the snavigator group. Time for segmentation fault again! This is happening on SuSE Linux 7.0 What else can I do? Thanks a lot, Nacho de los R????os Tormo Procedimientos Integrados S.L. Sevillanos, 67 28609 Sevilla la Nueva, Madrid SPAIN From leonp@plris.com Wed Apr 4 05:51:00 2001 From: leonp@plris.com (leonp@plris.com) Date: Wed, 04 Apr 2001 05:51:00 -0000 Subject: Small bug in C parser Message-ID: <5.0.2.1.0.20010404133630.00ae0ab8@plris.com> While entering the C text in the editor window, the parser doesn't distinguish between symbols "<" and ">" entered as boundaries in template definitions and simple comparison operation inside an "if" operator. Leon Pollak leonp@plris.com From leonp@plris.com Wed Apr 4 05:51:00 2001 From: leonp@plris.com (leonp@plris.com) Date: Wed, 04 Apr 2001 05:51:00 -0000 Subject: One more inconsistant behavior (even bug!) in SN 5.0 Message-ID: <5.0.2.1.0.20010404130841.00ad6030@plris.com> Hello, I have found one more problem, which wasn't in 4.5.2. Suppose the editor window is opened and contains file source.c and I run the build process, which fins some errors in source.c file. If the editor window is marked as NOT "Reuse", SN opens new editor for source.c. But the source.c is saved!!?? Once more, 4.5.2 didn't do this. Leon Pollak leonp@plris.com From leonp@plris.com Wed Apr 4 05:52:00 2001 From: leonp@plris.com (leonp@plris.com) Date: Wed, 04 Apr 2001 05:52:00 -0000 Subject: Include tree question Message-ID: <5.0.2.1.0.20010404121248.00a71e68@plris.com> Hello, In my project I have one include file a.h which includes another file b.h. In the Makefile generated by SN 5.0 I see the *.c file dependency on a.h but no references to b.h Thus any changes made to b.h are "invisible" for make utility. Is this a bug or some kind of my problem? Thanks ahead. Leon Pollak leonp@plris.com From leonp@plris.com Wed Apr 4 06:51:00 2001 From: leonp@plris.com (leonp@plris.com) Date: Wed, 04 Apr 2001 06:51:00 -0000 Subject: SN Doesn't recognize bool true/false Message-ID: <5.0.2.1.0.20010404155645.00af6248@plris.com> Hello, all. Does anybody know the cause that SN C-parser doesn't recognize "false" and "true" words (while do recognize "bool")? Thanks. Leon Pollak leonp@plris.com From rfweber@link.com Wed Apr 4 06:52:00 2001 From: rfweber@link.com (Richard F Weber) Date: Wed, 04 Apr 2001 06:52:00 -0000 Subject: Parsing Question Message-ID: <3ACB2710.9000700@link.com> To all of the parser writers out there, If this isn't the right place to submit questions like this, then let me know how else to submit them. But in any case, question with regards to Creating symbols & the such. For those of you not familiar, I'm working on an Ada parser right now. I've got some success in doing basic preliminary type stuff, but I've got an interesting question on how to approach something. In Ada, you have .ads files (like header files) and .adb files (which is the body of code). As such, a file called abc.adb, almost requires that you have a class called "abc" defined in abc.adb. However, in the abc.ads file, you have the declaration of the class abc, as well as member functions and variables. My hang up is when I come across the symbol identifying a class definition in the .adb file, I do a sn_insert_symbol(SN_CLASS_DEF), but in the .ads file, there is no way to do an sn_insert_symbol(SN_CLASS_DCL). So should I be doing a class declaration, or something else to indicate where the class itself is declared. The only other CLASS related definition is SN_CLASS_INHERIT, but I'm not really inheriting anything. Am I on the right track, or am I doing something just flat out wrong. One other quick question, how do I submit the diff's to get color coding of Ada working. Even if the parser isn't done yet, I'd like to see the color coder in as well. (Maybe even get around to doing one for Perl as well) Thanks --Rich From marta.stojanovic@nrc.ca Wed Apr 4 07:17:00 2001 From: marta.stojanovic@nrc.ca (Marta Stojanovic) Date: Wed, 04 Apr 2001 07:17:00 -0000 Subject: Weird permissions in SN5 References: <01040411582900.08677@irios> Message-ID: <3ACB2EB3.87CE724F@nrc.ca> Hi ! I had the exact same problem on RedHat Linux 7.0. Tried to change owner/group to be exactly like they are for the installation directory of SN452, but it didn't work. I also have a question concerning hyper : when I try to execute hyper from the bin directory (logged as root) it gives me this error message : Error: unknown encoding "iso8859-1" SourceNavigator works when I'm logged as a root, but I didn't try all its functionalities. I don't know if this error message is a big problem or not, I just wanted to let you know. If somebody knows how to solve those permissions, it'd be great. I would really prefer not to work as root all the time. I posted a question concerning Java some time ago, without any luck : I wonder if there is some way to get those instance variables types when analyzing Java code. They are not in the database (.iv file). Is it too hard to change the Java parser ? Any suggestions ? Thanks in advace. Kind regards, Marta. Nacho de los R????os Tormo wrote: > I have downloaded the Snav5 binary for Linux with great anticipation, and > have uncompressed the tar.gz file to /opt/snavigator . > > I can start the program with /opt/snavigator/bin/snavigator only when root, > because files belong to user 1105 in group 1002, neither of which exist in my > system. This disallows me to execute Snav5 as a user. However, it DOES work > when called by root -- though this is useless to me, because my personal > directory resides in a network server, and it is unavailable for my station's > root user. > > To chown everything to root.root is not enough, because the file permissions > are wrong for users not in the group, and access is disalowed. > > Chowning to root.users looked as it might have worked, but then > /opt/snavigator/bin/snavigator originates an inmediate segmentation fault. > chmod everything to 755 also produces a segmentation fault. > > Finally, I created a "snavigator" user 1105 and a "snavigator" group 1002 and > added my own user to the snavigator group. Time for segmentation fault again! > > This is happening on SuSE Linux 7.0 > > What else can I do? > > Thanks a lot, > > Nacho de los R????os Tormo > Procedimientos Integrados S.L. > Sevillanos, 67 > 28609 Sevilla la Nueva, Madrid > SPAIN From leftspin@hotmail.com Wed Apr 4 09:25:00 2001 From: leftspin@hotmail.com (Left Spin) Date: Wed, 04 Apr 2001 09:25:00 -0000 Subject: goto line does not work in editor Message-ID: goto line does not work in the editor. The dialog is dismissed, but the current line does not change. I've also seen the Symbol Accelerator Combo-box exhibit this behavior ( the editor was not scrolled to the proper line ). This problem seems to be related, but is intermittent. The go to line dialog never works on my system. Windows 98. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com From irox@redhat.com Wed Apr 4 11:06:00 2001 From: irox@redhat.com (Ian Roxborough) Date: Wed, 04 Apr 2001 11:06:00 -0000 Subject: Include tree question References: <5.0.2.1.0.20010404121248.00a71e68@plris.com> Message-ID: <3ACB623F.B7491AA6@redhat.com> leonp@plris.com wrote: > > Hello, > In my project I have one include file a.h which includes another > file b.h. In the Makefile generated by SN 5.0 I see the *.c file dependency > on a.h but no references to b.h Thus any changes made to b.h are > "invisible" for make utility. > Is this a bug or some kind of my problem? Yeah, this is a bug. Well, a limitation, when generating the dependencies, basically it doesn't recurs the dependencies of dependencies (just that of the source file). I'm not sure when this will be fixed, I'm currently looking at doing a bunch of work on build system to make it more complete and flexible. Ian. From irox@redhat.com Wed Apr 4 11:06:00 2001 From: irox@redhat.com (Ian Roxborough) Date: Wed, 04 Apr 2001 11:06:00 -0000 Subject: Small bug in C parser References: <5.0.2.1.0.20010404133630.00ae0ab8@plris.com> Message-ID: <3ACB627A.A60B7178@redhat.com> leonp@plris.com wrote: > > While entering the C text in the editor window, the parser doesn't > distinguish between symbols "<" and ">" entered as boundaries in template > definitions and simple comparison operation inside an "if" operator. Yeah, true template support is still missing. Ian. From dsh8290@rit.edu Wed Apr 4 11:38:00 2001 From: dsh8290@rit.edu (D-Man) Date: Wed, 04 Apr 2001 11:38:00 -0000 Subject: SN Doesn't recognize bool true/false References: <5.0.2.1.0.20010404155645.00af6248@plris.com> Message-ID: <20010404143842.A1986@harmony.cs.rit.edu> They're not C. They are C++. (I don't know why it would recognize 'bool' unless it expands typedefs/#defines) -D On Wed, Apr 04, 2001 at 03:58:15PM +0200, leonp@plris.com wrote: | Hello, all. | Does anybody know the cause that SN C-parser doesn't recognize | "false" and "true" words (while do recognize "bool")? | Thanks. | | | Leon Pollak | leonp@plris.com From dsh8290@rit.edu Wed Apr 4 11:39:00 2001 From: dsh8290@rit.edu (D-Man) Date: Wed, 04 Apr 2001 11:39:00 -0000 Subject: Small bug in C parser References: <5.0.2.1.0.20010404133630.00ae0ab8@plris.com> Message-ID: <20010404143947.B1986@harmony.cs.rit.edu> On Wed, Apr 04, 2001 at 01:46:02PM +0200, leonp@plris.com wrote: | While entering the C text in the editor window, the parser doesn't | distinguish between symbols "<" and ">" entered as boundaries in template ^^^^^^^^ C doesn't have templates. C++ does. It may help if you use the C++ parser. (If this isn't the problem, then I don't know what is, I haven't used SN for a C or C++ project yet) -D From tromey@redhat.com Wed Apr 4 13:17:00 2001 From: tromey@redhat.com (Tom Tromey) Date: Wed, 04 Apr 2001 13:17:00 -0000 Subject: Include tree question References: <5.0.2.1.0.20010404121248.00a71e68@plris.com> <3ACB623F.B7491AA6@redhat.com> Message-ID: <873dboct14.fsf@creche.redhat.com> >>>>> "Ian" == Ian Roxborough writes: Ian> Yeah, this is a bug. Well, a limitation, when generating Ian> the dependencies, basically it doesn't recurs the dependencies Ian> of dependencies (just that of the source file). Ian> I'm not sure when this will be fixed, I'm currently looking at Ian> doing a bunch of work on build system to make it more complete Ian> and flexible. The best way (imnsho) to generate dependencies is to do it as a side-effect of the build. Then they are always up to date. Automake does this in a fairly ugly way. If S-N can assume GNU make then you can do it with relatively little hackery. Tom From roman@augan.com Thu Apr 5 03:38:00 2001 From: roman@augan.com (Roman Zippel) Date: Thu, 05 Apr 2001 03:38:00 -0000 Subject: another editor bug in SN5.0 Message-ID: <3ACC4AEA.9149C36D@augan.com> Hi, The modified state isn't changed if you paste something into a newly opened file in the editor. bye, Roman From khamis@knuut.de Thu Apr 5 04:24:00 2001 From: khamis@knuut.de (Khamis Abuelkomboz (UUNET)) Date: Thu, 05 Apr 2001 04:24:00 -0000 Subject: Alt-Key on W2k doesn't work Message-ID: <3ACC55D7.1010601@knuut.de> Another bug, The hot keys for menus don't work anymore! So if you click "ALT-E" to call the Edit-pulldown menu, nothing happens..... khamis From leonp@plris.com Thu Apr 5 04:31:00 2001 From: leonp@plris.com (leonp@plris.com) Date: Thu, 05 Apr 2001 04:31:00 -0000 Subject: Alt-Key on W2k doesn't work References: <3ACC55D7.1010601@knuut.de> Message-ID: <5.0.2.1.0.20010405133632.00aebbe0@plris.com> At 13:24 05/04/01 +0200, you wrote: >Another bug, > >The hot keys for menus don't work anymore! So if you click >"ALT-E" to call the Edit-pulldown menu, nothing happens..... > >khamis Yes. To make it work press and RELEASE Alt-key, then press E-key. I agree, this is annoying... Leon Pollak leonp@plris.com From khamis@knuut.de Thu Apr 5 08:34:00 2001 From: khamis@knuut.de (Khamis Abuelkomboz (UUNET)) Date: Thu, 05 Apr 2001 08:34:00 -0000 Subject: HTML, Properties Parsers Message-ID: <3ACC903F.1050100@knuut.de> Here are two parsers for HTML and Java Developers, what I found very usefull: http://home.knuut.de/khamis/sn/index.html Khamis From spolk@redhat.com Thu Apr 5 09:04:00 2001 From: spolk@redhat.com (Syd Polk) Date: Thu, 05 Apr 2001 09:04:00 -0000 Subject: HTML, Properties Parsers References: <3ACC903F.1050100@knuut.de> Message-ID: <3ACC9649.805A54F6@redhat.com> "Khamis Abuelkomboz (UUNET)" wrote: > > Here are two parsers for HTML and Java Developers, what I found very > usefull: > > http://home.knuut.de/khamis/sn/index.html > > Khamis Khamis, we would be happy to add these to the SN distribution, if you would like to submit them. You will need to file a copyright assignment form first. From mdejong@cygnus.com Thu Apr 5 13:27:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 05 Apr 2001 13:27:00 -0000 Subject: Alt-Key on W2k doesn't work References: <3ACC55D7.1010601@knuut.de> Message-ID: On Thu, 5 Apr 2001, Khamis Abuelkomboz (UUNET) wrote: > Another bug, > > The hot keys for menus don't work anymore! So if you click > "ALT-E" to call the Edit-pulldown menu, nothing happens..... > > khamis Please file this one in the new bug DB (see the link off the main homepage). When adding a bug, please make sure it was not already reported. If we get a ton of duplicate bug reports, the new bug system will do us no good. Mo From neeam@yahoo.com Thu Apr 5 21:04:00 2001 From: neeam@yahoo.com (Subrata Datta) Date: Thu, 05 Apr 2001 21:04:00 -0000 Subject: SN 5.0 very slow on NT4.0 Message-ID: <20010406040407.25160.qmail@web11601.mail.yahoo.com> SN 5.0 seems to be very slow in NT 4.0. Please advise if I'm missing something. SN4.5.2 was not slow as much. subrata. __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ From mdejong@cygnus.com Thu Apr 5 21:42:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 05 Apr 2001 21:42:00 -0000 Subject: SN 5.0 very slow on NT4.0 References: <20010406040407.25160.qmail@web11601.mail.yahoo.com> Message-ID: On Thu, 5 Apr 2001, Subrata Datta wrote: > SN 5.0 seems to be very slow in NT 4.0. Please advise if I'm > missing something. > SN4.5.2 was not slow as much. > > subrata. That is really odd. We have seen 5.0 running much more quickly than 4.5. Is there any chance you are running Source-Navigator from inside Cygwin? We did notice a serious slowdown in that case. Are you using any sort of remote display program? Mo From neeam@yahoo.com Thu Apr 5 21:54:00 2001 From: neeam@yahoo.com (Subrata Datta) Date: Thu, 05 Apr 2001 21:54:00 -0000 Subject: SN 5.0 very slow on NT4.0 References: Message-ID: <20010406045405.68078.qmail@web11602.mail.yahoo.com> Yes I was running it from bash(from cygwin) prompt on NT 4.0 will try it from dos promt and let you konw. thanks a lot for the quick repsonse!! (this is the power of open src!!) regards, subrata. --- Mo DeJong wrote: > On Thu, 5 Apr 2001, Subrata Datta wrote: > > > SN 5.0 seems to be very slow in NT 4.0. Please advise if I'm > > missing something. > > SN4.5.2 was not slow as much. > > > > subrata. > > That is really odd. We have seen 5.0 running much more > quickly than 4.5. Is there any chance you are running > Source-Navigator from inside Cygwin? We did notice > a serious slowdown in that case. Are you using any > sort of remote display program? > > Mo ===== Subrata Datta ---------------- neeam@yahoo.com sdatta@ciena.com __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ From mdejong@cygnus.com Thu Apr 5 22:07:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 05 Apr 2001 22:07:00 -0000 Subject: SN 5.0 very slow on NT4.0 References: <20010406045405.68078.qmail@web11602.mail.yahoo.com> Message-ID: On Thu, 5 Apr 2001, Subrata Datta wrote: > Yes I was running it from bash(from cygwin) prompt on NT 4.0 > will try it from dos promt and let you konw. Well, that would be a good thing to mention in the bug report ;) > thanks a lot for the quick repsonse!! (this is the power of open > src!!) I don't know if it the "power of open source" as much as as the fact that I ran into that same problem the very first time I ran SN 5.0 on Windows. I could not believe how god awful slow it was, running snavigator.exe from the explorer shell fixed the problem. Mo DeJong Red Hat Inc From mdejong@cygnus.com Thu Apr 5 22:14:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 05 Apr 2001 22:14:00 -0000 Subject: Get rid of the Linux binary? Message-ID: It seems like the most serious problem folks have run into so far is crashing when running the Linux binary. This is most likely a glibc mismatch problem, and frankly we don't really want to deal with it. I think we should just remove the "general" Linux binary. It simply does not work, people pull it down on some Linux box we have not tested on, it does not work, then boom we have a bunch of bug reports to deal with. I would rather just give Linux users the source code. Linux comes with a gcc, so there is no reason someone could not compile it from source. We still plan on giving out RPMS for Red Hat 6.x and 7.x when the Tcl/Tk 8.3 upgrade is done. Other folks have also done binary versions for other Linux distros. I think this is the right solution for everyone in the long run. Comments? Mo DeJong Red Hat Inc From mdejong@cygnus.com Thu Apr 5 22:39:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 05 Apr 2001 22:39:00 -0000 Subject: Weird permissions in SN5 References: <3ACB2EB3.87CE724F@nrc.ca> Message-ID: On Wed, 4 Apr 2001, Marta Stojanovic wrote: > Hi ! > > I had the exact same problem on RedHat Linux 7.0. Tried to > change owner/group to be exactly like they are for the > installation directory of SN452, but it didn't work. I just downloaded the binary and tried to install it as root. I tried this, and it seemed to work around the problem. Untarring as a normal user also seems to "fix" the problem. cd $INSTALL chown -R root.root i686-pc-linux-gnulibc2.1 find . -type d -exec chmod 775 {} \; find . -type f -exec chmod o+r {} \; > I also have a question concerning hyper : when I try to execute hyper from the > bin directory (logged as root) it gives me this error message : > > Error: unknown encoding "iso8859-1" Yes, that is a known problem. The "fix" is to explicitly set the TCL_LIBRARY env var before running hyper. setenv TCL_LIBRARY $INSTALL/share/etc If you take a look at the bin/snavigator script you will find that it does just that. Also, if you build from the source, the problem does not show up, it only happens when you move the tree and try to run it in the new location. We need to fix this, it is just at the bottom of the list since most folks don't use hyper directly. > I posted a question concerning Java some time ago, without any luck : > I wonder if there is some way to get those instance variables > types when analyzing Java code. They are not in the database (.iv > file). Is it too hard to change the Java parser ? Any suggestions ? I saw your note, but I did not have anything to add to the discussion. If the .lv tables are not generated, it most likely means the parser does not have them implemented. Working on the parser is the only way to fix such a problem. Mo DeJong Red Hat Inc From mdejong@cygnus.com Thu Apr 5 23:05:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 05 Apr 2001 23:05:00 -0000 Subject: SN Doesn't recognize bool true/false References: <5.0.2.1.0.20010404155645.00af6248@plris.com> Message-ID: On Wed, 4 Apr 2001 leonp@plris.com wrote: > Hello, all. > Does anybody know the cause that SN C-parser doesn't recognize > "false" and "true" words (while do recognize "bool")? > Thanks. Because it has not been implemented. Seriously, adding support for this kind of thing is not hard at all, someone just needs to sit down for 20 minutes and actually do it. Why don't you try this patch out and see if it works for you? Index: c_high.l =================================================================== RCS file: /cvs/cvsfiles/devo/snavigator/hyper/c_high.l,v retrieving revision 1.12 diff -u -r1.12 c_high.l --- c_high.l 2001/02/26 00:48:08 1.12 +++ c_high.l 2001/04/06 06:03:26 @@ -145,6 +145,7 @@ else | enum | extern | +false | float | for | friend | @@ -174,6 +175,7 @@ template | this | throw | +true | try | typedef | union | Mo DeJong Red Hat Inc From mdejong@cygnus.com Thu Apr 5 23:08:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 05 Apr 2001 23:08:00 -0000 Subject: Weird permissions in SN5 References: <01040411582900.08677@irios> Message-ID: > Chowning to root.users looked as it might have worked, but then > /opt/snavigator/bin/snavigator originates an inmediate segmentation fault. > chmod everything to 755 also produces a segmentation fault. > > Finally, I created a "snavigator" user 1105 and a "snavigator" group 1002 and > added my own user to the snavigator group. Time for segmentation fault again! > > This is happening on SuSE Linux 7.0 Does this problem go away if you download the source code and build it on your own? I would like to "solve" this problem by getting rid of the Linux binary, so I would like to know if recompiling fixes the problem for you. Mo DeJong Red Hat Inc From neeam@yahoo.com Thu Apr 5 23:52:00 2001 From: neeam@yahoo.com (Subrata Datta) Date: Thu, 05 Apr 2001 23:52:00 -0000 Subject: SN 5.0 very slow on NT4.0 References: Message-ID: <20010406065257.39142.qmail@web11607.mail.yahoo.com> Hi I tried running from dos promt and SN could not start. error message is "SN failed to start". what wrong here.. subrata. --- Mo DeJong wrote: > On Thu, 5 Apr 2001, Subrata Datta wrote: > > > Yes I was running it from bash(from cygwin) prompt on NT 4.0 > > will try it from dos promt and let you konw. > > Well, that would be a good thing to mention in the bug > report ;) > > explorer shell fixed the problem. > > Mo DeJong > Red Hat Inc ===== Subrata Datta ---------------- neeam@yahoo.com sdatta@ciena.com __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ From support@internetdiscovery.com Fri Apr 6 00:54:00 2001 From: support@internetdiscovery.com (Mike Clarkson) Date: Fri, 06 Apr 2001 00:54:00 -0000 Subject: Get rid of the Linux binary? References: Message-ID: <3.0.6.32.20010406005144.007d8800@popd.ix.netcom.com> At 10:14 PM 4/5/01 -0700, you wrote: >It seems like the most serious problem folks >have run into so far is crashing when running >the Linux binary. This is most likely a >glibc mismatch problem, and frankly we >don't really want to deal with it. I know the feeling. For whatever it's worth, what we do is compile static on RH 5.2. Seems to work everywhere, but of course, your mileage may vary. Mike. From rfweber@link.com Fri Apr 6 03:44:00 2001 From: rfweber@link.com (Richard F Weber) Date: Fri, 06 Apr 2001 03:44:00 -0000 Subject: Get rid of the Linux binary? References: Message-ID: <3ACD9E1B.5090500@link.com> Well, I would think do one of several things 1) Offer binary .rpm's for RH6.x & RH7.x, as well as source .rpm's for other platforms. Would take care of dependencies, and allow users on say Mandrake to download and install 2) Also offer .deb files, but it's a format you have to support that you may not want to. But it's better for the karma. 3) Another comment, as an Admin, I like using RPM's because it's easier to document how to install something, and just do an rpm -Uvh on it. As an end-user, I think it's kind of cheesy (sorry, no offense intended) that RedHat doesn't have one of their tools packaged up in .rpm format for a RedHat user to install from. Also, is SourceNav going to be offered on the PowerTools CD for RH7.1? I'd even like to see it on the main distribution, but I don't know what determines whether something is on the main distribution or not. SourceNav is a really nice tool so far, and sticking it with the RH distribution is a nice way to increase it's exposure, plus convince companies to use. "Look, we should use SourceNav as our IDE because it comes free with the OS". Sorry about meandering a little off topic. --Rich Mo DeJong wrote: > It seems like the most serious problem folks > have run into so far is crashing when running > the Linux binary. This is most likely a > glibc mismatch problem, and frankly we > don't really want to deal with it. > > I think we should just remove the "general" > Linux binary. It simply does not work, > people pull it down on some Linux box > we have not tested on, it does not work, > then boom we have a bunch of bug reports > to deal with. I would rather just give > Linux users the source code. Linux comes > with a gcc, so there is no reason someone > could not compile it from source. > > We still plan on giving out RPMS for > Red Hat 6.x and 7.x when the Tcl/Tk 8.3 > upgrade is done. Other folks have also > done binary versions for other Linux > distros. I think this is the right > solution for everyone in the long run. > > Comments? > > Mo DeJong > Red Hat Inc > > From dgp@email.nist.gov Fri Apr 6 11:47:00 2001 From: dgp@email.nist.gov (Donald G Porter) Date: Fri, 06 Apr 2001 11:47:00 -0000 Subject: Tcl Core Team: Call for Tk maintainers Message-ID: <200104061846.OAA27985@email.nist.gov> * * * * * * * In February, the Tcl Core Team (TCT) called on members of the community to volunteer as maintainers of the Tcl source code. We are pleased to note that many prominent members of the Tcl community have answered that call, including Daniel Steffen, Kevin Kenny, Miguel Sofer, Rolf Schroedter, and Vincent Darley. Several TCT members are also performing maintainer duty. Thanks to all these people [*] who keep high quality in the Tcl source code! In recent days, the TCT has quietly been collecting volunteers to serve as maintainers of the Tk toolkit source code. Already on board are Allen Flick, Fr????d????ric Bonnet, and Miguel Ba????????n in addition to TCT members [+]. Now the TCT would like to issue a more public invitation to others who may be interested in working on the Tk source code. We have divided Tk into 86 parts, each covering one functional area [#]. We are looking for people who are willing to maintain / take responsibility for (at least) one of these functional areas. Each area can have many maintainers, so feel free to join forces with others. Prior knowledge of the Tk source code in the chosen area is useful but not required. A willingness to acquire such knowledge is required, as is enough volunteer time, i.e. at least a few hours per week. The basic tasks a maintainer performs are the review and integration of patches to his or her functional area of Tk. For a more detailed description of how maintainers work on Tcl/Tk, see TIP 28 [$]. People who are interested in becoming a Tk maintainer (or a Tcl maintainer -- there's still room for more!) should send an email to the TCLCORE mailing list . Let us know your SourceForge [@] account name, so we can empower you as a Tcl/Tk Developer. ~~~ [*] -- http://dev.scriptics.com:8080/cgi-bin/tct/tip/24.html -- [+] -- http://dev.scriptics.com:8080/cgi-bin/tct/tip/30.html -- [#] -- http://dev.scriptics.com:8080/cgi-bin/tct/tip/23.html -- [$] -- http://dev.scriptics.com:8080/cgi-bin/tct/tip/28.html -- [@] -- http://sourceforge.net/ -- | Don Porter Mathematical and Computational Sciences Division | | donald.porter@nist.gov Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |______________________________________________________________________| From mdejong@cygnus.com Fri Apr 6 12:33:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Fri, 06 Apr 2001 12:33:00 -0000 Subject: Get rid of the Linux binary? References: <3ACD9E1B.5090500@link.com> Message-ID: On Fri, 6 Apr 2001, Richard F Weber wrote: > Well, I would think do one of several things > > 1) Offer binary .rpm's for RH6.x & RH7.x, as well as source .rpm's for > other platforms. Would take care of dependencies, and allow users on > say Mandrake to download and install > 2) Also offer .deb files, but it's a format you have to support that you > may not want to. But it's better for the karma. > 3) We are working on that, but it can't be done properly without the Tcl/Tk 8.3 upgrade. > Also, is SourceNav going to be offered on the PowerTools CD for RH7.1? > I'd even like to see it on the main distribution, but I don't know what > determines whether something is on the main distribution or not. There is a rumor that Source-Navigator is going to go out via the Red Hat Network update feature some time after the 7.1 release. > SourceNav is a really nice tool so far, and sticking it with the RH > distribution is a nice way to increase it's exposure, plus convince > companies to use. "Look, we should use SourceNav as our IDE because it > comes free with the OS". Sorry about meandering a little off topic. Well, that is the plan. Mo DeJong Red Hat Inc From xiaoxid@163.net Sat Apr 7 03:47:00 2001 From: xiaoxid@163.net (Ding) Date: Sat, 07 Apr 2001 03:47:00 -0000 Subject: rebuild sourcenavigator in windows 98? Message-ID: Hi, I download the sourcenavigator SN50-010322-source.tar.gz, I want to run it on windows98 ? can you tell me how to do that? Thanks a lot Best Regards, Ding xiaoxi From erayo@cs.bilkent.edu.tr Sat Apr 7 12:51:00 2001 From: erayo@cs.bilkent.edu.tr (Eray Ozkural (exa)) Date: Sat, 07 Apr 2001 12:51:00 -0000 Subject: Get rid of the Linux binary? References: <3ACD9E1B.5090500@link.com> Message-ID: <3ACF6FDB.C415C4B7@cs.bilkent.edu.tr> Richard F Weber wrote: > > Well, I would think do one of several things > > 1) Offer binary .rpm's for RH6.x & RH7.x, as well as source .rpm's for > other platforms. Would take care of dependencies, and allow users on > say Mandrake to download and install > 2) Also offer .deb files, but it's a format you have to support that you > may not want to. But it's better for the karma. Ahem, I'm the deb maintainer for sourcenav. I think it's bundled up nicely in debian. Before you start making rpm's have a look at it. I also did some work on stripping the custom tcl/tk stuff, but it doesn't work surely. Thanks, -- Eray (exa) Ozkural Comp. Sci. Dept., Bilkent University, Ankara e-mail: erayo@cs.bilkent.edu.tr www: http://www.cs.bilkent.edu.tr/~erayo From khamis@knuut.de Mon Apr 9 02:14:00 2001 From: khamis@knuut.de (Khamis Abuelkomboz (UUNET)) Date: Mon, 09 Apr 2001 02:14:00 -0000 Subject: bug fix for the reuse-problem in 5.0 Message-ID: <3AD17D1D.2020606@knuut.de> The attatched files fix the reuse problem with SN5.0. You need to copy those into /share/sourcenav/gui However there are alot of smal problems still in this release! I would name it as SN5.0Beta. khamis From khamis@knuut.de Mon Apr 9 02:17:00 2001 From: khamis@knuut.de (Khamis Abuelkomboz (UUNET)) Date: Mon, 09 Apr 2001 02:17:00 -0000 Subject: rebuild sourcenavigator in windows 98? References: Message-ID: <3AD17DC6.7060107@knuut.de> Ding wrote: > Hi, > I download the sourcenavigator SN50-010322-source.tar.gz, > I want to run it on windows98 ? can you tell me how to do that? > Thanks a lot > > Best Regards, > Ding xiaoxi unpack it to a destination directory and run /H-i686-pc-cygwin/bin/snavigator.exe I agree with you that this is too simple to get to :-) The people usually await a "setup.exe"... khamis From leonp@plris.com Mon Apr 9 08:11:00 2001 From: leonp@plris.com (leonp@plris.com) Date: Mon, 09 Apr 2001 08:11:00 -0000 Subject: bug fix for the reuse-problem in 5.0 References: <3AD17D1D.2020606@knuut.de> Message-ID: <5.0.2.1.0.20010409171311.03890a38@plris.com> At 11:13 09/04/01 +0200, you wrote: >The attatched files fix the reuse problem with SN5.0. >You need to copy those into /share/sourcenav/gui > >However there are alot of smal problems still in this release! >I would name it as SN5.0Beta. > >khamis Thank you very much!! The bug fix seems to work very well, especially in the part of greying out the "Reuse" item after the first change have been made! Also the logic of windows treatment looks to be very comfortable. Leon Pollak leonp@plris.com From leonp@plris.com Mon Apr 9 08:19:00 2001 From: leonp@plris.com (leonp@plris.com) Date: Mon, 09 Apr 2001 08:19:00 -0000 Subject: SN Doesn't recognize bool true/false References: <5.0.2.1.0.20010404155645.00af6248@plris.com> Message-ID: <5.0.2.1.0.20010409171926.00a9be88@plris.com> At 23:05 05/04/01 -0700, you wrote: >On Wed, 4 Apr 2001 leonp@plris.com wrote: > > > Hello, all. > > Does anybody know the cause that SN C-parser doesn't recognize > > "false" and "true" words (while do recognize "bool")? > > Thanks. > >Because it has not been implemented. Seriously, adding >support for this kind of thing is not hard at all, >someone just needs to sit down for 20 minutes and >actually do it. > >Why don't you try this patch out and see if it works for you? > >Index: c_high.l >=================================================================== >RCS file: /cvs/cvsfiles/devo/snavigator/hyper/c_high.l,v >retrieving revision 1.12 >diff -u -r1.12 c_high.l >--- c_high.l 2001/02/26 00:48:08 1.12 >+++ c_high.l 2001/04/06 06:03:26 >@@ -145,6 +145,7 @@ > else | > enum | > extern | >+false | > float | > for | > friend | >@@ -174,6 +175,7 @@ > template | > this | > throw | >+true | > try | > typedef | > union | > >Mo DeJong >Red Hat Inc I apologize for not to be able to test this yet - I still didn't forced myself to study the Windows installation of SN from sources - it was written somewhere several times, that it is a real pain (as all the Windows is). Yet, the patch seems to work, I did the debugging by my eyes. :-)) Leon Pollak leonp@plris.com From leonp@plris.com Mon Apr 9 08:38:00 2001 From: leonp@plris.com (leonp@plris.com) Date: Mon, 09 Apr 2001 08:38:00 -0000 Subject: A small feature proposal Message-ID: <5.0.2.1.0.20010409174118.0394f6a8@plris.com> I worked with the system which used to save with the window not only its last size+position but also the cursor position in a source file, state of scrolling and even the last marked text in this window. This feature was nice. Thanks. Leon Pollak leonp@plris.com From khamis@knuut.de Mon Apr 9 09:08:00 2001 From: khamis@knuut.de (Khamis Abuelkomboz (UUNET)) Date: Mon, 09 Apr 2001 09:08:00 -0000 Subject: bug fix for goto problem Message-ID: <3AD1DE49.7030500@knuut.de> since I want to work with SN5.0, because it's alot faster, I was forced to fix another nasty bug.... copy attatched to /share/sourcenav/gui khamis From spolk@redhat.com Mon Apr 9 11:01:00 2001 From: spolk@redhat.com (Syd Polk) Date: Mon, 09 Apr 2001 11:01:00 -0000 Subject: bug fix for the reuse-problem in 5.0 References: <3AD17D1D.2020606@knuut.de> Message-ID: <4.2.0.58.20010409110035.01987f00@pop.cygnus.com> Khamis, could you please post things in diff format? Thanks! At 11:13 AM 4/9/01 +0200, Khamis Abuelkomboz (UUNET) wrote: >The attatched files fix the reuse problem with SN5.0. >You need to copy those into /share/sourcenav/gui > >However there are alot of smal problems still in this release! >I would name it as SN5.0Beta. > >khamis > > ># Copyright (c) 2000, 2001, Red Hat, Inc. ># ># This file is part of Source-Navigator. ># ># Source-Navigator is free software; you can redistribute it and/or ># modify it under the terms of the GNU General Public License as published ># by the Free Software Foundation; either version 2, or (at your option) ># any later version. ># ># Source-Navigator is distributed in the hope that it will be useful, ># but WITHOUT ANY WARRANTY; without even the implied warranty of ># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ># General Public License for more details. ># ># You should have received a copy of the GNU General Public License along ># with Source-Navigator; see the file COPYING. If not, write to ># the Free Software Foundation, 59 Temple Place - Suite 330, Boston, ># MA 02111-1307, USA. ># >################################################ >## >## Window with all availiable tools by SN >## Copyright (c) 1999 Cygnus Solutions, Inc. >## >################################################ > >## Short cuts: >## edit == editor >## classbr == class browser >## ctree == Class Hierarchy >## xref == cross reference >## incbr == include browser >## dbg == Debug >## retr == Retriever >## grep == Grep >## make == Make >#global for the hole project > >itcl::class MultiWindow& { > global sn_options sn_elix > > inherit sourcenav::Window > > constructor {args} { > global sn_options > > # Setup some default behavior for the MultiWindow. > > ${this} withdraw > ${this} on_close "${this} windows_close dummy" > # Don't close window by hitting Escape. > ${this} bind_tk {;} > > # Init variables to nagivate between view points. > set view_positions(next) "" > set view_positions(prev) "" > > eval itk_initialize $args > > # Add menu. > AddMenu > > # Add the toolbar. > AddToolbar > > # Add statusbar. > AddStatusbar > > # Add the main notebook. > itk_component add notebook { > tixNoteBook $itk_component(hull).nbook -ipadx 0 -ipady 0 > } { } > > # Configure the big bad notebook widget. > set NotebookFrame [$itk_component(notebook) subwidget nbframe] > ${NotebookFrame} config -inactivebackground lightgray > > # Add the pages to the notebook widget. > $itk_component(notebook) add edit\ > -raisecmd [itcl::code ${this} RaiseEditor]\ > -label [get_indep String MultiEditor]\ > -under [get_indep Pos MultiEditor]\ > -state [tool_Exists edit] > > AddEditor $itk_component(notebook) edit > > $itk_component(notebook) add ctree\ > -raisecmd [itcl::code ${this} RaiseClassHierarchy]\ > -image tree_image\ > -label [get_indep String MultiClassHierarchy]\ > -under [get_indep Pos MultiClassHierarchy]\ > -state [tool_Exists ctree] > > AddClassHierarchy $itk_component(notebook) ctree > > $itk_component(notebook) add classbr\ > -raisecmd [itcl::code ${this} RaiseClassBrowser]\ > -label [get_indep String MultiClass]\ > -under [get_indep Pos MultiClass]\ > -state [tool_Exists classbr] > > AddClassBrowser $itk_component(notebook) classbr > > $itk_component(notebook) add xref \ > -raisecmd [itcl::code ${this} RaiseXReference]\ > -label [get_indep String MultiXRef]\ > -under [get_indep Pos MultiXRef]\ > -state [tool_Exists xref] > > AddXReference $itk_component(notebook) xref > > $itk_component(notebook) add incbr\ > -raisecmd [itcl::code ${this} RaiseInclude]\ > -label [get_indep String MultiInclude]\ > -under [get_indep Pos MultiInclude]\ > -state [tool_Exists incbr] > > AddInclude $itk_component(notebook) incbr > > $itk_component(notebook) add retr\ > -raisecmd [itcl::code ${this} RaiseRetriever]\ > -label [get_indep String MultiRetriever]\ > -under [get_indep Pos MultiRetriever]\ > -state [tool_Exists retr] > > AddRetriever $itk_component(notebook) retr > > $itk_component(notebook) add grep \ > -raisecmd [itcl::code ${this} RaiseGrep] \ > -label [get_indep String MultiGrep] \ > -under [get_indep Pos MultiGrep] \ > -state [tool_Exists grep] > > AddGrep $itk_component(notebook) grep > > pack $itk_component(notebook) -fill both -side left -expand y > -anchor nw > > $itk_component(notebook) raise $itk_option(-raise) > > #call user function > catch {sn_rc_mainwindow $itk_component(hull) $itk_component(menu)} > update idletasks > after idle "${this} deiconify" > } > > destructor { > foreach v [::info globals "${this}-*"] { > catch {uplevel #0 unset ${v}} > } > } > > protected variable Activate_executed 0 > > # Activate different notebook page: > # save filter options for the actual tool and > # restore those for the activated tool (notebook page) > > method Activate {page paned pane tool} { > # FIXME: Shouldn't this be in sn_options array? > global Switch_Is_Enabled > > upvar #0 ${SymbolsFilter}-related related > upvar #0 ${tool}-related toolrel > > incr Activate_executed > > set old_view ${ActiveWidget} > > #save related for now active tool > if {${ActiveWidget} != ""} { > upvar #0 ${ActiveWidget}-related rel > ::set rel ${related} > > #dump current position > history_stack_add_point ${ActiveWidget} > } > > #save filter flags for the active widget (radios and checkbuttons) > foreach btn [eval list $AllFilterOptions(radio)\ > $AllFilterOptions(checkbutton)] { > set variable [${btn} cget -variable] > upvar #0 ${variable} value > upvar #0 ${ActiveWidget}-Filter(${btn}) var > ::set var ${value} > } > > #get selection from current tool, only when keep > #is seted or the global variable to disable switching > #is on > if {${keep} && ${Switch_Is_Enabled} > 0 && ${ActiveWidget} != ""} { > set sel [${ActiveWidget} Selection] > } else { > set sel "" > } > > > #deactivate current notepad > if {$ActiveWidget != ""} { > $ActiveWidget deactivate > } > > #hide editor buttons, we must hide it first, > #to enable the icons of the next view as first > #and if an editor is availiable we put the toolbar > #buttons on the far right side of the toolbar > if {[${tool} whoami] != "edit"} { > pack forget ${FindEditFr} > } > > #restore the information about related > if {[catch {::set related ${toolrel}}]} { > if {[${tool} whoami] == "edit"} { > ::set related 1 > } else { > ::set related 0 > } > } > > set ActiveWidget ${tool} > set ActivePage ${page} > set ActivePaned ${paned} > set ActivePane ${pane} > > #restore the values of the filter checkbuttons and radios > foreach btn [eval list $AllFilterOptions(radio)\ > $AllFilterOptions(checkbutton)] { > catch { > set variable [${btn} cget -variable] > upvar #0 ${variable} var > upvar #0 ${ActiveWidget}-Filter(${btn}) value > ::set var ${value} > } > } > > # Delete contents of drop down list > $itk_component(symbolcombo) configure -contents "" > $itk_component(symbolcombo) selecttext "" > > ${ActiveWidget} activate > #if there is a selection, goto it > if {${sel} != ""} { > ::eval ${ActiveWidget} gotosymbol ${sel} 0 > } > ${ActiveWidget} SetTitle > ${ActiveWidget} Focus > > #verify if we have an editor to display the toolbar > #icons > DeActivate_Editor_buttons > > #call user function > catch {sn_rc_changeview ${this} ${ActiveWidget} ${old_view}} > } > > #View toolbar buttons for the editor, if an editor is > #availiable > method DeActivate_Editor_buttons {} { > if {[list_find_editor ${ActiveWidget}] != ""} { > pack ${FindEditFr} -side left > } else { > pack forget ${FindEditFr} > } > } > > ##################################################### > # create editor > ##################################################### > method AddEditor {nb page} { > global sn_options > > itk_component add editor_page { > ${nb} subwidget ${page} > } { } > > $itk_component(editor_page) configure -bg white > > itk_component add editorpaned { > tixPanedWindow $itk_component(editor_page).paned\ > -paneborderwidth 0\ > -orientation $sn_options(def,window-alighment) > } { } > > itk_component add editorpane { > $itk_component(editorpaned) add edit -size 500 > } { } > > itk_component add editor { > Editor& $itk_component(editorpane).editor\ > -symbols $itk_component(symbolcombo)\ > -symbols_filter ${SymbolsFilter}\ > -menu $itk_component(menu)\ > -toolbar ""\ > -mesg_area $itk_component(statusbar)\ > -message_var [itcl::scope message]\ > -linenumber_var [itcl::scope linenum] \ > -filename ${symbolname}\ > -findcombo ${FindCombo} \ > -parent $this > } { } > > pack $itk_component(editor) -fill both -expand y > pack $itk_component(editorpaned) -fill both -expand y > > lappend AvailTools $itk_component(editor) > > # Just creating it, might not want to use it just yet. > $itk_component(editor) deactivate > } > > method RaiseEditor {} { > Activate $itk_component(editor_page) $itk_component(editorpaned)\ > $itk_component(editorpane) $itk_component(editor) > } > > ##################################################### > # Class hierarchy > ##################################################### > method AddClassHierarchy {nb page} { > global sn_options > > itk_component add classtree_page { > ${nb} subwidget ${page} > } { } > > itk_component add classtreepaned { > tixPanedWindow $itk_component(classtree_page).paned\ > -paneborderwidth 0\ > -orientation $sn_options(def,window-alighment) > } { } > > itk_component add classtreepane { > $itk_component(classtreepaned) add ctree > } { } > > itk_component add classtree { > ClassTree& $itk_component(classtreepane).classtree\ > -symbols $itk_component(symbolcombo)\ > -symbols_filter $SymbolsFilter\ > -menu $itk_component(classtree_menu)\ > -toolbar $itk_component(toolbar)\ > -message_var [itcl::scope message]\ > -doubleclickcommand "${this} ClassHierarchyEdit" \ > -parent $this > } { } > > pack $itk_component(classtree) -fill both -expand y > pack $itk_component(classtreepaned) -fill both -expand y > > lappend AvailTools $itk_component(classtree) > > # Just creating it, might not want to use it just yet. > $itk_component(classtree) deactivate > } > > method RaiseClassHierarchy {} { > Activate $itk_component(classtree_page) > $itk_component(classtreepaned)\ > $itk_component(classtreepane) $itk_component(classtree) > } > > method ClassHierarchyEdit {{scope ""} {sym ""} {cls ""} {file ""} {from\ > ""} {type ""} {prm ""} {to ""} {always 1}} { > sn_retrieve_symbol ${sym} ${scope} > } > > ##################################################### > # Class Browser > ##################################################### > method AddClassBrowser {nb page} { > global sn_options > > itk_component add class_page { > ${nb} subwidget ${page} > } { } > > itk_component add classpaned { > tixPanedWindow $itk_component(class_page).paned\ > -paneborderwidth 0\ > -orientation $sn_options(def,window-alighment) > } { } > > itk_component add classpane { > $itk_component(classpaned) add classbr > } { } > > itk_component add classbrowser { > Class& $itk_component(classpane).classbrowser\ > -symbols $itk_component(symbolcombo)\ > -symbols_filter ${SymbolsFilter}\ > -menu $itk_component(classbrowser_menu)\ > -toolbar $itk_component(toolbar)\ > -mesg_area $itk_component(statusbar)\ > -class_doubleclickcommand\ > [itcl::code ${this} ClassBrowserEditClass]\ > -doubleclickcommand [itcl::code ${this} EditObject] \ > -parent $this > } { } > > pack $itk_component(classbrowser) -fill both -expand y > pack $itk_component(classpaned) -fill both -expand y > > lappend AvailTools $itk_component(classbrowser) > > # Just creating it, might not want to use it just yet. > $itk_component(classbrowser) deactivate > } > > method RaiseClassBrowser {} { > Activate $itk_component(class_page) $itk_component(classpaned)\ > $itk_component(classpane) $itk_component(classbrowser) > } > > method ClassBrowserEditClass {class} { > sn_retrieve_symbol ${class} "cl" "" -beg 1 1 > } > > method EditObject {{scope ""} {sym ""} {cls ""} {file ""} {from ""} > {type\ > ""} {prm ""} {to ""} {always 1}} { > global sn_sep > > #to look in the database, use sn_sep > set lbl [string trim "${cls}${sn_sep}${sym}" " \t${sn_sep}"] > > if {${lbl} == "" && ${file} == ""} { > bell > return > } > > #we must try to find the correct symbol, so we have to > #accept the parameter list also. > set cnt [read_matched_from_db "" ${scope} -exact ${lbl} ${type} > ${prm}\ > ${file} ${from} ${to} 0] > if {${cnt} == "" && ${file} == ""} { > set cnt [read_matched_from_db "" ${scope} -exact ${lbl}] > } > if {${cnt} != ""} { > set file [lindex [split [lindex ${cnt} 0] \t] 4] > set from [lindex [split [lindex ${cnt} 0] \t] 5] > } > if {${file} != ""} { > #use blank as separator > set lbl [string trim "${cls} ${sym}"] > sn_edit_file [list 0 ${lbl} ${scope}] ${file} ${from} 1 > } else { > bell > return > } > } > > ##################################################### > # X reference > ##################################################### > method AddXReference {nb page} { > global sn_options > > itk_component add xref_page { > ${nb} subwidget ${page} > } { } > > itk_component add xrefpaned { > tixPanedWindow $itk_component(xref_page).paned\ > -paneborderwidth 0\ > -orientation $sn_options(def,window-alighment) > } { } > > itk_component add xrefpane { > $itk_component(xrefpaned) add xref > } { } > > itk_component add xref { > XRef& $itk_component(xrefpane).xref\ > -symbols $itk_component(symbolcombo)\ > -symbols_filter ${SymbolsFilter}\ > -menu $itk_component(xref_menu)\ > -toolbar $itk_component(toolbar)\ > -message_var [itcl::scope message]\ > -doubleclickcommand [itcl::code ${this} EditObject] \ > -parent ${this} > } { } > > pack $itk_component(xref) -fill both -expand y > pack $itk_component(xrefpaned) -fill both -expand y > > lappend AvailTools $itk_component(xref) > > # Just creating it, might not want to use it just yet. > $itk_component(xref) deactivate > } > > method RaiseXReference {} { > Activate $itk_component(xref_page) $itk_component(xrefpaned)\ > $itk_component(xrefpane) $itk_component(xref) > } > > ##################################################### > # Include > ##################################################### > method AddInclude {nb page} { > global sn_options > > itk_component add include_page { > ${nb} subwidget ${page} > } { } > > itk_component add includepaned { > tixPanedWindow $itk_component(include_page).paned\ > -paneborderwidth 0\ > -orientation $sn_options(def,window-alighment) > } { } > > itk_component add includepane { > $itk_component(includepaned) add inc > } { } > > itk_component add include { > Include& $itk_component(includepane).incbr\ > -symbols $itk_component(symbolcombo)\ > -symbols_filter ${SymbolsFilter}\ > -menu $itk_component(include_menu)\ > -toolbar $itk_component(toolbar)\ > -mesg_area $itk_component(statusbar) \ > -parent $this > } { } > > pack $itk_component(include) -fill both -expand y > pack $itk_component(includepaned) -fill both -expand y > > lappend AvailTools $itk_component(include) > > # Just creating it, might not want to use it just yet. > $itk_component(include) deactivate > } > > method RaiseInclude {} { > Activate $itk_component(include_page) $itk_component(includepaned)\ > $itk_component(includepane) $itk_component(include) > } > > ##################################################### > # Retriever > ##################################################### > method AddRetriever {nb page} { > global sn_options > > itk_component add retriever_page { > ${nb} subwidget ${page} > } { } > > itk_component add retrieverpaned { > tixPanedWindow $itk_component(retriever_page).paned\ > -paneborderwidth 0\ > -orientation $sn_options(def,window-alighment) > } { } > > itk_component add retrieverpane { > $itk_component(retrieverpaned) add retr > } { } > > itk_component add retriever { > Retr& $itk_component(retrieverpane).retr\ > -symbols $itk_component(symbolcombo)\ > -symbols_filter ${SymbolsFilter}\ > -menu RetrieverMenu\ > -toolbar $itk_component(toolbar)\ > -mesg_area $itk_component(statusbar) \ > -parent $this > } { } > > pack $itk_component(retriever) -fill both -expand y > pack $itk_component(retrieverpaned) -fill both -expand y > > lappend AvailTools $itk_component(retriever) > > # Just creating it, might not want to use it just yet. > $itk_component(retriever) deactivate > } > > method RaiseRetriever {} { > Activate $itk_component(retriever_page) > $itk_component(retrieverpaned)\ > $itk_component(retrieverpane) $itk_component(retriever) > } > > method retr {} { > return $itk_component(retriever) > } > > ##################################################### > # Grep > ##################################################### > method AddGrep {nb page} { > global sn_options > > itk_component add grep_page { > ${nb} subwidget ${page} > } {} > > itk_component add greppaned { > tixPanedWindow $itk_component(grep_page).paned \ > -paneborderwidth 0 \ > -orientation $sn_options(def,window-alighment) > } {} > > itk_component add greppane { > $itk_component(greppaned) add grep > } > > itk_component add grep { > Grep $itk_component(greppane).grep \ > -symbols $itk_component(symbolcombo) \ > -symbols_filter ${SymbolsFilter} \ > -menu GrepMenu \ > -toolbar $itk_component(toolbar) \ > -mesg_area $itk_component(statusbar) \ > -parent $this > } {} > > pack $itk_component(grep) -fill both -expand y > pack $itk_component(greppaned) -fill both -expand y > > lappend AvailTools $itk_component(grep) > > # Just creating it, might not want to use it just yet. > $itk_component(grep) deactivate > } > > method RaiseGrep {} { > Activate $itk_component(grep_page) $itk_component(greppaned)\ > $itk_component(greppane) $itk_component(grep) > } > > ##################################################### > # Make > ##################################################### > # FIXME: This currently isn't used, but it should probably > # be used (at some point). > > method AddMake {nb page} { > global sn_options > > itk_component add make_page { > ${nb} subwidget ${page} > } { } > > itk_component add makepaned { > tixPanedWindow $itk_component(make_page).paned\ > -paneborderwidth 0\ > -orientation $sn_options(def,window-alighment) > } { } > > itk_component add makepane { > $itk_component(makepaned) add make > } { } > > itk_component add make { > Make $itk_component(makepane).make\ > -symbols $itk_component(symbolcombo)\ > -symbols_filter ${SymbolsFilter}\ > -menu MakeMenu\ > -toolbar $itk_component(toolbar)\ > -mesg_area $itk_component(statusbar) > } { } > pack $itk_component(make) -fill both -expand y > pack $itk_component(makepaned) -fill both -expand y > > lappend AvailTools $itk_component(make) > } > > method RaiseMake {} { > Activate $itk_component(make_page) $itk_component(makepaned)\ > $itk_component(makepane) $itk_component(make) > } > > method AddMenu {} { > global sn_options > > set state normal > > itk_component add menu { > menu $itk_component(hull).menu -tearoff 0 > } > > ## File menu > #################### > > itk_component add file_menu { > menu $itk_component(menu).file -tearoff 0 -postcommand\ > [itcl::code ${this} file_post $itk_component(menu).file] > } > > $itk_component(file_menu) configure -font > $sn_options(def,layout-font) > > $itk_component(menu) add cascade -label [get_indep String EditFile]\ > -menu $itk_component(file_menu) -underline [get_indep Pos > EditFile] > > $itk_component(file_menu) add command\ > -label [get_indep String EditNewFile]\ > -underline [get_indep Pos EditNewFile] -accelerator "Ctrl+N"\ > -command [itcl::code ${this} file_new] > > $itk_component(file_menu) add command\ > -label [get_indep String Open]\ > -underline [get_indep Pos Open] -accelerator "Ctrl+O"\ > -command [itcl::code ${this} file_open] > > $itk_component(file_menu) add separator > > #Add project menu > AddProjectMenuEntries $itk_component(file_menu) ${this} 1 > > $itk_component(file_menu) add separator > > #File commands > $itk_component(file_menu) add command\ > -accelerator "Ctrl+S"\ > -label [get_indep String EditSave]\ > -underline [get_indep Pos EditSave]\ > -command "[itcl::code ${this} file_save]" > > $itk_component(file_menu) add command\ > -label [get_indep String EditSaveFileAs]\ > -underline [get_indep Pos EditSaveFileAs]\ > -command [itcl::code ${this} file_saveas] > > $itk_component(file_menu) add command\ > -accelerator "$sn_options(sys,alt-accelpref)+S"\ > -label [get_indep String EditFastSave]\ > -underline [get_indep Pos EditFastSave]\ > -command "[itcl::code ${this} file_fastsave]" > > $itk_component(file_menu) add command\ > -accelerator "$sn_options(sys,alt-accelpref)+A"\ > -label [get_indep String EditSaveAll]\ > -underline [get_indep Pos EditSaveAll]\ > -command "[itcl::code ${this} file_saveall]" > > $itk_component(file_menu) add command\ > -label [get_indep String Revert]\ > -underline [get_indep Pos Revert]\ > -command [itcl::code ${this} file_revert] > > $itk_component(file_menu) add separator > > $itk_component(file_menu) add command\ > -label [get_indep String Print]\ > -accelerator "Ctrl+P" -underline [get_indep Pos Print]\ > -command [itcl::code ${this} file_print] > > $itk_component(file_menu) add separator > > #close window > $itk_component(file_menu) add command\ > -command [itcl::code ${this} windows_close > $itk_component(file_menu)]\ > -label [get_indep String WindowsClose] -accelerator "Ctrl+W"\ > -underline [get_indep Pos WindowsClose] > > $itk_component(file_menu) add command -label [get_indep String Exit]\ > -underline [get_indep Pos Exit] -accelerator "Ctrl+Q"\ > -command " sn_exit " > > ## Edit menu > ############# > > itk_component add edit_menu { > menu $itk_component(menu).edit -tearoff 0\ > -postcommand [itcl::code ${this} edit_post > $itk_component(menu).edit] > } > > $itk_component(edit_menu) configure -font > $sn_options(def,layout-font) > > $itk_component(menu) add cascade -label [get_indep String EditEdit]\ > -menu $itk_component(edit_menu) -underline [get_indep Pos > EditEdit] > > $itk_component(edit_menu) add command\ > -label [get_indep String EditUndo]\ > -underline [get_indep Pos EditUndo] -accelerator "Ctrl+Z"\ > -command [itcl::code ${this} edit_undo] -state ${state} > > $itk_component(edit_menu) add command\ > -label [get_indep String EditRedo]\ > -underline [get_indep Pos EditRedo] -accelerator "Ctrl+Y"\ > -command [itcl::code ${this} edit_redo] -state ${state} > > $itk_component(edit_menu) add separator > > $itk_component(edit_menu) add command\ > -label [get_indep String EditCut]\ > -underline [get_indep Pos EditCut] -accelerator "Ctrl+X"\ > -command [itcl::code ${this} edit_cut] -state ${state} > > $itk_component(edit_menu) add command\ > -label [get_indep String EditCopy]\ > -underline [get_indep Pos EditCopy] -accelerator "Ctrl+C"\ > -command [itcl::code ${this} edit_copy] > > $itk_component(edit_menu) add command\ > -label [get_indep String EditPaste]\ > -underline [get_indep Pos EditPaste] -accelerator "Ctrl+V"\ > -state ${state}\ > -command [itcl::code ${this} edit_paste] > > $itk_component(edit_menu) add command\ > -label [get_indep String EditDelete]\ > -underline [get_indep Pos EditDelete] -accelerator "Ctrl+D"\ > -command [itcl::code ${this} edit_delete] -state ${state} > > $itk_component(edit_menu) add command\ > -label [get_indep String SelectAll]\ > -underline [get_indep Pos SelectAll]\ > -command [itcl::code ${this} edit_selectall] > > $itk_component(edit_menu) add command\ > -label [get_indep String EditClear]\ > -underline [get_indep Pos EditClear]\ > -command [itcl::code ${this} edit_clear]\ > -state ${state} > > $itk_component(edit_menu) add separator > > $itk_component(edit_menu) add command\ > -label [get_indep String EditInsertFile]\ > -underline [get_indep Pos EditInsertFile]\ > -command [itcl::code ${this} edit_insert] > > $itk_component(edit_menu) add separator > > $itk_component(edit_menu) add command\ > -label [get_indep String EditIdent]\ > -underline [get_indep Pos EditIdent] -accelerator "Ctrl+>"\ > -command "[itcl::code ${this} edit_indent indent]" > > $itk_component(edit_menu) add command\ > -label [get_indep String EditOutdent]\ > -underline [get_indep Pos EditOutdent] -accelerator "Ctrl+<"\ > -command "[itcl::code ${this} edit_indent outdent]" > > $itk_component(edit_menu) add separator > > $itk_component(edit_menu) add command\ > -label [get_indep String EditPreferences]\ > -underline [get_indep Pos EditPreferences]\ > -command [itcl::code ${this} edit_preferences 0] > > #Search menu > itk_component add search_menu { > menu $itk_component(menu).search -tearoff 0\ > -postcommand [itcl::code ${this} search_post\ > $itk_component(menu).search] > } > > $itk_component(search_menu) configure -font > $sn_options(def,layout-font) > > $itk_component(menu) add cascade -label [get_indep String Search]\ > -underline [get_indep Pos Search]\ > -menu $itk_component(search_menu) > > $itk_component(search_menu) add command\ > -label [get_indep String SearchFind]\ > -underline [get_indep Pos SearchFind] -accelerator "Ctrl+F"\ > -command [itcl::code ${this} search_findtext] > > $itk_component(search_menu) add command\ > -label [get_indep String SearchNext]\ > -underline [get_indep Pos SearchNext] -accelerator "F3"\ > -command [itcl::code ${this} search_next] > > $itk_component(search_menu) add command\ > -label [get_indep String SearchPrev]\ > -underline [get_indep Pos SearchPrev] -accelerator > "Shift+F3"\ > -command [itcl::code ${this} search_prev] > > $itk_component(search_menu) add command\ > -label [get_indep String SearchReplace]\ > -underline [get_indep Pos SearchReplace]\ > -command [itcl::code ${this} search_replace] -state ${state} > > $itk_component(search_menu) add separator > > $itk_component(search_menu) add command\ > -accelerator "$sn_options(sys,alt-accelpref)+D" -label\ > [get_indep String SearchDefinition]\ > -underline [get_indep Pos SearchDefinition]\ > -command [itcl::code ${this} search_definition]\ > -state ${state} > > $itk_component(search_menu) add command\ > -accelerator "$sn_options(sys,alt-accelpref)+I"\ > -label [get_indep String SearchImplementation]\ > -underline [get_indep Pos SearchImplementation]\ > -command [itcl::code ${this} search_implementation]\ > -state ${state} > > $itk_component(search_menu) add separator > > $itk_component(search_menu) add command\ > -accelerator "Ctrl+Shift+G"\ > -label [get_indep String SearchGrep]\ > -underline [get_indep Pos SearchGrep]\ > -command "${this} search_grep" > > $itk_component(search_menu) add separator > > #Add a separate Goto sub menu > itk_component add goto_menu { > menu $itk_component(search_menu).goto -tearoff 0\ > -postcommand [itcl::code ${this} search_goto_post\ > $itk_component(search_menu).goto] > } > > $itk_component(search_menu) add cascade\ > -label [get_indep String Goto]\ > -underline [get_indep Pos Goto]\ > -menu $itk_component(goto_menu) > > $itk_component(goto_menu) add command\ > -label [get_indep String SearchGotoLine]\ > -underline [get_indep Pos SearchGotoLine]\ > -accelerator "Ctrl+G"\ > -command [itcl::code ${this} search_gotoline] > > $itk_component(goto_menu) add separator > > $itk_component(goto_menu) add command\ > -label [get_indep String SearchSetMark]\ > -underline [get_indep Pos SearchSetMark]\ > -accelerator "Ctrl+Space"\ > -command [itcl::code ${this} search_setmark] > > $itk_component(goto_menu) add command\ > -label [get_indep String SearchGotoMark]\ > -underline [get_indep Pos SearchGotoMark]\ > -accelerator "Ctrl+M"\ > -command [itcl::code ${this} search_gotomark] > ># FIXME: targeted for removal > > $itk_component(goto_menu) add command\ > -label [get_indep String SearchGotoError]\ > -underline [get_indep Pos SearchGotoError]\ > -accelerator "Shift+Ctrl+E"\ > -command "MultiWindow&::search_gotoerror" > > > ## Tools menu column > itk_component add tools_menu { > menu $itk_component(menu).tools -tearoff 0\ > -postcommand [itcl::code ${this} tools_post\ > $itk_component(menu).tools] > } > > $itk_component(tools_menu) configure -font > $sn_options(def,layout-font) > > $itk_component(menu) add cascade\ > -label [get_indep String Tools]\ > -menu $itk_component(tools_menu)\ > -underline [get_indep Pos Tools] > > ############################################################ > ## Editor > ############################################################ > > ############################################################ > ## Class Hierarchy > ############################################################ > > itk_component add classtree_menu { > menu $itk_component(tools_menu).ctree -tearoff 0\ > -postcommand [itcl::code ${this} tools_ctree_post\ > $itk_component(tools_menu).ctree] > } > > $itk_component(tools_menu) add cascade\ > -label [get_indep String MultiClassHierarchy]\ > -menu $itk_component(classtree_menu)\ > -underline [get_indep Pos MultiClassHierarchy]\ > -state disabled > > ############################################################ > ## Class Browser > ############################################################ > > itk_component add classbrowser_menu { > menu $itk_component(tools_menu).class -tearoff 0\ > -postcommand [itcl::code ${this} tools_classbr_post\ > $itk_component(tools_menu).class] > } > > $itk_component(tools_menu) add cascade\ > -label [get_indep String MultiClass]\ > -menu $itk_component(classtree_menu)\ > -underline [get_indep Pos MultiClass] -state disabled > > ############################################################ > ## Cross reference > ############################################################ > > itk_component add xref_menu { > menu $itk_component(tools_menu).xref -tearoff 0\ > -postcommand [itcl::code ${this} tools_xref_post\ > $itk_component(tools_menu).xref] > } > > $itk_component(tools_menu) add cascade\ > -label [get_indep String MultiXRef]\ > -menu $itk_component(xref_menu)\ > -underline [get_indep Pos MultiXRef] -state disabled > > ############################################################ > ## Include > ############################################################ > > itk_component add include_menu { > menu $itk_component(tools_menu).incbr -tearoff 0\ > -postcommand [itcl::code ${this} tools_incbr_post\ > $itk_component(tools_menu).incbr] > } > $itk_component(tools_menu) add cascade\ > -label [get_indep String MultiInclude]\ > -menu $itk_component(include_menu)\ > -underline [get_indep Pos MultiInclude]\ > -state disabled > > $itk_component(tools_menu) add separator > > ## Miscellaneous Tools and IDE features > AddMiscSubMenu $itk_component(tools_menu) > > ## Revision control > $itk_component(tools_menu) add separator > > itk_component add rc_menu { > menu $itk_component(tools_menu).rc -tearoff 0 > } > > $itk_component(tools_menu) add cascade\ > -label [get_indep String RCS]\ > -underline [get_indep Pos RCS]\ > -state ${state} -menu $itk_component(rc_menu) > > $itk_component(rc_menu) configure -font $sn_options(def,layout-font) > > $itk_component(rc_menu) add command\ > -label [get_indep String ChooseCheckOut]\ > -underline [get_indep Pos ChooseCheckOut]\ > -command [itcl::code ${this} Handle_Rcs sn_rcs_checkout] > > $itk_component(rc_menu) add command\ > -label [get_indep String ChooseCheckIn]\ > -underline [get_indep Pos ChooseCheckIn]\ > -command [itcl::code ${this} Handle_Rcs sn_rcs_checkin] > > $itk_component(rc_menu) add command\ > -label [get_indep String ChooseDiscard]\ > -underline [get_indep Pos ChooseDiscard]\ > -command [itcl::code ${this} Handle_Rcs sn_rcs_discard] > > $itk_component(rc_menu) add command\ > -label [get_indep String ChooseLock]\ > -underline [get_indep Pos ChooseLock]\ > -command [itcl::code ${this} Handle_Rcs\ > "sn_rcs_lockunlockdel lock"] > > $itk_component(rc_menu) add command\ > -label [get_indep String ChooseUnlock]\ > -underline [get_indep Pos ChooseUnlock]\ > -command [itcl::code ${this} Handle_Rcs\ > "sn_rcs_lockunlockdel unlock"] > > $itk_component(rc_menu) add separator > > $itk_component(rc_menu) add command\ > -label [get_indep String ChooseDiff]\ > -underline [get_indep Pos ChooseDiff]\ > -command [itcl::code ${this} Handle_Rcs "sn_rcs_diff > ${this}"] > > #revision control editor > $itk_component(rc_menu) add separator > > $itk_component(rc_menu) add command\ > -label [get_indep String RevisionControlEditor]\ > -underline [get_indep Pos RevisionControlEditor]\ > -command " sn_revision_ctrl " > > ## History > AddHistMenu $itk_component(menu) > > ##Windows > AddWindowsMenu $itk_component(menu) ${this} 1 1 > > ##Help menu > AddHelpMenu $itk_component(menu) $itk_component(hull) > > ${this} configure -menu $itk_component(menu) > } > > method AddToolbar {} { > > itk_component add toolbar { > frame $itk_component(hull).toolbar -takefocus 0\ > -relief groove -border 2 > } > > #prev/next buttons > itk_component add hist_prev { > button $itk_component(toolbar).prev\ > -image prev_image\ > -takefocus 0\ > -command [itcl::code ${this} history_stack_goto_point > prev] > } > > bind $itk_component(hist_prev) <3>\ > [itcl::code ${this} toolbar_post_history_stack prev\ > $itk_component(hist_prev)] > > balloon_bind_info $itk_component(hist_prev)\ > [get_indep String GotoPrevPosition] > > pack $itk_component(hist_prev) -side left > > itk_component add hist_next { > button $itk_component(toolbar).next\ > -image next2_image\ > -takefocus 0\ > -command [itcl::code ${this} history_stack_goto_point > next] > } > > bind $itk_component(hist_next) <3> [itcl::code ${this}\ > toolbar_post_history_stack next $itk_component(hist_next)] > > balloon_bind_info $itk_component(hist_next)\ > [get_indep String GotoNextPosition] > > pack $itk_component(hist_next) -side left > > history_stack_control_buttons > > #combobox for the file symbols > itk_component add symbolcombo { > Combo& $itk_component(toolbar).symbolcombo \ > -width 26 \ > -entryballoon [get_indep String ActiveSymbol] \ > -buttonballoon [get_indep String ListRelatedSymbols] \ > -selectcommand [itcl::code $this toolbar_display_selected > $itk_component(toolbar).symbolcombo] > } { } > > pack $itk_component(symbolcombo) -side left -fill x -padx 2 > > # FIXME: Does this actually need to pass parameters? > Add_Symbol_Filter $itk_component(toolbar) > > #add/create editor command buttons > Add_Editor_Buttons $itk_component(toolbar) > > pack $itk_component(toolbar) -side top -fill x > } > > method Add_Symbol_Filter {exp} { > global combobox_editor_scopes > > # Add symbols filter to the right side of the combobox > > set extended [$itk_component(symbolcombo) component extended] > ># FIXME: This SymbolsFilter, opt, itk_component(symbolfilter) ># variable duplication needs to be cleaned up > set opt $extended.symfilter > set SymbolsFilter ${opt} > > $itk_component(symbolcombo) configure \ > -postcommand [itcl::code $this toolbar_post_scope_menu $opt] > > if {[winfo exists ${opt}]} { > destroy ${opt} > } > > itk_component add symbolfilter { > frame ${opt} > } > > pack ${opt} -fill both -expand true > > > #Radiobuttons (Related,All) > # FIXME: this should be a private variable (use "scope"). > uplevel #0 "set ${opt}-related 1" > > radiobutton ${opt}.related -anchor w -text [get_indep String > Related]\ > -command " ${this} toolbar_symbols"\ > -variable ${opt}-related -value 1 > > pack ${opt}.related -side top -fill x -expand y > lappend AllFilterOptions(radio) ${opt}.related > radiobutton ${opt}.all -anchor w -text [get_indep String All]\ > -command " ${this} toolbar_symbols"\ > -variable ${opt}-related -value 0 > pack ${opt}.all -side top -fill x -expand y > lappend AllFilterOptions(radio) ${opt}.all > > #Buttons (All,None) > frame ${opt}.btns > button ${opt}.btns.all -anchor w -text [get_indep String All]\ > -command " ${this} toolbar_symbols 1 " > pack ${opt}.btns.all -side left -fill x -expand y > lappend AllFilterOptions(button) ${opt}.btns.all > > button ${opt}.btns.none -anchor w -text [get_indep String None]\ > -command " ${this} toolbar_symbols -1 " > pack ${opt}.btns.none -side right -fill x -expand y > lappend AllFilterOptions(button) ${opt}.btns.none > > pack ${opt}.btns -side top -fill x -expand y > > #Filter options (cl,com,fd,fu,...) > foreach sc [lsort [array names combobox_editor_scopes]] { > uplevel #0 "set ${opt}-${sc} ${sc}" > checkbutton ${opt}.${sc} -anchor w -text\ > [convert_scope_to_str ${sc}] -command " ${this} > toolbar_symbols\ > " -variable ${opt}-${sc} -onvalue ${sc}\ > -offvalue "off" > pack ${opt}.${sc} -side top -fill x -expand y > lappend AllFilterOptions(checkbutton) ${opt}.${sc} > } > #Add checkbutton for undefined symbols (xref only) > checkbutton ${opt}.ud -anchor w -text [convert_scope_to_str ud]\ > -command " ${this} toolbar_symbols "\ > -variable ${opt}-ud -onvalue ud -offvalue off > lappend AllFilterOptions(checkbutton) ${opt}.ud > pack ${opt}.ud -side top -fill x -expand y > } > > #add editor commands > method Add_Editor_Buttons {exp} { > global sn_options > global tcl_platform > > set FindEditFr ${exp}.editfr > pack [frame ${FindEditFr}] -fill x > pack [frame ${FindEditFr}.grap1 -width 5] -side left > > #add new/open/save/print/copy/paste/undo > if {$sn_options(def,edit-more-buttons)} { > button ${FindEditFr}.new -takefocus 0 -image new_image -command\ > " ${this} file_new " > balloon_bind_info ${FindEditFr}.new [get_indep String > NewFileINFO] > pack ${FindEditFr}.new -side left > > button ${FindEditFr}.open -image open_image -takefocus 0\ > -command " ${this} file_open " > balloon_bind_info ${FindEditFr}.open [get_indep String\ > EINFOOpenFile] > pack ${FindEditFr}.open -side left > > #save > button ${FindEditFr}.save -image save_image -takefocus 0\ > -command " ${this} file_save " > balloon_bind_info ${FindEditFr}.save [get_indep String\ > EINFOSaveChanges] > pack ${FindEditFr}.save -side left > > if {$tcl_platform(platform) != "windows"} { > button ${FindEditFr}.print -takefocus 0 -image print_image\ > -command " ${this} file_print " > balloon_bind_info ${FindEditFr}.print [get_indep String\ > PrintFile] > pack ${FindEditFr}.print -side left > } > > #undo > button ${FindEditFr}.undo -takefocus 0 -image undo_image\ > -command " ${this} edit_undo " > balloon_bind_info ${FindEditFr}.undo [get_indep String > EditUndoINFO] > pack ${FindEditFr}.undo -side left > > #delete > button ${FindEditFr}.delete -takefocus 0 -image waste_image\ > -command " ${this} edit_delete " > balloon_bind_info ${FindEditFr}.delete [get_indep String\ > EINFODeleteSection] > pack ${FindEditFr}.delete -side left > > #cut > button ${FindEditFr}.cut -takefocus 0 -image cut_image -command\ > " ${this} edit_cut " > balloon_bind_info ${FindEditFr}.cut [get_indep String\ > EINFOCutSelection] > pack ${FindEditFr}.cut -side left > > #copy > button ${FindEditFr}.copy -takefocus 0 -image copy_image\ > -command " ${this} edit_copy " > balloon_bind_info ${FindEditFr}.copy [get_indep String\ > EINFOCopySelection] > pack ${FindEditFr}.copy -side left > > #paste > button ${FindEditFr}.paste -takefocus 0 -image paste_image\ > -command " ${this} edit_paste " > balloon_bind_info ${FindEditFr}.paste [get_indep String\ > EINFOPasteSelection] > pack ${FindEditFr}.paste -side left > > #compile > button ${FindEditFr}.compile -takefocus 0 -image compile_image\ > -command " ${this} do_compile_file " > balloon_bind_info ${FindEditFr}.compile [get_indep String\ > CompileINFO] > pack ${FindEditFr}.compile -side left > > } > > #combobox for the find command, do not use filter > Combo& ${FindEditFr}.find_hist -width 16 \ > -entryballoon [get_indep String EINFOEnterPattern]\ > -buttonballoon [get_indep String EINFOSearchHistory]\ > -selectcommand "${this} toolbar_findtext ${FindEditFr}.find_hist"\ > -postcommand "${this} toolbar_findtext_postcommand\ > ${FindEditFr}.find_hist" > set FindCombo ${FindEditFr}.find_hist > bind ${FindEditFr}.find_hist.entry \ > [bind ${FindEditFr}.find_hist.entry ] > bind ${FindEditFr}.find_hist.entry \ > [bind ${FindEditFr}.find_hist.entry ] > pack ${FindEditFr}.find_hist -side left > #button to find next/selected entry > button ${FindEditFr}.find -takefocus 0 -image find_image -command\ > " ${this} toolbar_search_pattern " > balloon_bind_info ${FindEditFr}.find [get_indep String\ > SearchFindSelectionINFO] > pack ${FindEditFr}.find -side left > > #some free space > pack [frame ${FindEditFr}.gap -width 5] -side left > #Retriever > button ${FindEditFr}.definition -takefocus 0 -image search_image\ > -command " ${this} toolbar_retriever " > bind_history ${FindEditFr}.definition retrieve > balloon_bind_info ${FindEditFr}.definition [get_indep String\ > RetrieverINFO] > pack ${FindEditFr}.definition -side left > > #Grep > button ${FindEditFr}.grep -takefocus 0 -image grep_image \ > -command "${this} search_grep" > > bind_history ${FindEditFr}.grep grep > balloon_bind_info ${FindEditFr}.grep [get_indep String INFOGrep] > pack ${FindEditFr}.grep -side left > > #some free space > pack [frame ${FindEditFr}.gap2 -width 5] -side left > } > > method AddStatusbar {} { > global sn_options > > itk_component add statusbar { > frame $itk_component(hull).statusbar > } > > #use the option flag > itk_component add reuse { > checkbutton $itk_component(statusbar).reuse\ > -relief groove\ > -text [get_indep String Reuse]\ > -variable [itcl::scope reusable]\ > -font $sn_options(def,layout-font) > } > > balloon_bind_info $itk_component(reuse) [get_indep String > ReusableINFO] > > pack $itk_component(reuse) -side left > > set reusable $sn_options(def,reuse-window) > > set keep $sn_options(def,window-switchable) > > itk_component add keep { > checkbutton $itk_component(statusbar).keep\ > -relief groove\ > -text [get_indep String Keep]\ > -variable [itcl::scope keep]\ > -font $sn_options(def,layout-font) > } > > balloon_bind_info $itk_component(keep) [get_indep String KeepINFO] > > pack $itk_component(keep) -side left > > itk_component add linenum { > label $itk_component(statusbar).linenum\ > -font $sn_options(def,layout-font)\ > -relief groove -bd 2 -anchor e -width 8\ > -textvar [itcl::scope linenum] > } > > pack $itk_component(linenum) -fill y -side left > > itk_component add message { > label $itk_component(statusbar).message\ > -font $sn_options(def,layout-font)\ > -relief groove -bd 2 -anchor w\ > -textvar [itcl::scope message] > } > > pack $itk_component(message) -expand y -fill both -side left > > pack $itk_component(statusbar) -side bottom -fill x > } > > method file_post {m} { > global sn_options > global prj_lines_num > > #call post command for project menus > ProjectMenuEntries_post ${m} "" .prjsub > > set fast_state normal > set new_state normal > > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > set state disabled > set save_state disabled > set fast_state disabled > set rev_state disabled > } else { > set state normal > if {[${ed} cget -file_changed]} { > set save_state normal > } else { > set save_state disabled > set fast_state disabled > } > #no revert for new files > if {[${ed} cget -filename] == $sn_options(noname_file)} { > set rev_state disabled > } else { > set rev_state ${state} > } > } > > #normal save is only possible, when no process is > #running > if {${save_state} == "normal" && [sn_processes_running]} { > set save_state disabled > } > > #we can't create/open files by readonly-project > if {$sn_options(readonly)} { > set new_state "disabled" > } > > #file commands > ${m} entryconfig [get_indep String EditNewFile] -state ${new_state} > ${m} entryconfig [get_indep String Open] -state ${new_state} > ${m} entryconfig [get_indep String EditSave] -state ${save_state} > ${m} entryconfig [get_indep String EditSaveFileAs] -state ${state} > ${m} entryconfig [get_indep String EditFastSave] -state ${fast_state} > ${m} entryconfig [get_indep String Revert] -state ${rev_state} > } > > proc post_recent_project {m topm pm} { > #get file menu widget name > set event_window [lmatch [winfo children [namespace tail ${topm}]]\ > {*#menu}] > set child [lindex [winfo children ${event_window}] 0] > > #Add menu entries for project history > return [update_project_menu_list ${m} ${pm}] > } > > proc update_project_menu_list {menu event_window} { > global sn_options > global sn_projects_list > > set pf $sn_projects_list(filename) > if {[info exists sn_projects_list(mtime)] && > $sn_projects_list(mtime)\ > == [file mtime ${pf}] && ![catch {${menu} index {*1.*}}]} { > return 0 > } > > set exist_projs [sn_read_exist_projects 1] > set proj_name $sn_options(sys,project-file) > > set off [lsearch -exact ${exist_projs} ${proj_name}] > if {${off} != -1} { > set exist_projs [lreplace ${exist_projs} ${off} ${off}] > } > > # Lets create the menu labels! > ${menu} delete 0 end > > set menu_proj "" > set i 1 > set idx 0 > foreach pr ${exist_projs} { > set lb [file tail ${pr}] > if {${i} < 10} { > ${menu} add command -label "${i}. ${lb}" -command\ > [list sn_open_project ${pr}] -underline 0 > } else { > ${menu} add command -label "${i}. ${lb}" -command\ > [list sn_open_project ${pr}] > } > menu_balloon_bind_info ${event_window} ${idx} ${pr} > > incr i > incr idx > } > return [expr {${i} > 1}] > } > > method file_new {} { > if {${ActiveWidget} != $itk_component(editor)} { > $itk_component(notebook) raise edit > } > [list_find_editor ${ActiveWidget}] new_file > } > > method file_open {} { > if {${ActiveWidget} != $itk_component(editor)} { > $itk_component(notebook) raise edit > } > [list_find_editor ${ActiveWidget}] open_file > } > > #Project callbacks > proc file_open_project {} { > sn_open_project > } > > proc file_save_project {} { > sn_save_project > } > > proc delete_current_project {} { > if {[sn_delete_current_project]} { > sn_projectmanager > delete_interp > } > } > > proc file_close_project {} { > if {[sn_quit]} { > sn_projectmanager > delete_interp > } > } > > #Save managment > method file_save {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > ${ed} save_file > } > > method file_saveas {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > ${ed} saveas_file 0 [${ed} cget -filename] > } > > method file_fastsave {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > ${ed} fastsave_file > } > > method file_saveall {} { > Editor&::SaveAll > } > > method file_revert {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > ${ed} revert_file > } > > method file_print {} { > ${ActiveWidget} print > } > > method edit_post {m} { > > set ed [list_find_editor ${ActiveWidget}] > > if {${ed} == ""} { > set state disabled > set modstate disabled > } else { > set state normal > if {[${ed} canModify]} { > set modstate normal > } else { > set modstate disabled > } > } > > ${m} entryconfig [get_indep String EditUndo] -state ${modstate} > ${m} entryconfig [get_indep String EditRedo] -state ${modstate} > ${m} entryconfig [get_indep String EditCut] -state ${modstate} > ${m} entryconfig [get_indep String EditCopy] -state ${state} > ${m} entryconfig [get_indep String EditPaste] -state ${modstate} > ${m} entryconfig [get_indep String EditDelete] -state ${modstate} > ${m} entryconfig [get_indep String SelectAll] -state ${state} > ${m} entryconfig [get_indep String EditInsertFile] -state ${modstate} > ${m} entryconfig [get_indep String EditIdent] -state ${modstate} > ${m} entryconfig [get_indep String EditOutdent] -state ${modstate} > } > > method edit_undo {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > ${ed} Undo > } > > method edit_redo {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > ${ed} Redo > } > > method edit_cut {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > ${ed} Cut > } > > method edit_copy {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > ${ed} Copy > } > > method edit_paste {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > ${ed} Paste > } > > method edit_delete {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > ${ed} Delete > } > > method do_compile_file {} { > global sn_options > > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > > set file [${ed} cget -filename] > if {${file} == $sn_options(noname_file)} { > bell > return > } > > #get file name and convert it to an object file > set tocmpfile [sn_object_file [file tail ${file}]] > set tocmpdir [file dirname ${file}] > > #mask the file with "" if there are blanks in it. > if {[string first " " ${tocmpfile}] > 1} { > set tocmpfile "\"${tocmpfile}\"" > } > > set make [sn_make] > ${make}.make setmakecommand\ > "$sn_options(both,make-command) ${tocmpfile}" > ${make}.make ExecMake > } > > proc edit_proj_preferences {m} { > sn_project_preferences > } > > method edit_preferences {m} { > sn_project_preferences 0 [${ActiveWidget} whoami] ${ActiveWidget}\ > ${this} > } > > if {${sn_elix}} { > proc edit_elix_preferences {} { > sn_elix_preferences > } > } > > method edit_insert {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > ${ed} insert_file > } > > method edit_indent {mode} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > Editor&::Indent ${ed} ${mode} > } > > method Handle_Rcs {cmd {prm ""}} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > eval ${cmd} ${prm} [${ed} cget -filename] > ${ed} SetTitle > } > > method edit_selectall {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > [${ed} editor] tag add sel 0.0 end > } > > method edit_clear {} { > ${ActiveWidget} clearselection > } > > method search_post {m} { > #if we don't have an editor in the actual view, > #disable string manipulation menu items > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > set state disabled > } else { > set state normal > } > > ${m} entryconfig [get_indep String SearchFind] -state ${state} > ${m} entryconfig [get_indep String SearchNext] -state ${state} > ${m} entryconfig [get_indep String SearchPrev] -state ${state} > ${m} entryconfig [get_indep String SearchReplace] -state ${state} > > # FIXME: using sub menu widgets directly is likely to break > # Disable goto submenu too > ${m}.goto entryconfig [get_indep String SearchGotoLine] -state > ${state} > ${m}.goto entryconfig [get_indep String SearchSetMark] -state > ${state} > ${m}.goto entryconfig [get_indep String SearchGotoMark] -state > ${state} > ${m}.goto entryconfig [get_indep String SearchGotoError] -state > ${state} > > #verify if we can retrieve something > if {${ed} != ""} { > set string [Get_Selection ${ed} ${ActiveWidget}] > } else { > set string "" > } > > if {${string} == ""} { > set retrstate disabled > } else { > set retrstate normal > } > > ${m} entryconfig [get_indep String SearchDefinition] -state > ${retrstate} > ${m} entryconfig [get_indep String SearchImplementation]\ > -state ${retrstate} > ${m} entryconfig [get_indep String SearchGrep] -state ${retrstate} > } > > method search_findtext {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} != ""} { > ${ed} FindText > } else { > bell > } > } > > method search_next {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} != ""} { > ${ed} FindNext -forwards > } else { > bell > } > } > > method search_prev {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} != ""} { > ${ed} FindNext -backwards > } else { > bell > } > } > > method search_replace {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} != ""} { > ${ed} Replace > } else { > bell > } > } > > proc Get_Selection {ed active_wdg} { > > # Get selection from current editor. > > if {${ed} != ""} { > set string [Editor&::Get_XSelection ${ed}] > } else { > set string "" > } > > # Get selection from current view. > > if {${string} == "" && ${ed} != ${active_wdg}} { > set sel [${active_wdg} Selection] > if {${sel} != ""} { > set string [lindex ${sel} 1] > set cls [lindex ${sel} 2] > if {${cls} != ""} { > set string "${cls} ${string}" > } > } > } > > return ${string} > } > > method search_definition {} { > > # Look for an editor. > > set ed [list_find_editor ${ActiveWidget}] > > # We use only the same editor, if the keep flag > # is not seted. > > if {${keep} && ${ed} != ""} { > set cmd "${ed} gotofile_cb" > } else { > set cmd "" > } > > if {${ed} != ""} { > return [Editor&::search_definition ${ed}] > } > > set string [Get_Selection ${ed} ${ActiveWidget}] > > if {${string} == ""} { > bell > return > } > > # Try to find method or function definition (don't bell) > > set ret [sn_retrieve_symbol ${string} {md fd fr} "" -exact 1 0 > ${cmd}] > > # Try to find any definition (not implementation or function body) > # (bell if nothing found) > > if {${ret} == 0} { > sn_retrieve_symbol ${string} all "" -exact 1 1 ${cmd} "" "" > "" "*"\ > -1 {{mi md} {fu fd}} > } > } > > method search_implementation {} { > > set ed [list_find_editor ${ActiveWidget}] > > if {${keep} && ${ed} != ""} { > set cmd "${ed} gotofile_cb" > } else { > set cmd "" > } > > if {${ed} != ""} { > return [Editor&::search_implementation ${ed}] > } > > set string [Get_Selection ${ed} ${ActiveWidget}] > if {${string} == ""} { > bell > return > } > > #find implementation > set ret [sn_retrieve_symbol ${string} {fu mi} "" -exact 1 0 ${cmd}] > > #find probably definition (correct for Tcl) > if {${ret} == 0} { > sn_retrieve_symbol ${string} {fd md fr} "" -exact 1 1 ${cmd} > } > } > > method search_gotoline {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > ${ed} GotoLine > } > > method search_setmark {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > [${ed} editor] mark set markpos insert > } > ># FIXME: Targeted for removal. > > proc search_gotoerror {} { > if {[catch {sn_grep_edit_file [selection get]}]} { > bell > } > } > > method search_gotomark {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > > set t [${ed} editor] > ${t} mark set lastpos insert > ${t} mark set insert markpos > ${t} see insert > } > > #Execute grep with selection, when there is no selection, > #call grep dialog box > method search_grep {} { ># FIXME: this is not quite right just yet. Perhaps handle ># the case where there is nothing selected???? > #set ed [list_find_editor ${ActiveWidget}] > #if {${ed} == ""} { > # bell > # return > #} > #sn_grep > $itk_component(notebook) raise grep > $itk_component(grep) setPatternFromClipboard > $itk_component(grep) ExecGrep > } > > method search_goto_post {m} { > } > > proc history_post {m} { > sn_post_history_menu ${m} > } > > method tools_post {m} { > > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > set rcsstate disabled > } else { > if {[${ed} validFilename]} { > set rcsstate normal > } else { > set rcsstate disabled > } > } > # RCS submenu is disabled when the filename isn't valid > > $itk_component(rc_menu) entryconfig [get_indep String > ChooseCheckOut] \ > -state ${rcsstate} > > $itk_component(rc_menu) entryconfig [get_indep String > ChooseCheckIn] -state ${rcsstate} > $itk_component(rc_menu) entryconfig [get_indep String > ChooseDiscard] -state ${rcsstate} > $itk_component(rc_menu) entryconfig [get_indep String ChooseLock] > -state ${rcsstate} > $itk_component(rc_menu) entryconfig [get_indep String > ChooseUnlock] -state ${rcsstate} > $itk_component(rc_menu) entryconfig [get_indep String ChooseDiff] > -state ${rcsstate} > $itk_component(rc_menu) entryconfig [get_indep String > RevisionControlEditor] \ > -state ${rcsstate} > } > > method tools_ctree_post {m} { > } > > method tools_classbr_post {m} { > } > > method tools_xref_post {m} { > } > > method tools_incbr_post {m} { > } > > #add breakpoint or execute until the specified line > method tools_breakpoint_or_until {{until "break"}} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > set idx [[${ed} editor] index insert] > if {${idx} == ""} { > bell > return > } > dbg_set_breakpoint [${ed} cget -filename] ${idx} ${until} > } > > proc windows_new_window {{m ""} {page "edit"}} { > global tkeWinNumber > incr tkeWinNumber > > #verify if the tool command exists > if {${page} != "edit" && [tool_Exists ${page}] != "normal"} { > bell > return > } > > return [MultiWindow& .multiwindow-${tkeWinNumber} -raise ${page}] > } > > proc windows_new_post {m} { > set edit_state [tool_Exists edit] > set ctree_state [tool_Exists ctree] > set xref_state [tool_Exists xref] > set retr_state [tool_Exists retr] > set grep_state [tool_Exists grep] > set inc_state [tool_Exists incbr] > > ${m} entryconfig [get_indep String WindowsNew] -state ${edit_state} > ${m} entryconfig [get_indep String MultiClassHierarchy]\ > -state ${ctree_state} > ${m} entryconfig [get_indep String MultiClass] -state ${edit_state} > ${m} entryconfig [get_indep String MultiXRef] -state ${xref_state} > ${m} entryconfig [get_indep String MultiInclude] -state ${inc_state} > > ${m} entryconfig [get_indep String WindowsNewCTreeClass]\ > -state ${ctree_state} > ${m} entryconfig [get_indep String WindowsNewClassEditor]\ > -state ${ctree_state} > if {${ctree_state} == "normal" && ${xref_state} == "normal"} { > set state normal > } else { > set state disabled > } > ${m} entryconfig [get_indep String WindowsNewClassXRef] -state > ${state} > ${m} entryconfig [get_indep String WindowsNewRetrEditor]\ > -state ${retr_state} > ${m} entryconfig [get_indep String WindowsNewFindEditor]\ > -state ${grep_state} > ${m} entryconfig [get_indep String WindowsNewCTreeClassEditor]\ > -state ${ctree_state} > > } > > proc windows_new_ctree_class {m} { > set win [windows_new_window "" ctree] > update idletasks > after idle "update idletasks; ${win} windows_splitinto_classbr" > } > > proc windows_new_class_edit {m} { > set win [windows_new_window "" classbr] > update idletasks > after idle "update idletasks; ${win} windows_splitinto_edit" > } > > proc windows_new_class_xref {m} { > set win [windows_new_window "" classbr] > update idletasks > after idle "update idletasks; ${win} windows_splitinto_xref" > } > > proc windows_new_retr_edit {m} { > set win [windows_new_window "" retr] > update idletasks > after idle "update idletasks; ${win} windows_splitinto_edit" > } > > proc windows_new_find_edit {m} { > set win [windows_new_window "" grep] > update idletasks > after idle "update idletasks; ${win} windows_splitinto_edit" > } > > proc windows_new_ctree_class_edit {m} { > set win [windows_new_window "" ctree] > update idletasks > after idle "update idletasks; ${win} windows_splitinto_classbr" > update idletasks > after idle "update idletasks; ${win} windows_splitinto_edit" > } > > proc windows_new_symbr {{m ""}} { > global tkeWinNumber > incr tkeWinNumber > return [SymBr& .multisymbr-${tkeWinNumber}] > } > > #return the number of existing windows, to verify > #if we want to exist or close the window > proc num_Existing_windows {} { > set len [llength [itcl::find objects "*" -class MultiWindow&]] > set len [expr ${len} + [llength [itcl::find objects "*" -class > SymBr&]]] > return ${len} > } > > #close window, if it is not the last window > #exit project, if it is the last window > method windows_close {m} { > if {[num_Existing_windows] > 1} { > if {[Close]} { > > #close related preferences window, if availiable > catch {${this}-preferences exitPreferences} > > #close window > itcl::delete object ${this} > } > } else { > #exit the project > MultiWindow&::file_close_project > } > } > > #iconize project > proc windows_iconize {m topw} { > sn_hide_show_project withdraw ${topw} > } > > method windows_split_post {m} { > set last [list_last ${ActiveWidget}] > > #disable deleting last pane, if no panes availiable > if {${last} == ${ActiveWidget}} { > set state disabled > } else { > set state normal > } > ${m} entryconfig [get_indep String SplitDeleteLast] -state ${state} > > ${m} entryconfig [get_indep String SplitIntoEditor]\ > -state [tool_Exists edit] > ${m} entryconfig [get_indep String SplitIntoClassHierarchy]\ > -state [tool_Exists ctree] > ${m} entryconfig [get_indep String SplitIntoClass] -state\ > [tool_Exists class] > ${m} entryconfig [get_indep String SplitIntoXRef] -state\ > [tool_Exists xref] > ${m} entryconfig [get_indep String SplitIntoInclude]\ > -state [tool_Exists incbr] > } > > ############################################ > # Views SECTION > ############################################ > proc find_mainwindow {view} { > foreach win [itcl::find objects "*" -class MultiWindow&] { > foreach tool [${win} tools] { > for {set nxt ${tool}} {${nxt} != ""} {set nxt [${nxt} > next]} { > if {${nxt} == ${view}} { > return [list ${win} ${tool}] > } > } > } > } > return "" > } > > # Find the main page in corresponding to the given view, > # it can be a sub view. > method find_page {view} { > foreach tool [tools] { > for {set nxt ${tool}} {${nxt} != ""} {set nxt [${nxt} next]} { > if {${nxt} == ${view}} { > return [${tool} whoami] > } > } > } > return "" > } > > proc find_browserwindow {view} { > foreach win [itcl::find objects "*" -class SymBr&] { > if {[${win} symbr] == ${view}} { > return ${win} > } > } > return "" > } > > proc windows_views_switchto {view} { > global Switch_Is_Enabled > > # Look for the window in the multiviews windows. > set win_tool [find_mainwindow ${view}] > if {${win_tool} != ""} { > # Disable switching. > ::incr Switch_Is_Enabled -1 > > set win [lindex ${win_tool} 0] > set page [lindex ${win_tool} 1] > > [${win} NoteBook] raise [${page} whoami] > ${view} Focus > ${win} raise > > # Reenable switching. > ::incr Switch_Is_Enabled > } else { > # Window not found, maybe its a retriever in the symbol browser. > set win [find_browserwindow ${view}] > if {${win} == ""} { > bell > return > } > ${win} raise > } > } > > proc windows_views_post {m} { > global sn_options > > if {[itcl::find objects "*" -class Editor&] != ""} { > set state normal > } else { > set state disabled > } > ${m} entryconfig [get_indep String MultiEditor] -state ${state} > > if {[itcl::find objects "*" -class ClassTree&] != ""} { > set state normal > } else { > set state disabled > } > ${m} entryconfig [get_indep String MultiClassHierarchy] -state > ${state} > > if {[itcl::find objects "*" -class Class&] != ""} { > set state normal > } else { > set state disabled > } > ${m} entryconfig [get_indep String MultiClass] -state ${state} > > if {[itcl::find objects "*" -class XRef&] != ""} { > set state normal > } else { > set state disabled > } > ${m} entryconfig [get_indep String MultiXRef] -state ${state} > > if {[itcl::find objects "*" -class Include&] != ""} { > set state normal > } else { > set state disabled > } > ${m} entryconfig [get_indep String MultiInclude] -state ${state} > > # Is a retriever-view availiable in the mainwindow (only). > set state disabled > foreach rtr [itcl::find objects "*" -class Retr&] { > #only in main windows > if {[catch {set win [[winfo toplevel ${rtr}] whoami]}] || ${win}\ > != "mainw"} { > continue > } else { > set state normal > break > } > } > ${m} entryconfig [get_indep String MultiRetriever] -state ${state} > ># FIXME: DEAR GOD THIS IS AN UGLY HACK! > # Is a grep-view avail. in the main window (only). > set state disabled > foreach gr [itcl::find objects -class Grep] { > #only in main windows > if {[catch {set win [[winfo toplevel ${gr}] whoami]}] || > ${win} !=\ > "mainw"} { > continue > } else { > set state normal > break > } > } > ${m} entryconfig [get_indep String MultiGrep] -state ${state} > } > > proc windows_views_edit_post {m} { > ${m} delete 0 end > set i 1 > foreach ed [itcl::find objects "*" -class Editor&] { > catch { > ${m} add command -command > "MultiWindow&::windows_views_switchto ${ed}" \ > -label "${i} [${ed} Title 0]"\ > -underline 0 > incr i > } > } > } > > proc windows_views_ctree_post {m} { > ${m} delete 0 end > set i 1 > foreach ed [itcl::find objects "*" -class ClassTree&] { > ${m} add command -command > "MultiWindow&::windows_views_switchto ${ed}" \ > -label "${i} [${ed} Title 0]" -underline 0 > incr i > } > } > > proc windows_views_class_post {m} { > ${m} delete 0 end > set i 1 > foreach ed [itcl::find objects "*" -class Class&] { > ${m} add command -command > "MultiWindow&::windows_views_switchto ${ed}" \ > -label "${i} [${ed} Title 0]" -underline 0 > incr i > } > } > > proc windows_views_xref_post {m} { > ${m} delete 0 end > set i 1 > foreach ed [itcl::find objects "*" -class XRef&] { > ${m} add command -command > "MultiWindow&::windows_views_switchto ${ed}" \ > -label "${i} [${ed} Title 0]" -underline 0 > incr i > } > } > > proc windows_views_inc_post {m} { > ${m} delete 0 end > set i 1 > foreach ed [itcl::find objects "*" -class Include&] { > if {[catch {set t "${i} [${ed} Title 0]"}]} { > continue > } > ${m} add command -command > "MultiWindow&::windows_views_switchto ${ed}" \ > -label ${t} -underline 0 > incr i > } > } > > proc windows_views_retr_post {m} { > ${m} delete 0 end > set i 1 > foreach ed [itcl::find objects "*" -class Retr&] { > #only in main windows > if {[catch {set win [[winfo toplevel ${ed}] whoami]}] || > ${win} !=\ > "mainw"} { > continue > } > ${m} add command -command > "MultiWindow&::windows_views_switchto ${ed}" \ > -label "${i} [${ed} Title 0]" -underline 0 > incr i > } > } > > proc windows_views_grep_post {m} { > ${m} delete 0 end > set i 1 ># FIXME: Another ugly hack! > foreach gr [itcl::find objects -class Grep] { > #only in main windows > if {[catch {set win [[winfo toplevel ${gr}] whoami]}] || > ${win} !=\ > "mainw"} { > continue > } > ${m} add command -command > "MultiWindow&::windows_views_switchto ${gr}" > -label "${i} [${gr} Title 0]" -underline 0 > incr i > } > } > > proc windows_views_make_post {m} { > ${m} delete 0 end > set i 1 > foreach ed [itcl::find objects "*" -class Make] { > ${m} add command -command > "MultiWindow&::windows_views_switchto ${ed}" \ > -label "${i} [${ed} Title 0]" -underline 0 > incr i > } > } > > ######################################################### > #End of Views SECTION > ######################################################### > > # Find the first classed (class whoami) object in the chain. > proc list_find {w whoami} { > global last_Editor > for {set nxt ${w}} {${nxt} != ""} {set nxt [${nxt} next]} { > if {[${nxt} whoami] == ${whoami}} { > return ${nxt} > } > } > return "" > } > > # Find the last accessed or the first editor in the chain. > proc list_find_editor {w} { > global last_Editor > set fnd "" > for {set nxt ${w}} {${nxt} != ""} {set nxt [${nxt} next]} { > if {[${nxt} whoami] == "edit"} { > if {${last_Editor} == ${nxt}} { > #return last accessed editor > return ${nxt} > }\ > elseif {${fnd} == ""} { > #mark the first editor > set fnd ${nxt} > } > } > } > # Return the first found editor or the empty string. > return ${fnd} > } > > # Return all objects in the list. > proc list_items {w} { > set items "" > for {set nxt ${w}} {${nxt} != ""} {set nxt [${nxt} next]} { > lappend items ${nxt} > } > return ${items} > } > > # Find the last object in the chain. > proc list_last {w {previous ""}} { > if {${previous} != ""} { > upvar ${previous} prev > } > set prev ${w} > set last ${w} > for {set nxt ${w}} {${nxt} != ""} {set nxt [${nxt} next]} { > set prev ${last} > set last ${nxt} > } > return ${last} > } > > method required_size {w} { > global sn_options > if {$sn_options(def,window-alighment) == "vertical"} { > set last_height [winfo height ${w}] > } else { > set last_height [winfo width ${w}] > } > set last_height [expr ${last_height} / 2] > return ${last_height} > } > > method add_new_pane {last} { > global tkeWinNumber > > set size [required_size ${last}] > # Create the editor now. > incr tkeWinNumber > set pane [${ActivePaned} add pane-${tkeWinNumber} -size ${size}] > # Give the upper pane the half size of it's > # original size. > set lastpane [winfo parent ${last}] > set lastpane [string range ${lastpane} [expr [string last\ > "." ${lastpane}] + 1] end] > ${ActivePaned} paneconfigure ${lastpane} -size ${size} > > return ${pane} > } > > # Add an editor to current window. This is not > # possible if we just added an editor. > > method windows_splitinto_edit {{m ""}} { > global tkeWinNumber > > # Verify that the last widget is not an editor > set last [list_last ${ActiveWidget}] > > set editpane [add_new_pane ${last}] > > incr tkeWinNumber > set ed ${editpane}.edit-${tkeWinNumber} > Editor& ${ed} -mesg_area $itk_component(statusbar) \ > -linenumber_var [itcl::scope linenum]\ > -message_var [itcl::scope message]\ > -findcombo ${FindCombo} \ > -parent $this > > set who [${last} whoami] > > # Configure selectcommand to be called whenever > # the selection is changed. > # Do this only when the previous command is not an editor. > if {${who} == "edit"} { > # Add the new editor into the chain. > ${last} configure -next ${ed} > > # Edit the same file as the prev. editor. > ${ed} configure -filename [${last} cget -filename] > > # When the active view is a retriever, bind the > # combo box to the editor. > }\ > elseif {${who} == "retr" || ${who} == "grep"} { > # Add the new editor into the chain. > ${last} configure -next ${ed} -selectcommand "${ed} gotosymbol" > > # Set related flag of the combo box to true. > upvar #0 ${SymbolsFilter}-related related > set related 1 > ># FIXME: what the heck? I was using -mesg_area $itk_component(statusbar) > > # Bind all the environment for the editor. > ${ed} configure -symbols $itk_component(symbolcombo)\ > -symbols_filter ${SymbolsFilter}\ > -menu $itk_component(edit_menu) -toolbar ""\ > -mesg_area (itk_component(statusbar))\ > -message_var [itcl::scope message]\ > -linenumber_var [itcl::scope linenum]\ > -findcombo ${FindCombo} > > # Enable combo box. > $itk_component(symbolcombo) configure -state normal > > # Activate editor. > ${ed} activate > > ::eval ${ed} gotosymbol [${last} Selection] > } else { > ${last} configure -next ${ed} -selectcommand "${ed} gotosymbol" > > ::eval ${ed} gotosymbol [${last} Selection] > } > pack ${ed} -fill both -expand y > > # View editor commands in toolbar, if not availiable. > DeActivate_Editor_buttons > > return ${ed} > } > > # Add a hierarchy browser to current window. This is not > # possible if we just added a class hierarchy. > > method windows_splitinto_ctree {{m ""}} { > global tkeWinNumber > > # Verify that the last widget is not a hierarchy browser > set last [list_last ${ActiveWidget}] > if {[${last} whoami] == "ctree"} { > bell > return "" > } > > # Create a new ctree pane. > set ctreepane [add_new_pane ${last}] > > incr tkeWinNumber > set ctree ${ctreepane}.ctree-${tkeWinNumber} > ClassTree& ${ctree} \ > -message_var [itcl::scope message] \ > -parent $this > > # Configure selectcommand to be called, when > # ever the selection is changed. > ${last} configure -selectcommand "${ctree} gotosymbol" -next ${ctree} > pack ${ctree} -fill both -expand y > > ::eval ${ctree} gotosymbol [${last} Selection] > > return ${ctree} > } > > # Add a class browser to current window. This is not > # possible if we just added a class browser. > > method windows_splitinto_classbr {{m ""}} { > global tkeWinNumber > > # Verify that the last widget is not a class browser. > set last [list_last ${ActiveWidget}] > if {[${last} whoami] == "classbr"} { > bell > return "" > } > > # Create the classbr now. > set classbrpane [add_new_pane ${last}] > incr tkeWinNumber > set classbr ${classbrpane}.classbr-${tkeWinNumber} > > Class& ${classbr} \ > -doubleclickcommand "${this} EditObject"\ > -class_doubleclickcommand "${this} ClassBrowserEditClass"\ > -mesg_area $itk_component(statusbar) \ > -parent $this > > # Configure selectcommand to be called, when > # ever the selection is changed. > ${last} configure -selectcommand "${classbr} gotosymbol" -next > ${classbr} > pack ${classbr} -fill both -expand y > > ::eval ${classbr} gotosymbol [${last} Selection] > > return ${classbr} > } > > # Add a xref browser to current window. This is not > # possible if we just added a xref browser. > > method windows_splitinto_xref {{m ""}} { > global tkeWinNumber > > # Verify that the last widget is not a xref > set last [list_last ${ActiveWidget}] > if {[${last} whoami] == "xref"} { > bell > return "" > } > > # Create the xref now > set xrefpane [add_new_pane ${last}] > incr tkeWinNumber > set xref ${xrefpane}.xref-${tkeWinNumber} > > XRef& ${xref} \ > -mesg_area $itk_component(statusbar) \ > -parent ${this} > > # Configure selectcommand to be called, when > # ever the selection is changed. > ${last} configure -selectcommand "${xref} gotosymbol" -next ${xref} > pack ${xref} -fill both -expand y > > ::eval ${xref} gotosymbol [${last} Selection] > > return ${xref} > } > > # Add an include browser to current window. This is not > # possible if we just added an include browser. > > method windows_splitinto_incbr {{m ""}} { > global tkeWinNumber > > # Verify that the last widget is not an include browser. > set last [list_last ${ActiveWidget}] > if {[${last} whoami] == "incbr"} { > bell > return "" > } > > # Create the include browser now. > set incbrpane [add_new_pane ${last}] > incr tkeWinNumber > set incbr ${incbrpane}.incbr-${tkeWinNumber} > > Include& ${incbr} \ > -mesg_area $itk_component(statusbar) \ > -parent $this > > # Configure selectcommand to be called, when > # ever the selection is changed. > ${last} configure -selectcommand "${incbr} gotosymbol" -next ${incbr} > pack ${incbr} -fill both -expand y > > ::eval ${incbr} gotosymbol [${last} Selection] > > return ${incbr} > } > > # Add a build window to current window. This is not > # possible if we just added a build window. > > method windows_splitinto_build {{m ""}} { > global tkeWinNumber > > # Verify that the last widget is not a build window > set last [list_last ${ActiveWidget}] > if {[${last} whoami] == "make"} { > bell > return "" > } > > # Create the make window now. > set makepane [add_new_pane ${last}] > incr tkeWinNumber > set make ${makepane}.make-${tkeWinNumber} > > Make ${make} -mesg_area $itk_component(statusbar) > > # Configure selectcommand to be called, when > # ever the selection is changed. > ${last} configure -selectcommand "${make} gotosymbol" -next ${make} > > pack ${make} -fill both -expand y -padx 3 -pady 3 > > # FIXME : not clear what this would do. > #::eval $incbr gotosymbol [$last Selection] > > return ${make} > } > > # Deletes the last pane from a view. > method windows_delete_last_pane {m} { > set last [list_last ${ActiveWidget} prev] > if {${last} == ${ActiveWidget}} { > return 0 > } > > set force_close 0 > > if {[$last whoami] == "edit"} { > # If we have more instances of this file open > # in different editors we don't have to worry > # about saving it when calling Close. > > set file [$last cget -filename] > > if {[CountInstancesOfFile $file] != 1} { > set force_close 1 > } > } > > # Ask the object for deleting. > if {[${last} Close $force_close] != 1} { > return 0 > } > > # Delete pointer to the deleted widget > # and the selectcommand. > ${prev} configure -next "" -selectcommand "" > > # Delete object from the pane widget. > itcl::delete object ${last} > > # Delete pane page. > set pane [string range ${last} 0 [expr {[string last "." ${last}] > - 1}]] > set page [string range ${pane} [expr {[string last "." ${pane}] + > 1}] end] > set pane [string range ${pane} 0 [expr {[string last "." ${pane}] > - 1}]] > ${pane} del ${page} > > # Hide editor buttons, if availiable. > DeActivate_Editor_buttons > > # If we enabled the combobox when splitting > # the window, disable it now. > set who [${prev} whoami] > if {${who} == "retr" || ${who} == "grep"} { > $itk_component(symbolcombo) configure -state disabled > } > > return 1 > } > > method switch_to_next_view {fcs} { > for {set w ${ActiveWidget}} {${w} != ""} {set w [${w} next]} { > if {[string first ${w} ${fcs}] == 0} { > set nxt [${w} next] > if {${nxt} != ""} { > ${nxt} Focus > return > } > } > } > ${ActiveWidget} Focus > } > > proc windows_post {my_top w {pref 0}} { > global sn_options > > # Delete only the menubuttons for availiable windows. > set cnt [expr 3 + ${pref}] > set num [${w} index end] > if {${num} >= ${cnt}} { > ${w} delete ${cnt} end > } > > set proj_len [expr [string length [sn_title]] + 1] > > set toplevs(${my_top}) 1 > # Ignore the menu's toplevel window! > set prjName [sn_title] > set pars "" > foreach win [winfo children .] { > set top [winfo toplevel ${win}] > > if {[info exists toplevs(${top})] || [::wm overrideredirect\ > ${top}]} { > continue > } > set toplevs(${top}) 1 > > set state_ind "" > switch [wm state ${top}] { > "withdrawn" { > continue > } > "iconic" { > set state_ind {+} > } > "normal" { > } > default { > continue > } > } > set title [wm title ${top}] > > regsub -all {[ ]+} ${title} { } title > set off [string first ${prjName} ${title}] > switch -- ${off} { > -1 { > } > 0 { > incr off ${proj_len} > set title [string trim [string range ${title} ${off}\ > end]] > } > default { > set title [string trim [string range ${title} 0\ > [expr ${off} - 1]]] > if {[string index ${title} 0] == "*"} { > set title [string trimleft ${title} "*"] > } > set title [string trimright ${title} "- "] > } > } > lappend pars [list ${title} ${state_ind} ${top}] > } > > set i 1 > foreach p [lsort -dictionary ${pars}] { > set title [lindex ${p} 0] > set accel [lindex ${p} 1] > set win [lindex ${p} 2] > > ${w} add command -label "${i} ${title}" -accelerator ${accel}\ > -underline 0 -command " raise_toplevel ${win} " > incr i > } > } > > method toolbar_post_scope_menu {m} { > global combobox_editor_scopes > > ${ActiveWidget} postcommand ${m} > > if {[${ActiveWidget} whoami] == "edit"} { > #enable buttons (All,Related,All,None) > foreach btn [eval list $AllFilterOptions(radio)\ > $AllFilterOptions(checkbutton)] { > ${btn} configure -state normal > } > foreach grp [lsort [array names combobox_editor_scopes]] { > set st "disabled" > set ind 0 > foreach sc $combobox_editor_scopes(${grp}) { > if {[::info commands paf_db_${sc}] != ""} { > set st "normal" > set ind 1 > break > } > } > if {${ind} == 0} { > uplevel #0 "set ${m}-${grp} off" > ${m}.${grp} configure -state ${st} > } else { > ${m}.${grp} configure -state ${st} > } > } > # Unknown scopes (only for xref). > ${m}.ud configure -state disabled > }\ > elseif {[${ActiveWidget} whoami] == "xref"} { > # Disable All, Related. > foreach btn $AllFilterOptions(button) { > ${btn} configure -state disabled > } > > # Enable buttons (All,None). > foreach btn $AllFilterOptions(radio) { > ${btn} configure -state normal > } > > foreach grp [lsort [array names combobox_editor_scopes]] { > set st "disabled" > set ind 0 > foreach sc $combobox_editor_scopes(${grp}) { > if {[::info commands paf_db_${sc}] != ""} { > set st "normal" > set ind 1 > break > } > } > if {${ind} == 0} { > uplevel #0 "set ${m}-${grp} off" > ${m}.${grp} configure -state ${st} > } else { > ${m}.${grp} configure -state ${st} > } > } > > # Unknown scopes (only for xref). > ${m}.ud configure -state normal > } else { > # Enable All, Related radios. > foreach btn $AllFilterOptions(radio) { > ${btn} configure -state normal > } > > # Disable filter options (buttons and checkbuttons). > foreach btn [eval list $AllFilterOptions(radio)\ > $AllFilterOptions(checkbutton)] { > ${btn} configure -state disabled > } > > # Unknown scopes (only for xref). > ${m}.ud configure -state disabled > } > } > > method history_stack_control_buttons {} { > if {$view_positions(next) == ""} { > set next_state disabled > } else { > set next_state normal > } > if {$view_positions(prev) == ""} { > set prev_state disabled > } else { > set prev_state normal > } > $itk_component(hist_prev) configure -state ${prev_state} > $itk_component(hist_next) configure -state ${next_state} > } > > # Add into view stack > # where: prev/next > # wdg: View widget (Editor, Class, Ctree, ..) > protected variable history_stack_active 0 > method history_stack_add_point {wdg {where ""}} { > global sn_options > global sn_history > > # Stack managment is active. > if {${history_stack_active}} { > return > } > > # Enter. > incr history_stack_active > > if {${where} == ""} { > set where ${stack_history_side} > } > > # Dump the current view of the widget. > set dump [${wdg} Dump] > > # Check if we have a restorable position at all. > if {${dump} == ""} { > #leave > incr history_stack_active -1 > # No dump position availiable. > return > } > > # Title for the list. > set title [${wdg} DumpTitle ${dump}] > > # Add it on the top of the stack. > set entry [list ${wdg} ${dump} ${title}] > > # Add to global (normal history from menu) history. > ${wdg} AddHistoryFromDump ${dump} ${title} > > # If view point is already availiable move it to top. > set i [lsearch -exact $view_positions(${where}) ${entry}] > if {${i} != -1} { > set view_positions(${where}) [lreplace $view_positions(${where})\ > ${i} ${i}] > } > set view_positions(${where}) [linsert $view_positions(${where}) 0\ > ${entry}] > > # If we add a view point into the prev list, we > # must delete all the next positions. > # Add it to the end of the previous list!! > # Do not do it when the user navigates using the history dump > # points. > if {${history_stack_navigate} == 0 && ${where} == "prev"} { > set nlen [llength $view_positions(next)] > set len [llength $view_positions(prev)] > if {[expr ${nlen} + ${len}] > $sn_history(stacksize)} { > set len [expr ${nlen} + ${len} - $sn_history(stacksize)] > set minlen [expr $sn_history(stacksize) / 2] > if {${len} < ${minlen}} { > set len ${minlen} > } > set view_positions(prev) [lrange $view_positions(prev) 0 > ${len}] > } > eval lappend view_positions(prev) $view_positions(next) > set view_positions(next) "" > } > > # Limit the number of history stack dump points. > if {[llength $view_positions(${where})] > $sn_history(stacksize)} { > set view_positions(${where}) [lrange $view_positions(${where}) 0\ > $sn_history(stacksize)] > } > > # Control history/stack navigation buttons. > history_stack_control_buttons > > # Leave stack managment. > incr history_stack_active -1 > } > > method toolbar_post_history_stack_menu {m what} { > set i 0 > foreach point $view_positions(${what}) { > set wdg [lindex ${point} 0] > if {![winfo exists ${wdg}]} { > #view removed > continue > } > ${m} add command -command " ${this} history_stack_goto_point\ > ${what} ${i} " -label [lindex ${point} 2] > incr i > } > } > > # Post menu to list all availiable saved view positions > method toolbar_post_history_stack {what btn} { > # Nothing in the stack > if {$view_positions(${what}) == ""} { > return > } > > # Set (x,y) for option-menu > set y [expr {[winfo rooty ${btn}] + [winfo height ${btn}]}] > set x [winfo rootx ${btn}] > > set m .view_position_pop_menu > catch {destroy ${m}} > menu ${m} -title "Views" -tearoff 0 -postcommand\ > "${this} toolbar_post_history_stack_menu ${m} ${what}" > wm overrideredirect ${m} 1 > tk_popup ${m} ${x} ${y} > } > > # True when the user navigates between the existing > # stack dump-points. > protected variable history_stack_navigate 0 > protected variable history_stack_goto_point_active 0 > > # Restore the first view point in the stack. > method history_stack_goto_point {where {index 0}} { > global Switch_Is_Enabled > > if {$view_positions(${where}) == ""} { > return > } > > if {${history_stack_goto_point_active}} { > bell > return > } > incr history_stack_goto_point_active 1 > > set point [lindex $view_positions(${where}) ${index}] > > # Fetch the widget path and verify if it exists, if not > # delete it from the history stack. > set wdg [lindex ${point} 0] > while {! [winfo exists ${wdg}]} { > catch {set view_positions(${where})\ > [lreplace $view_positions(${where}) ${index} ${index}]} > > if {$view_positions(${where}) == ""} { > break > } > > set point [lindex $view_positions(${where}) ${index}] > set wdg [lindex ${point} 0] > if {${point} == "" || ${wdg} == ""} { > break > } > } > > # Stack empty. > if {$view_positions(${where}) == "" || ${point} == "" || ${wdg} > == ""} { > incr history_stack_goto_point_active -1 > return > } > > # We must disable auto-switching to current position. > ::incr Switch_Is_Enabled -1 > > # Navigation between stack points is active, > # don't delete the next-stack. > incr history_stack_navigate > > if {${where} == "prev"} { > set stack_history_side "next" > } else { > set stack_history_side "prev" > } > > # Delete (before execution) the entry from the stack list. > catch {set view_positions(${where})\ > [lreplace $view_positions(${where}) ${index} ${index}]} > > # Find page in corresponding to the widget, it can be a sub widget. > set page [find_page ${wdg}] > > # Restore view point. > if {${page} != ""} { > catch { > # Popup view, don't raise the window. > view ${page} 0 > ${wdg} Restore [lindex ${point} 1] > # Focus on the restored view. > ${wdg} Focus > } err > if {${err} != ""} { > sn_log "stack goto history:${err}" > } > } else { > # A sub widget is deleted, no restore possible. > bell > } > > history_stack_control_buttons > > # Default is adding to previous list. > set stack_history_side "prev" > > # Navigation between stack points finished. > incr history_stack_navigate -1 > > # Reenable switching. > ::incr Switch_Is_Enabled > > incr history_stack_goto_point_active -1 > } > > method toolbar_display_selected {combo txt} { > ${ActiveWidget} goto ${combo} ${txt} > } > > method toolbar_findtext {combo txt} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} != ""} { > ${ed} FindNext -forwards ${txt} > } else { > bell > } > } > > method toolbar_findtext_postcommand {combo} { > global sn_options > ${combo} configure -contents $sn_options(search) > } > > method toolbar_search_pattern {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > if {![catch {set string [selection get]}]} { > set off [string first "\n" ${string}] > if {${off} != -1} { > set string [string range ${string} 0 [expr ${off} - 1]] > } > ${ed} FindNext -forwards ${string} > } else { > ${ed} FindNext -forwards [${FindCombo} cget -entrytext] > } > } > > method toolbar_retriever {} { > set ed [list_find_editor ${ActiveWidget}] > if {${ed} == ""} { > bell > return > } > ${ed} RetrieveObject > } > > method toolbar_symbols {{all 0}} { > ${ActiveWidget} filter ${all} > } > > method editor {} { > return $itk_component(editor) > } > > method editw {} { > if {[catch {set w [$itk_component(editor) editor]}]} { > return "" > } > return ${w} > } > > #find a reusable window > method is_Reusable {} { > if {![winfo exists $itk_component(reuse)] || !${reusable} ||\ > [$itk_component(reuse) cget -state] != "normal"} { > return 0 > } > return 1 > } > > method ActiveWidget {} { > return ${ActiveWidget} > } > > method NoteBook {} { > return $itk_component(notebook) > } > > method view {page {rs 1}} { > set old ${Activate_executed} > $itk_component(notebook) raise ${page} > > #Activate isn't executed, because the page is > #already active, add dump-point into history-stack > if {${old} == ${Activate_executed}} { > history_stack_add_point ${ActiveWidget} > } > if {${rs}} { > raise > } > } > > #find a window with specified class name > proc find_Reusable {} { > foreach win [itcl::find objects "*" -class MultiWindow&] { > if [${win} is_Reusable] { > # Remove the :: namespace qualifier. > return [namespace tail ${win}] > } > } > return "" > } > > method tools {} { > return ${AvailTools} > } > > #Close your self > method Close {} { > foreach tool ${AvailTools} { > for {set nxt ${tool}} {${nxt} != ""} {set nxt [${nxt} next]} { > # By editor with more than one buffer for the > # same file, do ask only one time!! > if {[${nxt} whoami] == "edit"} { > if {[info exists alread_Asked([${nxt} cget > -filename])]} { > continue > } > set alread_Asked([${nxt} cget -filename]) 1 > } > if {[${nxt} Close] != 1} { > # User canceled command. > return 0 > } > } > } > # Window can be closed. > return 1 > } > > # Verify if all buffers can be refereted. > proc CloseAll {} { > foreach win [itcl::find objects "*" -class Editor&] { > if {[info exists alread_Asked([${win} cget -filename])]} { > continue > } > set alread_Asked([${win} cget -filename]) 1 > if {[${win} Close] == 0} { > return 0 > } > } > # Close all symbol browsers. > return [SymBr&::CloseAll] > } > > method Restore {win} { > foreach page ${win} { > set i 0 > # Views in the page > # format " " > foreach view [lrange ${page} 1 end] { > if {${i} == 0} { > $itk_component(notebook) raise [lindex ${view} 0] > set w ${ActiveWidget} > } else { > switch -- [lindex ${view} 0] { > "edit" { > set w [windows_splitinto_edit] > } > "ctree" { > set w [windows_splitinto_ctree] > } > "classbr" { > set w [windows_splitinto_classbr] > } > "xref" { > set w [windows_splitinto_xref] > } > "incbr" { > set w [windows_splitinto_incbr] > } > default { } > } > } > ${w} Restore [lindex ${view} 3] > incr i > } > } > } > > # The function refreshes all views after updating the project > # XRef state is handled, not the views added to xref. > # > # vw: EMPTY to update all the views > # vw: List of view names to update > method Control_Display {{vw ""}} { > global combobox_editor_scopes > > if {${vw} == ""} { > set who_views [list edit classbr ctree xref incbr retr grep] > } else { > set who_views xref > } > > # Verify if the views are still availiable. > foreach who ${who_views} { > set page [$itk_component(notebook) subwidget ${who}] > set state [tool_Exists ${who}] > $itk_component(notebook) pageconfigure ${who} -state ${state} > } > > # Delete sub windows of disabled views > # except XRef windows, this must be updated after > # finishing XRef process. > foreach tool [tools] { > set who [${tool} whoami] > set page [$itk_component(notebook) subwidget ${who}] > if {${vw} != "" && ${vw} != ${who}} { > continue > }\ > elseif {${vw} == "" && ${who} == "xref"} { > continue > } > set state [tool_Exists ${who}] > > # Delete all sub views, if the view isn't more availiable. > if {${state} == "disabled"} { > set oldActive ${ActiveWidget} > set ActiveWidget ${tool} > while {1} { > if {[windows_delete_last_pane ""] == 0} { > break > } > } > set ActiveWidget ${oldActive} > } > } > > # If xref is the active page, then configure it's combo box. > if {${vw} == "xref" && [${ActiveWidget} whoami] == "xref"} { > ${ActiveWidget} Reenable > } > > # Check wether the combobox entries are still valid. > if {${vw} != "xref"} { ># FIXME: ugly hack uses internals of menu in combobox ! > set opt [$itk_component(symbolcombo) component menu].symfilter > foreach sc [lsort [array names combobox_editor_scopes]] { > if {! [winfo exists ${opt}.${sc}]} { > # Read the filters. > Add_Symbol_Filter $itk_component(toolbar) > break > > } > } > } > } > > method whoami {} { > return "mainw" > } > > # This function is called, when the project state is > # changes, like file is saved and reparsed, > # this function update the availiable views to > # the latest state. > proc Refresh_YourSelf {} { > > foreach win [itcl::find objects "*" -class MultiWindow&] { > ${win} Control_Display > } > > # Refresh editors. > foreach ed [itcl::find objects "*" -class Editor&] { > ${ed} Refresh_Display > } > > # Refresh hierarchy. > foreach ct [itcl::find objects "*" -class ClassTree&] { > ${ct} Refresh_Display > } > > # Refresh class. > foreach cl [itcl::find objects "*" -class Class&] { > ${cl} Refresh_Display > } > > # Refresh xref. > foreach xr [itcl::find objects "*" -class XRef&] { > ${xr} Refresh_Display > } > > # Refresh include. > foreach inc [itcl::find objects "*" -class Include&] { > ${inc} Refresh_Display > } > > # Refresh Retriever (exclusive mode). > foreach r [itcl::find objects "*" -class Retr&] { > ${r} Refresh_Display > } > > # Refresh Symbol browsers. > foreach sb [itcl::find objects "*" -class SymBr&] { > ${sb} Refresh_Display > } > } > > # This function is called after xref process is finished. > proc Refresh_YourSelf_After_XRef {} { > foreach win [itcl::find objects "*" -class MultiWindow&] { > ${win} Control_Display xref > } > > # Refresh xref windows. > foreach xr [itcl::find objects "*" -class XRef&] { > ${xr} Refresh_Display > } > } > > # This function saves the status of all opened multiwindows > # in the project file. > proc SaveYourSelf {} { > > sn_log "MutliWindow& SaveYourSelf.." > > set val "" > foreach win [itcl::find objects "*" -class MultiWindow&] { > > # Window id. > set wdump "window" > > # Window geometry. > lappend wdump [winfo x [${win} component hull]] > lappend wdump [winfo y [${win} component hull]] > lappend wdump [winfo width [${win} component hull]] > lappend wdump [winfo height [${win} component hull]] > lappend wdump [wm geometry [${win} component hull]] > lappend wdump [[${win} ActiveWidget] whoami] > > # Notepad pages. > # Note: only save the active view, don't save all views, > # this is not nesessary. > foreach tool [${win} ActiveWidget] { > set sub "page" > > if {${tool} == ""} { > continue > } > > # Save the tool and it's sub windows. > foreach page [MultiWindow&::list_items ${tool}] { > if {${page} == ""} { > continue > } > set who [${page} whoami] > > # We don't need to dump the settings for grep&retriever. > if {[lsearch -exact {retr grep} ${who}] != -1} { > continue > } > > # Save geometry. > set subpage "" > lappend subpage ${who} > lappend subpage [winfo width ${page}] > lappend subpage [winfo width ${page}] > > # Save widget settings. > lappend subpage [${page} Dump] > lappend sub ${subpage} > } > > lappend wdump ${sub} > } > lappend val ${wdump} > } > paf_db_proj put MultiWindows ${val} > > # Save existing browsers. > SymBr&::SaveYourSelf > > sn_log "MutliWindow& SaveYourSelf..end" > } > > # This function restores all the windows saved in the > # project file. > proc RestoreYourSelf {} { > global sn_options > global tkeWinNumber > global Switch_Is_Enabled > > # First disable switching. > ::incr Switch_Is_Enabled -1 > > # Let the status window be refreshed. > update idletasks > update > > # First restore saved symbol browsers. > SymBr&::RestoreYourSelf > > set val [paf_db_proj get -key MultiWindows] > if {${val} != ""} { > catch { > foreach win ${val} { > set id [lindex ${win} 0] > if {${id} != "window"} { > continue > } > > set geom [lindex ${win} 5] > > # Create window. > incr tkeWinNumber > set nwin ".multiwindow-${tkeWinNumber}" > MultiWindow& ${nwin} -geometry ${geom} > > # Restore settings. > ${nwin} Restore [lrange ${win} 7 end] > > # Toggle to active page. > ${nwin} view [lindex ${win} 6] > > update idletasks > } > } > } > # Reenable switching. > ::incr Switch_Is_Enabled > } > > # Create by default, a window with the retriever containing > # the file list. > # Create a symbol browser by default. > proc Default_Window {} { > global tkeWinNumber > global keybindings_initialized > > # Is a main window availiable. > set wins [itcl::find objects "*" -class MultiWindow&] > if {${wins} != ""} { > return > } > # Is a symbol browser available. > set wins [itcl::find objects "*" -class SymBr&] > if {${wins} != ""} { > return > } > > # Let the status window be refreshed. > update idletasks > update > > windows_new_symbr "" > } > > method isakeep {} { > return keep > } > > private variable reusable "1" ; # Is this window resuable. > private variable keep "1" ; # Keep window context(??). > private variable linenum "0" ; # Line number. > private variable message "" ; # Statusbar message. > > protected variable AllFilterOptions > > protected variable ActivePage "" > protected variable ActivePaned "" > protected variable ActivePane "" > protected variable ActiveWidget "" > > protected variable SymbolsFilter "" > protected variable FindCombo "" > protected variable FindEditFr "" > protected variable AvailTools "" > > # Contains all next positions. > # Contains all previous positions. > protected variable view_positions > protected variable stack_history_side "prev" > > public variable geometry "" > public variable symbolname $sn_options(noname_file) > > itk_option define -raise raise Raise "edit" > public variable x "" > public variable y "" >} > >proc ProjectMenuEntries_post {m {subwindow ""} {prjsub ""}} { > > # XRef process is running <==> no save & no project editor. > if {[sn_processes_running]} { > set xref_state disabled > } else { > set xref_state normal > } > > # No project editor/delete project during xref is running. > ${m}${prjsub} entryconfig [get_indep String ProjectEditorMenu]\ > -state ${xref_state} > ${m}${prjsub} entryconfig [get_indep String DeleteProject]\ > -state ${xref_state} > > # Close can only called, when there is another opend > # windows, by sub windows it must be able to close > # the window every time. > if {${subwindow} == "subwindow" || [MultiWindow&::num_Existing_windows]\ > > 1} { > set closestate normal > } else { > set closestate disabled > } > ${m} entryconfig [get_indep String WindowsClose] -state ${closestate} >} > ># Add project section. >proc AddProjectMenuEntries {m topw {submenu 0}} { > global sn_options sn_elix > set origm ${m} > > # Add project commands into a submenu. > if {${submenu}} { > # Project submenu... > set prjsub ${m}.prjsub > menu ${prjsub} -tearoff 0 > > ${prjsub} configure -font $sn_options(def,layout-font) > > ${m} add cascade -label [get_indep String ProjectMenu]\ > -underline [get_indep Pos ProjectMenu] -menu ${prjsub} > > set m ${prjsub} > } > > # Project. > ${m} add command -label [get_indep String NewProj] -underline\ > [get_indep Pos NewProj] -command sn_new_project > > ${m} add command -label [get_indep String OpenProject]\ > -underline [get_indep Pos OpenProject]\ > -command " MultiWindow&::file_open_project " > > ${m} add command -label [get_indep String DeleteProject]\ > -underline [get_indep Pos DeleteProject]\ > -command " MultiWindow&::delete_current_project " > > if {${m} == ${origm}} { > ${origm} add command -label [get_indep String CloseProject]\ > -underline [get_indep Pos CloseProject]\ > -command " MultiWindow&::file_close_project " > } > > ${m} add separator > > # Project editor. > ${m} add command -label [get_indep String ProjectEditorMenu]\ > -underline [get_indep Pos ProjectEditorMenu]\ > -command project_editor > > # Add preferences to the file menu (only in symbol browser). > ${m} add command -label [get_indep String ProjectPreferencesMenu]\ > -underline [get_indep Pos ProjectPreferencesMenu]\ > -command " MultiWindow&::edit_proj_preferences 0 " > > if {${sn_elix}} { > # EL/IX config. > ${m} add command -label [get_indep String ElixPreferences]\ > -underline [get_indep Pos ElixPreferences]\ > -command " MultiWindow&::edit_elix_preferences " > } > > # Recent project files. > set recent ${origm}.recent > menu ${recent} -tearoff 0 > > ${origm} add cascade -label [get_indep String RecentProjects]\ > -underline [get_indep Pos RecentProjects] -menu ${recent} > ghosting_menu_item ${origm} [get_indep String RecentProjects]\ > "MultiWindow&::post_recent_project ${recent} ${topw} ${m}" > > if {${m} != ${origm}} { > ${origm} add command -label [get_indep String CloseProject]\ > -underline [get_indep Pos CloseProject]\ > -command " MultiWindow&::file_close_project " > } > >} > >########################################################### >## Miscellaneous tools >########################################################### >proc RescanProject {} { > global sn_options sn_product_name > > #display a loading window > sn_loading_message [get_indep String Scanning] > > sn_parse_uptodate > > #delete the loading window > hide_loading_message >} > >proc AddMiscSubMenu {m} { > global sn_options > > set misc ${m} > > ${misc} configure -font $sn_options(def,layout-font) > > #Refresh project > ${misc} add command -label [get_indep String ScanProject]\ > -underline [get_indep Pos ScanProject] -command "RescanProject" > > #Reparse project > ${misc} add command -label [get_indep String Reparse]\ > -underline [get_indep Pos Reparse]\ > -command "Preferences&::Reparse ask" > > ${misc} add separator > > AddDebugFunctionality ${misc} > > # Ide Target Manager. > ${misc} add command -label [get_indep String BuildTargetManager]\ > -underline [get_indep Pos BuildTargetManager]\ > -command "sn_start_build_manager" > > # Make. > ${misc} add command -label [get_indep String MultiMake]\ > -underline [get_indep Pos MultiMake] -command "sn_make" >} > >############################################################ >## Debugger functionality >############################################################ >proc AddDebugFunctionality {m {topw ""}} { > ${m} add command -label [get_indep String DbgTitle] -underline\ > [get_indep Pos DbgTitle] -command sn_debugger >} > >########################################################### >## History menu >## Make History more fun >########################################################### >proc AddHistMenu {m} { > global sn_options > menu ${m}.history -tearoff 0\ > -postcommand "MultiWindow&::history_post ${m}.history" > > ${m}.history configure -font $sn_options(def,layout-font) > > ${m} add cascade -label [get_indep String History] -menu ${m}.history\ > -underline [get_indep Pos History] >} > >########################################################### >## Windows menu >## Make Windows with more fun >########################################################### >proc AddWindowsMenu {m cls {add_split 0} {add_views 1}} { > global sn_options > set win ${m}.windows > menu ${win} -postcommand "MultiWindow&::windows_post ${cls} ${m}.windows\ > [expr ${add_split} + ${add_views}]" -tearoff 0 > ${m} add cascade -label [get_indep String Windows] -menu ${win}\ > -underline [get_indep Pos Windows] > > ${m}.windows configure -font $sn_options(def,layout-font) > > # Submenu to create views. > set new ${m}.windows.new > menu ${new} -tearoff 0\ > -postcommand "MultiWindow&::windows_new_post ${new}" > > ${new} configure -font $sn_options(def,layout-font) > > ${m}.windows add cascade -label [get_indep String NewWork] -menu ${new}\ > -underline [get_indep Pos NewWork] > > # New editor. > ${new} add command -command " MultiWindow&::windows_new_window ${new} "\ > -label [get_indep String WindowsNew]\ > -underline [get_indep Pos WindowsNew]\ > -accelerator "F5" > > # New Class Hierarchy. > ${new} add command -command " MultiWindow&::windows_new_window ${new}\ > ctree " -label [get_indep String MultiClassHierarchy]\ > -underline [get_indep Pos MultiClassHierarchy] -accelerator "F6" > > # New Class. > ${new} add command -command " MultiWindow&::windows_new_window ${new}\ > classbr " -label [get_indep String MultiClass]\ > -underline [get_indep Pos\ > MultiClass] -accelerator "F7" > > # New Xref. > ${new} add command\ > -command " MultiWindow&::windows_new_window ${new} xref "\ > -label [get_indep String MultiXRef]\ > -underline [get_indep Pos MultiXRef] -accelerator "F8" > > # New Include. > ${new} add command\ > -command " MultiWindow&::windows_new_window ${new} incbr "\ > -label [get_indep String MultiInclude]\ > -underline [get_indep Pos MultiInclude] -accelerator "F9" > > ${new} add separator > > # New CTree-Class. > ${new} add command\ > -command " MultiWindow&::windows_new_ctree_class ${new} "\ > -label [get_indep String WindowsNewCTreeClass]\ > -underline [get_indep Pos WindowsNewCTreeClass] > > # New Class-Edit. > ${new} add command\ > -command " MultiWindow&::windows_new_class_edit ${new} "\ > -label [get_indep String WindowsNewClassEditor]\ > -underline [get_indep Pos WindowsNewClassEditor] > > # New Class-Xref. > ${new} add command\ > -command " MultiWindow&::windows_new_class_xref ${new} "\ > -label [get_indep String WindowsNewClassXRef]\ > -underline [get_indep Pos WindowsNewClassXRef] > > # New Retriever-Edit. > ${new} add command\ > -command " MultiWindow&::windows_new_retr_edit ${new}"\ > -label [get_indep String WindowsNewRetrEditor]\ > -underline [get_indep Pos WindowsNewRetrEditor] > > # New Find-Edit. > ${new} add command\ > -command " MultiWindow&::windows_new_find_edit ${new}"\ > -label [get_indep String WindowsNewFindEditor]\ > -underline [get_indep Pos WindowsNewFindEditor] > > # New CTreeClassEditor. > ${new} add command\ > -command " MultiWindow&::windows_new_ctree_class_edit ${new} "\ > -label [get_indep String WindowsNewCTreeClassEditor]\ > -underline [get_indep Pos WindowsNewCTreeClassEditor] > > ${new} add separator > > # New Symbol browser. > ${new} add command -command " MultiWindow&::windows_new_symbr ${new} "\ > -label [get_indep String MultiBrowser]\ > -underline [get_indep Pos MultiBrowser]\ > -accelerator "F4" > > # We support now splited windows. > if {${add_split} && ${cls} != ""} { > set split ${win}.split > menu ${split} -postcommand "${cls} windows_split_post ${split}"\ > -tearoff 0 > > ${split} configure -font $sn_options(def,layout-font) > > ${win} add cascade -label [get_indep String SplitInto] -menu > ${split}\ > -underline [get_indep Pos SplitInto] > > # Split into editor. > ${split} add command\ > -command " ${cls} windows_splitinto_edit ${split}"\ > -label [get_indep String SplitIntoEditor]\ > -underline [get_indep Pos SplitIntoEditor]\ > -accelerator "Ctrl+F5" > > # Split into class hierarchy. > ${split} add command\ > -command " ${cls} windows_splitinto_ctree ${split} "\ > -label [get_indep String SplitIntoClassHierarchy]\ > -underline [get_indep Pos SplitIntoClassHierarchy]\ > -accelerator "Ctrl+F6" > > # Split into class. > ${split} add command\ > -command " ${cls} windows_splitinto_classbr ${split} "\ > -label [get_indep String SplitIntoClass]\ > -underline [get_indep Pos SplitIntoClass]\ > -accelerator "Ctrl+F7" > > # Split into xref. > ${split} add command\ > -command " ${cls} windows_splitinto_xref ${split}"\ > -label [get_indep String SplitIntoXRef]\ > -underline [get_indep Pos SplitIntoXRef]\ > -accelerator "Ctrl+F8" > > # Split into include browser. > ${split} add command\ > -command " ${cls} windows_splitinto_incbr ${split} "\ > -label [get_indep String SplitIntoInclude]\ > -underline [get_indep Pos SplitIntoInclude]\ > -accelerator "Ctrl+F9" > > # Split into build winow. > ${split} add command\ > -command " ${cls} windows_splitinto_build ${split} "\ > -label [get_indep String BuildMenuItem]\ > -underline [get_indep Pos BuildMenuItem]\ > -accelerator "Ctrl+F10" > > ${split} add separator > > # Delete last pane. > ${split} add command\ > -command " ${cls} windows_delete_last_pane ${split} "\ > -label [get_indep String SplitDeleteLast]\ > -underline [get_indep Pos SplitDeleteLast]\ > -accelerator "Ctrl+F4" > } > > ###################################################### > #Availiable Views > #To list the availiable views > ###################################################### > > if {${add_views}} { > set views ${win}.views > menu ${views}\ > -postcommand "MultiWindow&::windows_views_post ${views}"\ > -tearoff 0 > ${win} add cascade -label [get_indep String Views] -menu ${views}\ > -underline [get_indep Pos Views] > > # Editor views. > set edview ${views}.edit > menu ${edview}\ > -postcommand "MultiWindow&::windows_views_edit_post > ${edview}"\ > -tearoff 0 > > ${views} add cascade -label [get_indep String MultiEditor]\ > -menu ${edview} -underline [get_indep Pos MultiEditor] > > # Hierarchy views. > set hview ${views}.ctree > menu ${hview}\ > -postcommand "MultiWindow&::windows_views_ctree_post > ${hview}"\ > -tearoff 0 > ${views} add cascade -label [get_indep String MultiClassHierarchy]\ > -menu ${hview} -underline [get_indep Pos MultiClassHierarchy] > > # Class views. > set cview ${views}.class > menu ${cview}\ > -postcommand "MultiWindow&::windows_views_class_post > ${cview}"\ > -tearoff 0 > ${views} add cascade -label [get_indep String MultiClass]\ > -menu ${cview} -underline [get_indep Pos MultiClass] > > # Xref views. > set xview ${views}.xview > menu ${xview}\ > -postcommand "MultiWindow&::windows_views_xref_post > ${xview}"\ > -tearoff 0 > ${views} add cascade -label [get_indep String MultiXRef]\ > -menu ${xview} -underline [get_indep Pos MultiXRef] > > # Include views. > set iview ${views}.iview > menu ${iview}\ > -postcommand "MultiWindow&::windows_views_inc_post ${iview}"\ > -tearoff 0 > ${views} add cascade -label [get_indep String MultiInclude]\ > -menu ${iview} -underline [get_indep Pos MultiInclude] > > # Retriever views. > set rview ${views}.rview > menu ${rview}\ > -postcommand "MultiWindow&::windows_views_retr_post > ${rview}"\ > -tearoff 0 > ${views} add cascade -label [get_indep String MultiRetriever]\ > -menu ${rview} -underline [get_indep Pos MultiRetriever] > > # Grep views. > set gview ${views}.gview > menu ${gview}\ > -postcommand "MultiWindow&::windows_views_grep_post > ${gview}"\ > -tearoff 0 > ${views} add cascade -label [get_indep String MultiGrep]\ > -menu ${gview} -underline [get_indep Pos MultiGrep] > } > ###################################################### > # END of availiable views > ###################################################### > > # Iconize project. > ${m}.windows add command\ > -command " MultiWindow&::windows_iconize ${m}.windows ${cls} "\ > -label [get_indep String WindowsIconize]\ > -underline [get_indep Pos WindowsIconize] > ${m}.windows add separator > ${m}.windows add command -label "dummy" >} > >proc raise_toplevel {w} { > global sn_force_flag > if {[wm state ${w}] == "iconic"} { > wm deiconify ${w} > } else { > # Make sure that the window has focus on windows. > catch { > set wdg [focus -lastfor ${w}] > eval focus ${sn_force_flag} [${w} twidget] > focus ${wdg} > } > raise ${w} > } >} > ># Help menu. >proc AddHelpMenu {m topw} { > global sn_options > > menu ${m}.help -tearoff 0 > > ${m} add cascade -label [get_indep String Help] -menu ${m}.help\ > -underline [get_indep Pos Help] > > ${m}.help configure -font $sn_options(def,layout-font) > > ${m}.help add command -command " sn_help "\ > -label [get_indep String HelpContents]\ > -underline [get_indep Pos HelpContents] > > ${m}.help add command -label [get_indep String Abrav]\ > -underline [get_indep Pos Abrav]\ > -command " sn_show_abbrav " > > ${m}.help add separator > > ${m}.help add command -label [get_indep String Version]\ > -underline [get_indep Pos Version]\ > -command " focus ${topw} > sn_show_version_window > " >} > ># Synchronize more than one editor with the same file name ># to contain the same data. > >global SyncEditors_Disabled >global SyncEditors_Active > >set SyncEditors_Disabled 0 >set SyncEditors_Active 0 > >proc SyncEditors {cls args} { > global sn_options > global SyncEditors_Disabled > global SyncEditors_Active > > if {${SyncEditors_Disabled}} { > return > } > > if {$SyncEditors_Active} { > return > } > > if {[itcl::find object -isa Editor& $cls] == ""} { > set cls [winfo parent $cls] > } > > # Do not sync it if it's not an Editor&. > if {[itcl::find objects -isa Editor& $cls]==""} { > return > } > > set SyncEditors_Active 1 > > set file [${cls} cget -filename] > > # Edit a new file. > if {${file} != $sn_options(noname_file)} { > set editor [${cls} editor] > set cmd [lindex ${args} 0] > > switch ${cmd} { > "insert" { > set pos [${editor} index [lindex ${args} 1]] > set args [lreplace ${args} 1 1 ${pos}] > if {[string compare [lindex ${args} 2] ""] == 0} { > return > } > } > "delete" { > set pos1 [${editor} index [lindex ${args} 1]] > set args [lreplace ${args} 1 1 ${pos1}] > set pos2 [lindex ${args} 2] > if {${pos2} != ""} { > set pos2 [${editor} index ${pos2}] > set args [lreplace ${args} 2 2 ${pos2}] > } > } > default { > return > } > } > > foreach obj [itcl::find objects "*" -class Editor&] { > set cls [namespace tail $cls] > if {${obj} != ${cls} && [${obj} cget -filename] == ${file}} { > eval [${obj} editor] ${args} > if {[${obj} cget -file_changed] == 0} { > ${obj} setmodified 1 > ${obj} SetTitle > } > } > } > } > > if {[${cls} cget -file_changed] == 0} { > ${cls} setmodified 1 > ${cls} SetTitle > } > set SyncEditors_Active 0 > >} > ># Counts the number of Editor wigets that ># have $file currently open. > >proc CountInstancesOfFile {file} { > > set filecount 0 > > foreach obj [itcl::find objects "*" -class Editor&] { > if {[$obj cget -filename] == $file} { > incr filecount > } > } > > return $filecount >} > >######################################################### ># Global keybindings >######################################################### > ># Returns the current class from the active window. >proc get_active_class {} { > set fcs [focus] > if {${fcs} == ""} { > return "" > } > set cls ".[lindex [split ${fcs} .] 1]" > if {${cls} == "."} { > return "" > } > return ${cls} >} > >proc del_last_view {} { > set cls [get_active_class] > if {${cls} == ""} { > bell > return > } > catch {${cls} windows_delete_last_pane ""} >} > >proc add_view {vw} { > set cls [get_active_class] > if {${cls} == ""} { > bell > return > } > catch {${cls} windows_splitinto_${vw}} >} > >proc switch_to_view {view} { > > set cls [get_active_class] > > if {${cls} == ""} { > bell > return > } > > # Verify if the view can be launched. > > if {[tool_Exists ${view}] != "normal"} { > bell > return > } > > catch {${cls} view ${view}} >} > >proc main_print {w} { > catch {[winfo toplevel ${w}] file_print} >} > >proc close_main_window {w} { > > # This procedure is bound on Control-w, so don't > # close window when it's the last one in the project. > > if {[MultiWindow&::num_Existing_windows] > 1} { > catch {[winfo toplevel ${w}] windows_close dummy} > } >} > >proc find_dialog {w} { > catch {[winfo toplevel ${w}] search_findtext} >} > >proc switch_to_next_view {w} { > catch {[winfo toplevel ${w}] switch_to_next_view ${w}} >} > >############################################################## >## End of keybindings >############################################################## > >proc sn_start_build_manager {} { > > if {[itcl::find objects .build_manager]!=""} { > .build_manager raise > } else { > snIdeTargetMgr .build_manager > } > >} > ># dbg_start ># Start the nominated debugger. Pop up an error dialog if the exec fails. > >proc dbg_start {} { > global sn_options > > set cmd $sn_options(def,gdb-command) > if {[catch {exec ${cmd} &} msg] != 0} { > sn_error_dialog ${msg} > } >} > ># Last accessed editor. >set last_Editor "" > ># Copyright (c) 2000, 2001, Red Hat, Inc. ># ># This file is part of Source-Navigator. ># ># Source-Navigator is free software; you can redistribute it and/or ># modify it under the terms of the GNU General Public License as published ># by the Free Software Foundation; either version 2, or (at your option) ># any later version. ># ># Source-Navigator is distributed in the hope that it will be useful, ># but WITHOUT ANY WARRANTY; without even the implied warranty of ># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ># General Public License for more details. ># ># You should have received a copy of the GNU General Public License along ># with Source-Navigator; see the file COPYING. If not, write to ># the Free Software Foundation, 59 Temple Place - Suite 330, Boston, ># MA 02111-1307, USA. ># >##################################################### >## >## Editor that can be integrated in any subwindow. >## >##################################################### > >option add *Editor&.width 80 widgetDefault >option add *Editor&.height 25 widgetDefault >option add *Editor&.wrap "none" widgetDefault >option add *Editor&.editsate "normal" widgetDefault > >itcl::class Editor& { > global sn_options > > inherit sourcenav::MultiChild > constructor {args} { > global sn_options > > set class [${this} info class] > > # Create the text editor. > itk_component add editor { > text $itk_component(hull).editor \ > -relief raised \ > -bd 0 \ > -yscrollcommand "$itk_component(hull).yview set" \ > -xscrollcommand "$itk_component(hull).xview set" > } { > keep -width -height -wrap > rename -state -editstate editState State > } > > eval itk_initialize $args > > # Init some variables. > set editor $itk_component(hull).editor > > set topw [winfo toplevel [namespace tail ${this}]] > > # Init some local/global variables. > init_Editor > > # Add menu entries, if availiable. > if {$itk_option(-menu) != ""} { > } > > # Add toolbar icons. > if {$itk_option(-toolbar) != ""} { > itk_component add toolbar { > frame $itk_option(-toolbar).edfr > } > > pack $itk_component(toolbar) -side left > > # Combobox for the find command > # do not use filter. > > itk_component add find_history { > Combo& $itk_component(toolbar).find_hist \ > -width 20 \ > -selectcommand "${this} toolbar_findtext > $itk_component(toolbar).find_hist" \ > -postcommand "${this} toolbar_findtext_postcommand \ > $itk_component(toolbar).find_hist" > } { } > > # FIXME: references to FindCombo should probably be > # replaced with itk_component(find_history). > set FindCombo $itk_component(find_history) > > bind $itk_component(find_history).entry \ > [bind $itk_component(find_history).entry ] > > balloon_bind_info $itk_component(find_history).entry > [get_indep String \ > EINFOEnterPattern] > > balloon_bind_info [$itk_component(find_history) component > arrow] [get_indep String \ > EINFOSearchHistory] > > pack $itk_component(find_history) \ > -side left > > itk_component add find { > button $itk_component(toolbar).find \ > -takefocus 0 \ > -image find_image \ > -command "${this} toolbar_search_pattern" > } > > balloon_bind_info $itk_component(find) [get_indep String \ > SearchFindSelectionINFO] > > pack $itk_component(find) \ > -side left > > # FIXME: This is a nasty hack to pat a gap in the toolbar. > itk_component add gap { > frame $itk_component(toolbar).gap -width 5 > } > > pack $itk_component(gap) -side left > > > # Retriever. > itk_component add definition { > button $itk_component(toolbar).definition \ > -takefocus 0 \ > -image search_image \ > -command "${this} RetrieveObject" > } > > bind_history $itk_component(definition) retrieve > balloon_bind_info $itk_component(definition) [get_indep String \ > RetrieverINFO] > pack $itk_component(definition) \ > -side left > > # Grep. > itk_component add grep { > button $itk_component(toolbar).grep \ > -takefocus 0 \ > -image grep_image \ > -command "${this} toolbar_grep" > } > ># FIXME: The above toolbar_grep needs to be replaced by a call ># that will switch to the greppane and do a grep, I was thinking ># of calling sn_grep here, but that API needs to get replaced > > bind_history $itk_component(grep) grep > balloon_bind_info $itk_component(grep) [get_indep String > INFOGrep] > pack $itk_component(grep) \ > -side left > } > > # Set project state to the editor. > if {$sn_options(readonly)} { > $this configure -editstate disabled > } else { > $this configure -editstate normal > } > > # Make some initials for editor layout. > Update_Layout > > # Make some bindings for the editor. > make_editor_bindings $itk_component(editor) > > # Create scollbars. > scrollbar $itk_component(hull).xview \ > -command "$itk_component(editor) xview" \ > -orient horizontal > scrollbar $itk_component(hull).yview \ > -command "$itk_component(editor) yview" > > # Load file into editor. > editfile $itk_option(-filename) \ > -1 "" 0 > > pack $itk_component(hull).xview \ > -side bottom \ > -fill x > pack $itk_component(hull).yview \ > -side right \ > -fill y > pack $itk_component(editor) \ > -fill both \ > -expand y > > # Call user defined procedure. > if {[catch {sn_rc_editor $itk_component(hull) > $itk_component(editor)} err]} { > sn_log "error while exec sn_rc_editor: ${err}" > } > } > > destructor { > foreach v [::info globals "${this}-*"] { > catch {uplevel #0 unset ${v}} > } > } > > method __cget {item} { > set item [string range ${item} 1 end] > return [set ${item}] > } > > method iset {item value} { > return [set ${item} ${value}] > } > > method init_Editor {} { > global sn_options > > # Take last used string for search. > set edit_StringSearch [lindex $sn_options(search) 0] > >#FIXME: This is a rather lame way to init the variables. > > catch { > set edit_SearchNoCase $sn_options(search,nocase) > set edit_SearchMethod $sn_options(search,method) > set edit_SearchString $sn_options(search,str) > } > > if {! [info exists edit_SearchNoCase]} { > set edit_SearchNoCase "-nocase" > } > if {! [info exists edit_SearchMethod]} { > set edit_SearchMethod "-exact" > } > if {! [info exists edit_SearchDirection]} { > set edit_SearchDirection "-forwards" > } > } > > ############################################# > # Toolbar button commands > > protected variable FindCombo "" > > method toolbar_findtext_postcommand {combo} { > global sn_options > $itk_component(find_history) configure -contents $sn_options(search) > } > > method toolbar_findtext {combo txt} { > FindNext \ > -forwards ${txt} > } > > method toolbar_search_pattern {} { > if {![catch {set string [selection get]}]} { > set off [string first "\n" ${string}] > if {${off} != -1} { > set string [string range ${string} 0 [expr ${off} - 1]] > } > FindNext \ > -forwards ${string} > } else { > FindNext \ > -forwards [$itk_component(find_history) cget -entrytext] > } > } > >#FIXME : This toolbar_grep method needs to be replaced by something ># that will just switch to the active grep pane! > > #Execute grep with selection, when there is no selection, > #call grep dialog box > method toolbar_grep {} { > #something must be selected > if {[catch {set pat [string trim [selection get]]}]} { > sn_error_dialog [get_indep String NoSelection] [get_indep > String \ > MultiGrep] > return > } > sn_grep 1 ${pat} > } > ############################################ > > ################################### > #make some bindings for the editor > ################################### > method make_editor_bindings {t} { > global sn_options > global tcl_platform > > set trav $sn_options(sys,alt-traverse) > > bind ${t} "${this} Focus_In" > bind ${t} "${this} Focus_Out" > > #Bingings for traversal into the editor > foreach b [list > \ > > \ > \ > \ > \ > > \ > ] { > > bind ${t} ${b} "[bind Text ${b}]; ${this} find_and_mark_tag; > break" > } > > bind ${t} "+ > focus %W > ${this} find_and_mark_tag > " > bind ${t} " > %W see lastpos > %W mark set insert lastpos > > ${this} find_and_mark_tag > break" > bind ${t} " > tkTextExchangeMark %W > > ${this} find_and_mark_tag > break > " > # Save File. > bind ${t} "${this} save_file; break" > > # Quick save. > bind ${t} <${trav}-s> "${this} fastsave_file; break" > bind ${t} <${trav}-S> [bind ${t} <${trav}-s>] > > # Redo. > bind ${t} "${this} Redo; break" > bind ${t} "${this} Redo; break" > > # Cut. > bind ${t} "${this} Cut; break" > > # Copy. > bind ${t} "${this} Copy; break" > > # Paste. > bind ${t} "${this} Paste; break" > > # Insert tab/return. > bind ${t} {Editor&::InsertTab %W; break} > bind ${t} {Editor&::Newline %W; break} > ># FIXME : need to be replaced with call to switch to the grep pane! > # Grep accelerator. > bind ${t} "${this} toolbar_grep; break" > > # Search bindings. > > # Find-dialog. > bind ${t} "${this} FindText; break" > > # Search backward. > # == > bind ${t} "${this} FindNext -backwards; break" > bind ${t} [bind ${t} ] > bind ${t} [bind ${t} ] > > # Search forward. > bind ${t} "${this} FindNext -forwards; break" > > # Sun Find. > bind ${t} [bind ${t} ] > > bind ${t} "${this} Replace; break" > bind ${t} "${this} GotoLine; break" > bind ${t} "${this} RetrieveObject; break" > > # Definition & implementation. > bind ${t} <${trav}-d> "Editor&::search_definition ${this}; break" > bind ${t} <${trav}-D> [bind ${t} <${trav}-d>] > > bind ${t} <${trav}-i> "Editor&::search_implementation ${this}; break" > bind ${t} <${trav}-I> [bind ${t} <${trav}-i>] > > bind ${t} <${trav}-h> "sn_classtree \[Editor&::Get_XSelection \ > ${this}\]; break" > bind ${t} <${trav}-H> [bind ${t} <${trav}-h>] > > bind ${t} <${trav}-c> "sn_classbrowser \[Editor&::Get_XSelection \ > ${this}\]; break" > bind ${t} <${trav}-C> [bind ${t} <${trav}-c>] > > bind ${t} <${trav}-x> "sn_xref both \[Editor&::Get_XSelection \ > ${this}\]; break" > bind ${t} <${trav}-X> [bind ${t} <${trav}-x>] > > # New file. > bind ${t} "${this} new_file; break" > bind ${t} "${this} open_file; break" > > # Bindings for Indent/Outdent. > bind ${t} "Editor&::Indent ${this} indent; break" > bind ${t} "Editor&::Indent ${this} outdent; break" > > # Define the queue, how the event are handled. > sn_add_tags $itk_component(editor) Editor > } > > # Default bindings for the text editor. > proc EditorBindings {} { > global sn_options > > set trav $sn_options(sys,alt-traverse) > set t Editor > > bind ${t} {tkTextSetMark %W insert; break} > > bind ${t} {+Editor&::Insert_Mark_Bracket %W %A} > bind ${t} {+Editor&::Insert_Mark_Bracket %W %A} > bind ${t} {+Editor&::Insert_Mark_Bracket %W %A} > bind ${t} {+Editor&::Insert_Mark_Bracket %W %A} > bind ${t} {+Editor&::Insert_Mark_Bracket %W %A} > > # "{" "[" "]" "}" are bound on Alt-(7,8,9,0), so we need to bind the > # numbers for windows nt/95, since bind doesn't work. > bind ${t} {+Editor&::Insert_Mark_Bracket %W %A} > bind ${t} {+Editor&::Insert_Mark_Bracket %W %A} > > # Traversal on shift-tab. > bind ${t} {focus [tk_focusPrev %W]} > > # Sun UNDO. > bind ${t} [bind Text ] > > bind ${t} "puts \"Other insert binding call\" ; > Editor&::set_overwrite %W \$tkText(%W,ovwrt);break" > > bind ${t} { > switch -- [%W get insert] { > \} { > Editor&::Insert_Mark_Bracket %W \} 0 > } > \{ { > Editor&::Insert_Mark_Bracket %W \{ 0 > } > \) { > Editor&::Insert_Mark_Bracket %W \) 0 > } > \( { > Editor&::Insert_Mark_Bracket %W \( 0 > } > ">" { > Editor&::Insert_Mark_Bracket %W ">" 0 > } > "<" { > Editor&::Insert_Mark_Bracket %W "<" 0 > } > \] { > Editor&::Insert_Mark_Bracket %W \] 0 > } > \[ { > Editor&::Insert_Mark_Bracket %W \[ 0 > } > \" { > Editor&::Insert_Mark_Bracket %W \" 0 > } > \' { > Editor&::Insert_Mark_Bracket %W \' 0 > } > } > break > } > } > > method m3_post_menu {w X Y x y} { > set m .sn_pop_menu_listbox > > # It has to be destroyed because we might have problems with > "tk_popup"! > catch {destroy ${m}} > menu ${m} \ > -tearoff 0 \ > -postcommand "${this} m3_post_menu_update ${m} ${x} ${y}" > wm overrideredirect ${m} 1 > tk_popup ${m} ${X} ${Y} > } > > method m3_post_menu_update {m x y} { > > # Delete old entries. > ${m} delete 0 end > > # Add edit commands (Undo,Copy,Cut,Delete,..). > if {$itk_option(-file_changed)} { > set state disabled > } else { > set state normal > } > set str [get_indep String EditUndo] > ${m} add command \ > -label [get_indep String EditUndo] \ > -underline [get_indep Pos EditUndo] \ > -accelerator "Ctrl+Z" \ > -command "${this} Undo" \ > -state ${state} > > if {[catch {$itk_component(editor) get sel.first}]} { > set state "disabled" > } else { > set state "normal" > } > > ${m} add command \ > -label [get_indep String EditCut] \ > -underline [get_indep Pos EditCut] \ > -accelerator "Ctrl+X" \ > -command "${this} Cut" \ > -state ${state} > > ${m} add command \ > -label [get_indep String EditCopy] \ > -underline [get_indep Pos EditCopy] \ > -accelerator "Ctrl+C" \ > -command "${this} Copy" \ > -state ${state} > > set str [get_indep String EditPaste] > > if {[catch {selection get \ > -displayof $itk_component(editor) \ > -selection CLIPBOARD}]} { > set state "disabled" > } else { > set state "normal" > } > ${m} add command \ > -label [get_indep String EditPaste] \ > -underline [get_indep Pos EditPaste] \ > -accelerator "Ctrl+V" \ > -command "${this} Paste" \ > -state ${state} > > # Text sensitive commands, (Retriever, Views). > ${m} add separator > > AddRetrieveMenu ${m} ${this} $itk_component(editor) ${x} ${y} > } > > # Take only valid identifier characters > # to retrieve valid symbols. > proc format_for_retriever {string} { > # Don't delete spaces in the middle of the text. > regexp \ > -- "\[^\t\n\r^#%*{};',`\"\\\?()\]*" ${string} string > > return [string trim ${string}] > } > > # Verify if we stay on a symbol declaration/implementaion > # this procedure returns the key tagname pointing to, > # when it's true. > proc points_to_header {ed pos} { > global sn_scopes > set lasttag "" > foreach tg [${ed} tag names ${pos}] { > if {[string first " " ${tg}] == -1} { > # Tags like "scope". > set lasttag ${tg} > } > } > if {[lsearch \ > -exact ${sn_scopes} ${lasttag}] == -1} { > set lasttag "" > } > return ${lasttag} > } > > # Adds the option menu for editor. > proc AddRetrieveMenu {m cls ed x y} { > global sn_options sn_scopes > > # Verify if the user has clicked on > # 1. a selection <==> retrieve selection > # 2. outside of a selected region <==> retrieve current word > # 3. word <==> retrieve word > # 4. nothing or unused <==> retrieve current symbol > # 5. No scope active <==> disabled > set pos [${ed} index @${x},${y}] > > # Verify if we stay on a symbol declaration/implementaion > set scopetag [points_to_header ${ed} ${pos}] > if {${scopetag} != ""} { > set file [${cls} getvalidfilename] > } else { > set file "" > } > > set selrng [${ed} tag ranges sel] > set current 1 > set string "" > if {${selrng} != ""} { > set pos1 [split ${pos} "."] > set by [lindex ${pos1} 0] > set bx [lindex ${pos1} 1] > > set rng1 [split [lindex ${selrng} 0] "."] > set rng2 [split [lindex ${selrng} 1] "."] > > set sy1 [lindex ${rng1} 0] > set sx1 [lindex ${rng1} 1] > set sy2 [lindex ${rng2} 0] > set sx2 [lindex ${rng2} 1] > # Clicked in the selection region. > if {${by} == ${sy1} && ${bx} >= ${sx1} &&(${sx2} >= ${bx} || \ > ${sy2} > ${by}) || ${by} == ${sy2} && ${bx} <= ${sx2} > &&(${sx1} \ > <= ${bx} || ${sy1} < ${by}) || ${by} > ${sy1} && ${by} < > ${sy2}} { > set string [format_for_retriever [lindex [${cls} > Selection] 1]] > set current 0 > } > } > if {${current} || ${string} == ""} { > # Current word. > set string [format_for_retriever [${ed} get "${pos} wordstart" \ > "${pos} wordend"]] > > # Take current symbol. > if {${string} == ""} { > set tg [${cls} find_tag ${pos}] > if {${tg} != ""} { > split_symbol ${tg} class sym scope > if {${class} != ""} { > set string "${class}\:\:${sym}" > } else { > set string ${sym} > } > set string [format_for_retriever ${string}] > } > } > } > if {${string} == ""} { > set findstate disabled > set lbl "" > } else { > set findstate normal > set lbl " [get_indep String Of] '${string}'" > } > > # Retrieve definition. > ${m} add command \ > -accelerator "$sn_options(sys,alt-accelpref)+D" \ > -label "[get_indep String SearchDefinition]${lbl}" \ > -underline [get_indep Pos SearchDefinition] \ > -command "Editor&::search_definition ${cls} [list ${string}]" \ > -state ${findstate} > > # Retrieve implementation. > ${m} add command \ > -accelerator "$sn_options(sys,alt-accelpref)+I" \ > -label "[get_indep String SearchImplementation]${lbl}" \ > -underline [get_indep Pos SearchImplementation] \ > -command "Editor&::search_implementation ${cls} [list > ${string}]" \ > -state ${findstate} > > ${m} add separator > > set vw "" > set vlen [string length ${vw}] > > # View Hierarchy. > ${m} add command \ > -accelerator "$sn_options(sys,alt-accelpref)+H" \ > -label "${vw}[get_indep String MultiClassHierarchy] ${lbl}" \ > -underline [expr [get_indep Pos MultiClassHierarchy] + ${vlen}] \ > -command "sn_classtree [list ${string}]" \ > -state ${findstate} > > # View Class. > ${m} add command \ > -accelerator "$sn_options(sys,alt-accelpref)+C" \ > -label "${vw}[get_indep String MultiClass] ${lbl}" \ > -underline [get_indep Pos MultiClass] \ > -command "sn_classbrowser [list ${string}]" \ > -state ${findstate} > > if {${scopetag} != ""} { > set xstring "${string}(${scopetag})" > } else { > set xstring ${string} > } > > if {${findstate} == "normal" && ! [have_xref]} { > set xref_state disabled > } else { > set xref_state normal > } > > # View XRef. > ${m} add command \ > -accelerator "$sn_options(sys,alt-accelpref)+X" \ > -label "${vw}[get_indep String MultiXRef] ${lbl}" \ > -underline [get_indep Pos MultiXRef] \ > -command "sn_xref both [list ${xstring}] [list ""] [list > ${file}]" \ > -state ${xref_state} > } > > method bind_right_mouse {t} { > global sn_options > if {$sn_options(def,edit-rightmouse-action) == "scroll"} { > bind ${t} <3> { } > bind ${t} { } > } else { > bind ${t} <3> "${this} m3_post_menu %W %X %Y %x %y; break" > bind ${t} {break} > } > } > > # If tabsize is not specified, use default tab size. > proc set_tabsize {t {tabsize ""} {refr ""}} { > global sn_options > > if {${tabsize} == ""} { > # If $wd is empty or not a valid number, take 8 ! > if {[catch {set sn_options(def,edit-tabstop) \ > [expr $sn_options(def,edit-tabstop) + 0]}]} { > set sn_options(def,edit-tabstop) 8 > } > set tb $sn_options(def,edit-tabstop) > } else { > set tb ${tabsize} > } > > # Don't use "-tabs" to change the tab size, it does > # have another behavior as normal tabulators. > ${t} config \ > -tabsize ${tb} > } > > # If tabsize is not specified, use default tab size. > proc set_tab {t {tabsize ""} {refr ""}} { > global sn_options > > set font [${t} cget -font] > set text_avg_width [font measure ${font} "M"] > > if {${tabsize} == ""} { > # If $wd is empty or not a valid number, take 8 ! > if {[catch {set sn_options(def,edit-tabstop) \ > [expr $sn_options(def,edit-tabstop) + 0]}]} { > set sn_options(def,edit-tabstop) 8 > } > set tb $sn_options(def,edit-tabstop) > } else { > set tb ${tabsize} > } > > ${t} config \ > -tabs [expr {${text_avg_width} * ${tb}}] > } > > proc set_wrap {w} { > global sn_options > ${w} config \ > -wrap $sn_options(def,edit-wrap) > } > > # Toggle or set the insert/overwrite flag. > proc set_overwrite {w {overwrite ""} {toggle "toggle"}} { > global sn_options > global tkText > > if {${overwrite} == ""} { > set overwrite $sn_options(def,edit-overwrite-mode) > } > > if {${toggle} == "toggle" || ${toggle} == "yes"} { > if {${overwrite}} { > set overwrite 0 > } else { > set overwrite 1 > } > } > > set tkText(${w},ovwrt) ${overwrite} > > if {$tkText(${w},ovwrt)} { > set wd 8 > } else { > set wd 2 > } > > ${w} config \ > -insertwidth ${wd} > } > > # The basic insertion routine for a tab. > proc InsertTab {w {pos ""}} { > global sn_options > > # Insert Spaces ansted of Tabs. > if {$sn_options(def,edit-tab-inserts-spaces)} { > # At least we should insert one character. > set txt " " > for {set i 1} {${i} < $sn_options(def,edit-tabstop)} {incr i} { > append txt " " > } > > if {${pos} == ""} { > tkTextInsertChar ${w} ${txt} > } else { > tkTextInsert ${w} ${pos} ${txt} > } > return > } > > if {${pos} == ""} { > tkTextInsertChar ${w} \t > } else { > tkTextInsert ${w} ${pos} \t > } > # NOBODY asks us to translate previous blanks to tabs when > # the user inserts a TAB. > return > } > > method Undo {} { > tkTextUndo $itk_component(editor) > } > > method Redo {} { > global tkText > ::set tkText($itk_component(editor),prevCmd) "Redo" > tkTextUndo $itk_component(editor) > } > > method Cut {} { > # Only cut when there is a valid selection. > if {![catch {$itk_component(editor) get sel.first}]} { > tkTextCut $itk_component(editor) > } > } > > method Copy {} { > tkTextCopy $itk_component(editor) > } > > method Paste {} { > tkTextPaste $itk_component(editor) > } > > method Delete {} { > catch {tkTextDelete $itk_component(editor) insert > [tkTextPlaceChar $itk_component(editor) +] 1 0} > } > > method FindNext {{direction ""} {string ""}} { > global sn_options > > if {![info exists edit_SearchString]} { > set edit_SearchString $sn_options(search,str) > } > > if {${direction} != ""} { > set edit_SearchDirection ${direction} > } > if {[string compare ${string} ""] == 0} { > set string ${edit_SearchString} > } > SearchForNext ${string} > > find_and_mark_tag > } > > # Get a search string from the user and search for it in the specified > # text widget. > method FindText {} { > global sn_options > > set s ${topw}.multiedit_search > if {[winfo exists ${s}]} { > if {[${s} state] != "normal"} { > ${s} deiconify > } else { > ${s} raise > } > ${s} move_to_mouse > > # Set text only and return. > catch {set edit_SearchString [string trim \ > [selection get]]} > return > } > > # See if there is a selection to look for. > catch { > set edit_SearchString [string trim [selection get]] > } > > set s [sourcenav::Window ${s}] > set strchk ${s}.strchk > set strs ${strchk}.string > set chk ${strchk}.chk > set but ${s}.but > > ${s} title [sn_title [get_indep String EditSearchFor]] > ${s} on_close "${this} Delete_Trace_SearchString ${but}.start; > itcl::delete object ${s}" > > frame ${strchk} > > frame ${strs} > label ${strs}.label \ > -text [get_indep String SearchPattern] \ > -underline [get_indep Pos SearchPattern] \ > -anchor w > entry ${strs}.entry \ > -width 30 \ > -bd 3 \ > -relief sunken \ > -exportselection no \ > -textvariable [itcl::scope edit_SearchString] > ${strs}.entry select to end > bind ${strs}.entry "${but}.start invoke" > pack ${strs}.label \ > -side left \ > -padx 5 > pack ${strs}.entry \ > -side left \ > -padx 5 \ > -fill x \ > -expand y > > frame ${but} > if {${edit_SearchString} == ""} { > set state disabled > } else { > set state normal > } > button ${but}.start \ > -text [get_indep String UtilSearch] \ > -underline [get_indep Pos UtilSearch] \ > -state ${state} \ > -command "${this} SearchForNext" > # Trace the button to enable/disable it, when string is (not) empty. > Trace_SearchString ${but}.start > button ${but}.cancel \ > -text [get_indep String Cancel] \ > -underline [get_indep Pos Cancel] \ > -command " > ${this} Delete_Trace_SearchString ${but}.start > itcl::delete object ${s}" > pack ${but}.start \ > -side top \ > -fill x \ > -padx 10 \ > -pady 5 > pack ${but}.cancel \ > -side top \ > -fill x \ > -padx 10 \ > -pady 5 > > frame ${chk} > checkbutton ${chk}.case \ > -text [get_indep String IgnoreCase] \ > -underline [get_indep Pos IgnoreCase] \ > -variable [itcl::scope edit_SearchNoCase] \ > -onvalue "-nocase" \ > -offvalue "" > checkbutton ${chk}.regexp \ > -text [get_indep String RegExp] \ > -underline [get_indep Pos RegExp] \ > -variable [itcl::scope edit_SearchMethod] \ > -onvalue "-regexp" \ > -offvalue "-exact" > checkbutton ${chk}.forward \ > -text [get_indep String SQLFfor] \ > -underline [get_indep Pos SQLFfor] \ > -variable [itcl::scope edit_SearchDirection] \ > -onvalue "-forwards" \ > -offvalue "-backwards" > pack ${chk}.case \ > -side top \ > -anchor nw \ > -padx 35 > pack ${chk}.regexp \ > -side top \ > -anchor nw \ > -padx 35 > pack ${chk}.forward \ > -side top \ > -anchor nw \ > -padx 35 > > # Bind_focus_enter $s "focus $strs.entry". > > pack ${strs} \ > -side top \ > -fill x \ > -pady 5 \ > -expand y > pack ${chk} \ > -side top \ > -fill x \ > -pady 5 \ > -expand y > pack ${strchk} \ > -side left \ > -fill x \ > -pady 20 \ > -fill x \ > -expand y > pack ${but} \ > -anchor nw \ > -side left \ > -padx 20 \ > -pady 5 > focus ${strs}.entry > > ${s} move_to_mouse > catch {${s} resizable yes no} > > update idletasks > set geom [split [lindex [split [${s} geometry] "+"] 0] "x"] > ${s} minsize [lindex ${geom} 0] [lindex ${geom} 1] > } > > # Search from the current insertion point to EOF for a given string and > # highlight the first occurrence found; search will wrap-around. > method SearchForNext {{string ""} {top ""}} { > global sn_options > global SearchFoundLength > ># FIXME: What is this SearchFoundLength used for ?? > set SearchFoundLength 0 > > if {[string compare ${string} ""] != 0} { > set edit_SearchString ${string} > } else { > set string ${edit_SearchString} > } > > # Insert the string into the search history! > sn_add_to_histroy_stack sn_options(search) ${string} > > sn_log "Editor::SearchForNext resetting combo text to > \"$string\"" > > $itk_option(-findcombo) configure \ > -contents $sn_options(search) \ > -entrytext ${string} > ># FIXME: Why would we check edit_SearchString again? > # Make sure that we have the correct value. > if {${edit_SearchString} == ""} { > set edit_SearchString ${string} > } > if {${string} == ""} { > set string ${edit_SearchString} > } > if {${string} == ""} { > bell > return > } > > set ranges [$itk_component(editor) tag ranges sel] > > # Skip selection, if the selection is equal to the string > #is looking for > if {${ranges} != ""} { > #if nocase is on, make nocase comparing. > if {${edit_SearchNoCase} != ""} { > set cmp1 [string tolower [eval $itk_component(editor) get > ${ranges}]] > set cmp2 [string tolower ${string}] > } else { > set cmp1 [eval $itk_component(editor) get ${ranges}] > set cmp2 ${string} > } > #by regexp, we can't compare the string looking for. > if {[string compare ${cmp1} ${cmp2}] == 0 || > ${edit_SearchMethod} == \ > "-regexp"} { > if {${edit_SearchDirection} == "-forwards"} { > set idx [$itk_component(editor) index "[lindex > ${ranges} 0] + 1c"] > } else { > set idx [lindex ${ranges} 0] > } > } else { > set idx [$itk_component(editor) index insert] > } > } else { > set idx [$itk_component(editor) index insert] > } > # Remove the current selection. > $itk_component(editor) tag remove sel 0.0 end > > # Search ! > set cmd [list $itk_component(editor) search ${edit_SearchMethod} > ${edit_SearchDirection}] > if {${edit_SearchNoCase} != ""} { > lappend cmd ${edit_SearchNoCase} > } > lappend cmd \ > -count SearchFoundLength \ > -- ${string} > > set testcmd $cmd > > lappend cmd ${idx} > set pos [eval ${cmd}] > > # Now, if this is that last occurrance in the file > # we have to beeps. > > if {$SearchFoundLength == 0 || $pos == ""} { > # There are no search results. > bell > return > } else { > lappend testcmd "${pos} + ${SearchFoundLength} chars" end > > # Check for more search results. > if {[eval $testcmd] == ""} { > bell > sn_log "SearchForNext: Last occurrance has been found.(beep)" > } > } > > if {[string compare ${pos} ""] != 0} { > $itk_component(editor) tag add sel ${pos} "${pos} + > ${SearchFoundLength} chars" > $itk_component(editor) mark set lastpos insert > $itk_component(editor) mark set insert ${pos} > $itk_component(editor) see insert > > set df [expr abs(int([$itk_component(editor) index "@0,[winfo > height \ > $itk_component(editor)]"]) - int(${pos}))] > > # If the target is closer to the bottom of the page than 3 > lines, \ > center it! > if {${df} <= 3} { > $itk_component(editor) yview scroll [expr > int([text_page_num_lines \ > $itk_component(editor)] / 2)] units > } > > if {[winfo exists ${top}]} { > ${top} transient $itk_component(editor) > } > } else { > bell > } > } > > ############################################ > # Replace command > # Get a search&replace string from the user and search for it in the > # specified text widget. Then replace those occurrences by the > # replace string. > ############################################ > > # Find all occurrences of the text in the file, and feed them through > # the specified search/replace algorithm > method ReplaceAll {w} { > if {${edit_SearchString} == ""} { > bell > return > } > > set pos end > while {${pos} != ""} { > set pos [eval ${w} search ${edit_SearchMethod} > ${edit_SearchNoCase} \ > -backwards -count len \ > -- [list ${edit_SearchString}] [list ${pos}] 1.0] > > if {${pos} != ""} { > tkTextReplace ${w} ${pos} "${pos} + ${len} char" \ > ${edit_ReplaceString} > } > } > > ${w} see insert > } > > #called when the variable is changed > method StringModified_cb {btns name1 name2 op} { >#FIXME: This is changing the linked variable (the search text) > upvar #0 ${name1} v > if {![info exists v]} { > return > } > if {${v} != ""} { > set state normal > } else { > set state disabled > } > foreach btn ${btns} { > if {[winfo exists ${btn}]} { > ${btn} config \ > -state ${state} > } > } > } > > #add trace for search string to enable/disable related buttons > method Trace_SearchString {btn} { ># FIXME: A trace is getting added on top of the existing edit_SearchString ># which is likely hosing the result in the search text box > trace variable [itcl::scope edit_SearchString] w [list ${this} \ > StringModified_cb ${btn}] > } > > #remove tracing by closing the search window. > method Delete_Trace_SearchString {btn} { > trace vdelete [itcl::scope edit_SearchString] w [list ${this} \ > StringModified_cb ${btn}] > catch {unset edit_SearchString} > } > > method Replace_String {btn} { > if {${edit_ReplaceString} != ""} { > tkTextInsertChar $itk_component(editor) ${edit_ReplaceString} > } else { > tkTextDelete $itk_component(editor) sel.first sel.last > } > $itk_component(editor) tag add sel "insert -[string length > ${edit_ReplaceString}] \ > char" insert > ${btn} config \ > -state disabled > } > > method Replace {} { > global sn_options > global SearchFoundLength > > set w $itk_component(editor) > > catch { > set edit_SearchString [string trim [selection get]] > } > > set s ${topw}.replace > if {[winfo exists ${s}]} { > raise ${s} > return > } > > set strchk ${s}.strchk > set strs ${strchk}.strings > set str1 ${strs}.str1 > set str2 ${strs}.str2 > set buts ${s}.but > set chks ${strchk}.chks > > sourcenav::Window ${s} > ${s} configure -title [sn_title [get_indep String FindReplace]] > ${s} on_close "${this} Delete_Trace_SearchString ${buts}.all; > itcl::delete object $s" > > set foc [focus] > if {${foc} == ""} { > set foc ${w} > } > ${s} transient ${foc} > > frame ${strchk} > pack ${strchk} \ > -side left \ > -expand y \ > -fill x > > frame ${strs} > pack ${strs} \ > -side top \ > -expand y \ > -fill x > > #find string > frame ${str1} > pack ${str1} \ > -side top \ > -expand y \ > -fill x \ > -pady 5 \ > -padx 5 > label ${str1}.label \ > -width 14 \ > -text [get_indep String SearchPattern] \ > -underline [get_indep Pos SearchPattern] \ > -anchor w > pack ${str1}.label \ > -side left > entry ${str1}.entry \ > -relief sunken \ > -bd 3 \ > -exportselection no \ > -textvariable [itcl::scope edit_SearchString] > bind ${str1}.entry "focus ${str2}.entry" > bind ${str1}.entry "${buts}.next invoke" > ${str1}.entry select to end > pack ${str1}.entry \ > -side left \ > -fill x \ > -expand y > > Trace_SearchString ${buts}.all > > #replace with string > frame ${str2} > pack ${str2} \ > -side top \ > -expand y \ > -fill x \ > -pady 5 \ > -padx 5 > label ${str2}.label \ > -width 14 \ > -text [get_indep String ReplacePattern] \ > -underline [get_indep Pos ReplacePattern] \ > -anchor w > pack ${str2}.label \ > -side left > entry ${str2}.entry \ > -relief sunken \ > -bd 3 \ > -exportselection no \ > -textvariable [itcl::scope edit_ReplaceString] > pack ${str2}.entry \ > -side left \ > -fill x \ > -expand y > bind ${str2}.entry "${buts}.next invoke" > bind ${str2}.entry "focus ${str1}.entry" > > #checkbuttons > frame ${chks} > pack ${chks} \ > -side top \ > -expand y \ > -fill x \ > -pady 10 \ > -padx 10 > > checkbutton ${chks}.case \ > -text [get_indep String IgnoreCase] \ > -underline [get_indep Pos IgnoreCase] \ > -variable [itcl::scope edit_SearchNoCase] \ > -onvalue "-nocase" \ > -offvalue "" > > checkbutton ${chks}.regexp \ > -text [get_indep String RegExp] \ > -underline [get_indep Pos RegExp] \ > -variable [itcl::scope edit_SearchMethod] \ > -onvalue "-regexp" \ > -offvalue "-exact" > > checkbutton ${chks}.forward \ > -text [get_indep String SQLFfor] \ > -underline [get_indep Pos SQLFfor] \ > -variable [itcl::scope edit_SearchDirection] \ > -onvalue "-forwards" \ > -offvalue "-backwards" > pack ${chks}.case \ > -anchor nw \ > -side top \ > -padx 35 > pack ${chks}.regexp \ > -anchor nw \ > -side top \ > -padx 35 > pack ${chks}.forward \ > -anchor nw \ > -side top \ > -padx 35 > > #buttons > frame ${buts} > pack ${buts} \ > -side right \ > -pady 5 \ > -padx 5 > > button ${buts}.cancel \ > -text [get_indep String Cancel] \ > -underline [get_indep Pos Cancel] \ > -command " > ${this} Delete_Trace_SearchString ${buts}.cancel > itcl::delete object ${s} > " > button ${buts}.next \ > -text [get_indep String UtilSearch] \ > -underline [get_indep Pos UtilSearch] \ > -command " > ${this} SearchForNext > if {\$SearchFoundLength > 0} { > ${buts}.replace config > -state normal > } else { > ${buts}.replace config > -state disabled > } > " > > # We check whether the pattern can be found at the insertation point. > # It must be also selected > set pos [eval ${w} search ${edit_SearchMethod} ${edit_SearchNoCase} \ > -count SearchFoundLength \ > -- [list ${edit_SearchString}] insert] > if {[string compare ${pos} ""] != 0 && [${w} compare insert == \ > ${pos}]} { > if {[${w} tag ranges sel] != ""} { > set state normal > } else { > set state disabled > } > } else { > set state disabled > } > button ${buts}.replace \ > -text [get_indep String PafReplace] \ > -underline [get_indep Pos PafReplace] \ > -state ${state} \ > -command "${this} Replace_String ${buts}.replace" > if {${edit_SearchString} == ""} { > set state disabled > } else { > set state normal > } > button ${buts}.all \ > -text [get_indep String All] \ > -state ${state} \ > -command "${this} ReplaceAll ${w}" > > pack ${buts}.next \ > -fill x \ > -side top \ > -padx 10 \ > -pady 5 > pack ${buts}.cancel \ > -fill x \ > -side top \ > -padx 10 \ > -pady 5 > pack ${buts}.replace \ > -fill x \ > -side top \ > -padx 10 \ > -pady 5 > pack ${buts}.all \ > -fill x \ > -side top \ > -padx 10 \ > -pady 5 > > focus ${str1}.entry > > ${s} move_to_mouse > catch {${s} resizable yes no} > catch {${s} grab set} > > update idletasks > set geom [split [lindex [split [${s} geometry] "+"] 0] "x"] > ${s} minsize [lindex ${geom} 0] [lindex ${geom} 1] > } > > # > # Goto a specified line in the file > # > method GotoLine {} { > global sn_options > > set w $itk_component(editor) > set pos -2 > if {[catch {set pos [string trim [selection get]]}] == 0} { > if {[catch {set pos [expr int(${pos})]}]} { > set pos -1 > } > } > > if {${pos} < 0} { > set $itk_option(-linenumber_var) [${w} index insert] > } else { > set $itk_option(-linenumber_var) ${pos} > } > > set f [sourcenav::Window ${topw}.goto] > ${f} configure -title [sn_title [get_indep String EditGotoLine]] > ${f} configure -iconname [get_indep String EditGotoLine] > ${f} transient ${topw} > > frame ${f}.line > label ${f}.line.label \ > -text [get_indep String LineNumber] \ > -underline [get_indep Pos LineNumber] \ > -width 13 \ > -anchor w > > set line 0 > set char 0 > > entry ${f}.line.entry \ > -width 14 \ > -relief sunken \ > -bd 3 \ > -textvariable $itk_option(-linenumber_var) \ > -exportselection n > > ${f}.line.entry select to end > > button ${f}.line.button \ > -text [get_indep String Goto] \ > -underline [get_indep Pos Goto] \ > -command "${this} proceed_gotoline ${f}" > > pack ${f}.line.label \ > -side left > pack ${f}.line.entry \ > -side left > pack ${f}.line.button \ > -side left \ > -pady 10 \ > -padx 20 > > bind ${f}.line.entry "${f}.line.button invoke" > focus ${f}.line.entry > > pack ${f}.line \ > -side top \ > -fill both > > focus ${f}.line.entry > ${f} move_to_mouse > catch {${f} resizable no no} > > catch {${f} grab set} > } > method proceed_gotoline {f} { > global tcl_platform > > itcl::delete object ${f} > update idletasks > if {$tcl_platform(platform) == "windows"} { > sn_wait 50 > } > ${this} SetFondPos [set $itk_option(-linenumber_var)] 1 0 > } > > # > # The basic insertion routine for brackets > # If requested, does bracket matching > # > # w: Editor widget > # sb: start bracket > # eb: end bracket > # insert: marks if a bracket is inserted or the region > # has to selected > proc Insert_Mark_Bracket {args} { > after idle "Editor&::x_Insert_Mark_Bracket ${args}" > } > proc x_Insert_Mark_Bracket {w sb {bracket 1}} { > global sn_options > > #by insertion, do a bracket selection > #by double-click on a bracket, do a real selection > if {${bracket}} { > set tag bracket > } else { > set tag sel > } > > #delay is invalid > if {$sn_options(def,edit-bracket-delay) <= 0} { > return > } > > set ebees "\"\'\>\]\)\}" > set sbees "\"\'\<\[\(\{" > set i [string first ${sb} ${ebees}] > if {${i} != -1} { > set eb [string index ${sbees} ${i}] > } else { > set i [string first ${sb} ${sbees}] > if {${i} == -1} { > return > } > set eb [string index ${ebees} ${i}] > } > > set str_range "" > > switch -- ${sb} { > \" - > \' { > #if string tag is availiable, mark the whole reagon > #of the string > set tags [${w} tag names insert] > if {[lsearch \ > -exact ${tags} str] != -1} { > set str_range [${w} tag prevrange str insert+1c] > if {${str_range} != ""} { > set idx [lindex ${str_range} 0] > set end [lindex ${str_range} end] > > #somebody tries to select a region in text area > #can he do it? > if {[${w} compare ${idx} < insert] && [${w} compare \ > ${end}-1c > insert]} { > return > } > } > } > > #do normal selection (locate a matching \" > if {${str_range} == ""} { > set ob "" > set cb ${eb} > set beg_off [${w} index "insert-200c"] > set cont [${w} get ${beg_off} "insert-1c"] > set forw 0 > } > } > \> - > \] - > \) - > \} { > set ob ${sb} > set cb ${eb} > set beg_off 0.0 > if {${bracket}} { > set cont [${w} get ${beg_off} insert] > } else { > set cont [${w} get ${beg_off} "insert+1c"] > } > set forw 0 > } > \< - > \[ - > \( - > \{ { > set ob ${sb} > set cb ${eb} > set beg_off "insert" > set cont [${w} get ${beg_off} end] > set forw 1 > } > default { > return > } > } > > if {${str_range} == ""} { > # brace_balance is written in C. If it does not exist just > return. > if {[::info commands brace_balance] != ""} { > set off [brace_balance ${cont} ${forw} ${ob} ${cb}] > } else { > return > } > if {${off} == -1} { > return > } > set idx [${w} index "${beg_off} + ${off} chars"] > set end [${w} index insert] > } > > ${w} tag remove ${tag} 0.0 end > ${w} see ${idx} > > if {${str_range} == ""} { > if {[${w} compare ${idx} > "insert"]} { > set end ${idx} > set idx "insert" > } \ > elseif {${bracket}} { > set end "insert" > } else { > set end "insert+1c" > } > } > > after idle "${w} tag add ${tag} ${idx} ${end}" > if {${bracket}} { > # If we just insert remove the selection. > set cmd "; ${w} tag remove ${tag} 0.0 end" > } else { > set cmd "" > } > update idletasks > after $sn_options(def,edit-bracket-delay) "${w} see insert ${cmd}" > } > > # > # The basic insertion routine for adding a new line > # > proc Newline w { > global sn_options > if {$sn_options(def,edit-indentwidth) <= 0} { > tkTextInsertChar ${w} \n > } else { > set l [${w} get "insert linestart" "insert lineend"] > set rest [${w} get "insert" "insert lineend"] > set ind_off [list 0 0] > regexp \ > -indices "^\[ \t\]*" ${l} ind_off > set end [lindex ${ind_off} 1] > set indentStr [string range ${l} 0 ${end}] > # Unexpand the spaces to TABS. > set spaces [format "%8.8s" ""] > regsub \ > -all ${spaces} ${indentStr} "\t" indentStr > regsub \ > -all "\[ \]+\t" ${indentStr} "\t" indentStr > set l [${w} get insert "insert lineend"] > set ind_off [list 0 0] > regexp \ > -indices "^\[ \t\]*" ${l} ind_off > set end [expr [lindex ${ind_off} 1] + 1] > tkTextInsertChar ${w} \n${indentStr} > } > } > > # The function tries to get an identifier from the text widget. > # 1. from the selection (if that exists) > # 2. from the cursor position > proc get_current_word {{cls ""}} { > global sn_all_scopes > set w [${cls} editor] > set name "" > > if {[catch {set name [selection get]}]} { > set name "" > foreach nm [${w} tag names insert] { > if {[lsearch \ > -exact ${sn_all_scopes} ${nm}] != -1} { > set rng [${w} tag prevrange ${nm} "insert +1c"] > set name [format_for_retriever [eval ${w} get ${rng}]] > } > } > if {${name} == ""} { > set name [format_for_retriever [${w} get "insert wordstart" \ > "insert wordend"]] > } > } > > return ${name} > } > > proc Get_XSelection {{cls ""}} { > if {![catch {set string [selection get]}]} { > set off [string first "\n" ${string}] > if {${off} != -1} { > set string [string trim [string range ${string} 0 \ > [expr ${off} - 1]]] > } > } else { > set string "" > } > > #look for the current symbol in the editor > if {${string} == "" && ${cls} != ""} { > set sel [${cls} Selection] > if {${sel} != ""} { > set string [lindex ${sel} 1] > if {[lindex ${sel} 2] != ""} { > set string "[lindex ${sel} 2] ${string}" > } > } > } > > #look for the current word in the editor > if {${string} == "" && ${cls} != ""} { > set string [Editor&::get_current_word ${cls}] > } > > return ${string} > } > > proc search_definition {cls {string ""} {file ""}} { > search_implementation ${cls} ${string} ${file} "def" > } > proc search_implementation {cls {string ""} {file ""} {imp_def "imp"}} { > global sn_scopes > set cls [namespace tail $cls] > > if {$cls != "" && [[$cls cget -parent] isakeep] == 1} { > set cmd "${cls} gotofile_cb" > } else { > set cmd "" > } > > #see if cursor stays on a symbol header > if {${cls} != ""} { > set editor [${cls} editor] > set pos [$editor index {insert wordstart}] > } > if {${cls} != "" && [points_to_header [${cls} editor] ${pos}] != > ""} { > set sel [${cls} Selection] > set scope [lindex ${sel} 0] > set sym [lindex ${sel} 1] > set cls [lindex ${sel} 2] > set file [lindex ${sel} 3] > set type [lindex ${sel} 5] > set prm [lindex ${sel} 6] > > set string [string trim "${cls}\:\:${sym}" "\:\:"] > > set have_declaration 1 > } else { > if {${string} == ""} { > set string [Get_XSelection ${cls}] > } > if {${string} == ""} { > bell > return > } > set from "" > set type "" > set prm "" > set to "" > > set have_declaration 0 > } > > #look using the following table > #pattern file param type > #pattern file param "" > #pattern "" param type > #pattern "" param "" > #pattern "" "" "" > #don't look for declarations, if we already have declarations > if {${imp_def} == "imp"} { > lappend scopes {fu mi} > if {! ${have_declaration}} { > lappend scopes {fd md fr} > } > } else { > lappend scopes {fd md fr} > #exclude implementations as like the scopes "fd md fr" > set rest "" > foreach s ${sn_scopes} { > if {[lsearch \ > -exact {fu mi fd md fr} ${s}] == -1} { > lappend rest ${s} > } > } > if {${rest} != ""} { > lappend scopes ${rest} > } > } > foreach scopegrp ${scopes} { > lappend looking_list [list ${file} ${scopegrp} ${prm} ${type}] > lappend looking_list [list ${file} ${scopegrp} ${prm} ""] > lappend looking_list [list "" ${scopegrp} ${prm} ${type}] > lappend looking_list [list "" ${scopegrp} ${prm} ""] > lappend looking_list [list "" ${scopegrp} "" ""] > } > > #find first "mi fu", if nothing is found try to find declaration > #look first in the same file, when nothing is found, try to find > #in all files > foreach l ${looking_list} { > set file [lindex ${l} 0] > set scopes [lindex ${l} 1] > set prm [lindex ${l} 2] > set type [lindex ${l} 3] > > #make sure that a fetch hasn't been done twice > if {[info exists > looking_arr(${file},${scopes},${prm},${type})]} { > continue > } > set looking_arr(${file},${scopes},${prm},${type}) 1 > > #1. find implementation by accepting types and parameters > set ret [sn_retrieve_symbol ${string} ${scopes} ${file} \ > -exact 1 0 ${cmd} "" ${type} ${prm}] > > #if something found, break the selection > if {${ret}} { > break > } > } > catch {unset looking_list} > catch {unset looking_arr} > } > > method RetrieveObject {} { > global sn_options Parser_Info > set case -1 > set file $itk_option(-filename) > if {${file} != $sn_options(noname_file)} { > set type [file_type_using_suf [file extension ${file}]] > set case $Parser_Info(${type},CASE) > } > if {[catch {set name [selection get]}]} { > set name "" > } > set name [string trim ${name}] > if {${name} == ""} { > sn_error_dialog [get_indep String NoSelection] [get_indep > String \ > MultiRetriever] > return > } > > if {!${case}} { > set name [string toupper ${name}] > } > sn_retrieve_symbol [list ${name}] all "" \ > -exact 1 1 > } > > #this function set the color for the different symbols > #displayed in the editor > proc init_tags {t} { > global sn_options > global combobox_editor_scopes > > if {$sn_options(iscolor)} { > #init symbol colors > set sc [::lunique [lsort [eval concat [array get \ > combobox_editor_scopes]]]] > foreach tg "key ${sc}" { > catch {${t} tag configure ${tg} \ > -foreground $sn_options(def,color_${tg})} > } > if {$sn_options(def,edit-xref-highlight)} { > catch {${t} tag configure "xref_g" \ > -foreground orange} > catch {${t} tag configure "xref_u" \ > -foreground green} > catch {${t} tag configure "xref_l" \ > -foreground "cornflower blue"} > } > > ${t} tag configure rem \ > -foreground $sn_options(def,color_rem) > ${t} tag configure str \ > -foreground $sn_options(def,color_str) > ${t} tag configure bracket \ > -background $sn_options(def,bracketmatch-bg) \ > -foreground white > > catch {${t} tag raise mi md} > } else { > ${t} tag configure bracket \ > -background black \ > -foreground white > } > ${t} tag configure grep \ > -foreground white \ > -background black > } > > method color_file {{run_parse 1}} { > if {${highlight}} { > UpdateHighlights ${run_parse} > > #read symbols from DB > set file_syms [get_file_symbols $itk_option(-filename)] > > #create tags for the found symbols in the editor > sn_db_create_symbol_tags $itk_component(editor) ${file_syms} > "in iu lv" > > #mark actual tag and display found tags into > #the combobox > GetFileTags 0 ${file_syms} > } > } > > # This file is called, when ever a file must be edited. > method editfile {f {line ""} {revert ""} {run_parse 1}} { > global sn_options > global SyncEditors_Disabled > > # Check we haven't been called before creation. > if {![info exists itk_component(editor)] \ > || ![winfo exists $itk_component(editor)]} { > return > } > > if {${f} == ""} { > return 0 > } > > # Verify if the momentan file is modified. > if {${revert} != "revert" && [Ask_For_Modified revert] == 0} { > return 0 > } > > # We should never be asked to edit a directory. > if {[file isdirectory ${f}]} { > error "editfile method called for a directory \"${f}\"" > } > > # Test if file exists and readable, returns if > # file doesn't exist. > if {${f} != $sn_options(noname_file) &&(! [file exists ${f}] || ! \ > [file readable ${f}])} { > return 0 > } > > # Parse file to see if we could add it into the project. > if {[file exists ${f}]} { > # Make sure that we want to refresh a file before > # editing it. This could be a slow mechanism, when somebody > # wants to work only with "Fast Save" (without refreshing). > if {$sn_options(def,auto-reparse)} { > if {! [sn_parse_uptodate [list ${f}] 0]} { > return 0 > } > } > } > > if {$itk_option(-filename) != ${f}} { > set itk_option(-filename) ${f} > } > > # Change to the project directory. > catch {cd $sn_options(sys,project-dir)} > > if {[catch {set lastpos [$itk_component(editor) index insert]}]} { > set lastpos 1.0 > } > if {[catch {set markpos [$itk_component(editor) index markpos]}]} { > set markpos 1.0 > } > > # Disable synchronize mode. > incr SyncEditors_Disabled > > # Change view-mode to normal. > set old_mode [$itk_component(editor) cget -state] > if {${old_mode} != "normal"} { > $itk_component(editor) config \ > -state normal > } > > # Open an existing file. > if {[file exists $itk_option(-filename)]} { > # Verify if there is a buffer with the same filename. > set other [find_Editor_with_File $itk_option(-filename) ${this}] > if {${revert} != "revert" && ${other} != ""} { > # Call the friend function to copy the contents > # from the other editor into the actual editor. > friend_copy ${this} ${other} > } else { > # Load the file from disk. > if {[catch {set f [open $itk_option(-filename) r]} msg]} { > sn_error_dialog "${msg} $itk_option(-filename)" > return > } > fconfigure ${f} \ > -encoding $sn_options(def,encoding) \ > -blocking 0 > > $itk_component(editor) delete 1.0 end > $itk_component(editor) insert 1.0 \ > [read -nonewline ${f}] > > close ${f} > $this configure -file_changed 0 > > # Save modification time. > set file_mtime [file mtime $itk_option(-filename)] > } > > # Color tags. > color_file ${run_parse} > } else { > # Edit new file. > $itk_component(editor) delete 1.0 end > > # When nothing is typed in, the file isn't modified!! > $this configure -file_changed 0 > # No modification time. > set file_mtime 0 > > # Delete entries from combobox. > if {$itk_option(-symbols) != ""} { > $itk_option(-symbols) configure -contents "" -entrytext "" > } > } > > # Revert undo list. > tkTextUndoSetup $itk_component(editor) > > # Mark last position. > $itk_component(editor) mark set lastpos ${lastpos} > $itk_component(editor) mark set markpos ${markpos} > $itk_component(editor) mark set insert 0.0 > $itk_component(editor) tag remove sel 0.0 end > > # Goto specified position. > if {${line} != "" && ${line} >= 0} { > SetFondPos ${line} 1 0 > } > > # Restore old view-mode. > if {${old_mode} != "normal"} { > $itk_component(editor) config \ > -state ${old_mode} > } > > # Reenable synchronize mode. > incr SyncEditors_Disabled -1 > > # Configure reusable button to the modified flag. > DispModified > > # Set filename on the title. > SetTitle > > focus $itk_component(editor) > > # Successfull > return 1 > } > > method get_file_symbols {file} { > global sn_options sn_sep > if {[::info commands paf_db_fil] == ""} { > return "" > } > return [paf_db_fil seq \ > -col {2 3 4 1 5 6 7} "${file}${sn_sep}"] > } > > # Do the housekeeping so we can open a file, and call tkeEdit to actually > # do the editing > proc EditFile {symbol file {line ""} {search 1} {state ""}} { > global sn_options > global tkeWinNumber sn_debug > > if {${file} == ""} { > return "" > } > > #convert first the file name to be edited to a > #project-related name > set file [sn_convert_FileName ${file}] > > #make sure we stay in project directory (different interpeters). > catch {cd $sn_options(sys,project-dir)} > > #verify if we have a read-only project > if {${state} == ""} { > if {$sn_options(readonly)} { > set state disabled > } else { > set state normal > } > } > > set external_editor [sn_external_editor ${file}] > > #verify if the default external editor is not empty > if {${external_editor} == ""} { > set external_editor $sn_options(def,edit-external-editor) > } > > set external_editor [sn_filecmd format \ > -internal ${external_editor}] > > #use external Editor ! > if {${external_editor} != ""} { > if {[regexp "(emacs|gnuclient|gnudoit)" ${external_editor}]} { > if {[string compare ${line} ""] == 0} { > set line 1.0 > } > sn_start_emacs ${file} ${line} ${state} ${external_editor} > } else { > if {${line} == ""} { > set line 1 > set col 0 > } else { > set line [trim_text_index ${line}] > set pos [split ${line} {.}] > set line [lindex ${pos} 0] > set col [lindex ${pos} 1] > } > > regsub \ > -all {%l} ${external_editor} ${line} external_editor > regsub \ > -all {%c} ${external_editor} ${col} external_editor > regsub \ > -all {%i} ${external_editor} [tk appname] external_editor > regsub \ > -all {%d} ${external_editor} > $sn_options(sys,project-dir) \ > external_editor > > if {![regsub \ > -all {%f} ${external_editor} ${file} external_editor]} { > lappend external_editor ${file} > } > > lappend external_editor "<" $sn_options(def,null_dev) > > sn_log "Editor command: ${external_editor}" > > #read the contents into editor in the background > set fd [open "| ${external_editor}"] > fconfigure ${fd} \ > -encoding $sn_options(def,system-encoding) \ > -blocking 0 > > #wait until the contents are readed, > #some times the executed program is so fast, that the > #following command failes. > catch {fileevent ${fd} readable "wait_editor_end ${fd}"} ># FIXME : This will block the GUI for 0.5 sec, that is not acceptable > after 500 > } > return "" > } > > #verify of there is an existing window with the > #same file name > set name [find_window_with_file ${file} ${state}] > > #if window is availiable, then raise it > if {${name} != ""} { > ${name} view edit > set center 0 > if {${line} < 1.0} { > set line "" > } > } else { > # The file is not being edited, check whether is has been changed > # outside of the project ! > # when the file is to update, the update window will be displayed > if {${search} && [::info commands paf_db_f] != ""} { > #when auto-parsing is disabled, file has to be added, whe > #it's not in the project. > if {! $sn_options(def,auto-reparse)} { > #set f [paf_db_f get -key $file] > set f [paf_db_f seq \ > -col 0 ${file}] > } > #reparse file if it's modified outside or the file is new. > if {$sn_options(def,auto-reparse) || ${f} == ""} { > if {![sn_parse_uptodate [list ${file}]]} { > return 0 > } > } > } > > set center 1 > > # Now, we check whether there is a reusable window. > set win [MultiWindow&::find_Reusable] > if {${win} != ""} { > > #disable gotosymbol > global gotosymbol_active > ::set gotosymbol_active 0 > > #raise editor in the multi window > ${win} view edit > > #enable gotosymbol > ::set gotosymbol_active 1 > > #get editor class & widget > set ed [${win} editor] > set edw [${win} editw] > if {${ed} == ""} { > return "" > #Something wrong ?? > } > > #before edit the file, add the current position > #to the prev/next stack > ${win} history_stack_add_point ${ed} > > #edit file > ${ed} editfile ${file} \ > -1 "" 0 > > #set edit position > if {${line} == ""} { > ${edw} mark set insert 0.0 > ${edw} mark set anchor insert > } > ${ed} SetFondPos ${line} ${center} 0 > > #return the edit widget > return ${edw} > } > > #create a new multiple window > incr tkeWinNumber > set name .multiwindow-${tkeWinNumber} > > MultiWindow& ${name} \ > -symbolname ${file} \ > -raise edit > incr tkeWinNumber > } > > set editor [${name} component editor] > # FIXME: Should be using components. > set editw [$editor editor] > > if {${line} != ""} { > > #before edit the file, add the current position > #to the prev/next stack > ${name} history_stack_add_point $editor > > if {[$editor cget -file_changed] && ${symbol} != "" && \ > [string last " " ${symbol}] != -1} { > set off [lindex ${symbol} 0] > if {${off} == "" || ${off} == "dummy"} { > set off 0 > } > set tg [join [lrange ${symbol} 1 end]] > set pos [${editw} tag ranges ${tg}] > set len [llength ${pos}] > set off [expr ${off} * 2] > > if {${len} <= ${off}} { > set off [expr ${len} - 2] > } > $editor SetFondPos [lindex ${pos} ${off}] ${center} 0 > } else { > $editor SetFondPos ${line} ${center} 0 > } > } else { > $editor SetFondPos ${line} ${center} 0 > } > > #maybe readonly state > if {${state} != ""} { > ${editw} config \ > -state ${state} > } > > return ${editw} > } > > method new_file {} { > global sn_options > global prj_lines_num > > if {[Ask_For_Modified new] == 0} { > return 0 > } > editfile $sn_options(noname_file) \ > -1 revert > } > > common last_accessed_dir "" > > proc FileDialog {w args} { > global sn_options > global tk_strictMotif > global tcl_platform > global Avail_Parsers Parser_Info > > # When called with ::.foo we need to just use .foo as the widget name > set w [namespace tail ${w}] > > #default is project directory and not current directory, because > #of symbolic link problems! > if {${last_accessed_dir} == ""} { > if {$sn_options(sys,project-dir) != ""} { > set last_accessed_dir $sn_options(sys,project-dir) > } else { > set last_accessed_dir [pwd] > } > } > > #analyze the arguments > set cnt [llength ${args}] > set title "" > set script "" > set prefix "file_dialog" > set save_open "open" > set multiple 0 > set initialdir "" > set extensions "" > set initialfile "" > if {$tcl_platform(platform) == "windows"} { > #set defaultextension ".cpp" > set defaultextension "" > } else { > #set defaultextension ".c" > set defaultextension "" > } > for {set i 0} {${i} < ${cnt}} {incr i} { > set arg [lindex ${args} ${i}] > incr i > set val [lindex ${args} ${i}] > switch -- ${arg} { > "-title" { > set title ${val} > } > "-script" { > set script ${val} > } > "-prefix" { > set prefix ${val} > } > "-save_open" { > set save_open ${val} > } > "-multiple" { > set multiple ${val} > } > "-initialdir" - > "-dir" { > set initialdir ${val} > } > "-extensions" { > set extensions ${val} > } > "-defaultextension" { > set defaultextension ${val} > } > "-initialfile" { > set initialdir [file dirname ${val}] > set initialfile [file tail ${val}] > } > default { > bell > return > } > } > } > if {${title} == ""} { > if {${save_open} == "open"} { > set title [get_indep String Open] > } else { > set title [get_indep String Save] > } > } > if {${initialdir} == "" || ${initialdir} == "."} { > set initialdir ${last_accessed_dir} > } > > #don't call standard motif dialog box, alwayes Tk > #on windows, we call the default dialog box > if {$tcl_platform(platform) != "windows"} { > set old_motif ${tk_strictMotif} > } > > #constract file prefixes from user defined > if {${extensions} != ""} { > set types ${extensions} > } else { > #use default extensions > lappend types [list [get_indep String AllFiles] "*"] > foreach type ${Avail_Parsers} { > set newsuf "" > foreach s $Parser_Info(${type},SUF) { > lappend newsuf ${s} > } > if {${newsuf} != ""} { > lappend types [list $Parser_Info(${type},TYPE) ${newsuf}] > } > } > } > if {${save_open} == "open"} { > if {$tcl_platform(platform) == "unix"} { > #don't call motif dialog box > set f [tkFDialog open \ > -parent ${w} \ > -title ${title} \ > -initialdir ${initialdir} \ > -defaultextension ${defaultextension} \ > -filetypes ${types} \ > -multiple ${multiple} \ > -initialfile ${initialfile}] > } else { > set f [tk_getOpenFile \ > -parent ${w} \ > -title ${title} \ > -initialdir ${initialdir} \ > -defaultextension ${defaultextension} \ > -filetypes ${types} \ > -multiple ${multiple} \ > -initialfile ${initialfile}] > } > } else { > if {$tcl_platform(platform) == "unix"} { > #don't call motif dialog box > set f [tkFDialog save \ > -parent ${w} \ > -title ${title} \ > -initialdir ${initialdir} \ > -defaultextension ${defaultextension} \ > -filetypes ${types} \ > -initialfile ${initialfile}] > } else { > set f [tk_getSaveFile \ > -parent ${w} \ > -title ${title} \ > -initialdir ${initialdir} \ > -defaultextension ${defaultextension} \ > -filetypes ${types} \ > -initialfile ${initialfile}] > } > } > > #store last accessed directory > if {${f} != ""} { > if {${multiple}} { > set ff [lindex ${f} 0] > } else { > set ff ${f} > } > catch {set last_accessed_dir [file dirname ${ff}]} > } > > if {${f} != "" && ${script} != ""} { > ::eval ${script} [list ${f}] > } > #always return used file name > return ${f} > } > > #choose a directory > proc DirDialog {w args} { > global sn_options > global tcl_platform > > #default is project directory and not current directory, because > #of symbolic link problems! > if {${last_accessed_dir} == ""} { > if {$sn_options(sys,project-dir) != ""} { > set last_accessed_dir $sn_options(sys,project-dir) > } else { > set last_accessed_dir [pwd] > } > } > > #analyze the arguments > set cnt [llength ${args}] > set title "" > set script "" > set initialdir "" > set prefix "file_dialog" > for {set i 0} {${i} < ${cnt}} {incr i} { > set arg [lindex ${args} ${i}] > incr i > set val [lindex ${args} ${i}] > switch -- ${arg} { > "-title" { > set title ${val} > } > "-script" { > set script ${val} > } > "-prefix" { > set prefix ${val} > } > "-initialdir" - > "-dir" { > set initialdir ${val} > } > default { > bell > return > } > } > } > > if {${title} == ""} { > set title [get_indep String SelectDirectory] > } > > if {${initialdir} == "" || ${initialdir} == "."} { > set initialdir ${last_accessed_dir} > } > > if {$tcl_platform(platform) == "windows"} { > # ide_get_directory doesn't like a leading :: in the > # window name, so we remove it if any. > set w [namespace tail $w] > set dir [ide_get_directory \ > -initialdir ${initialdir} \ > -parent ${w} \ > -title ${title}] > #store last accessed directory > if {${dir} != ""} { > set last_accessed_dir ${dir} > } > > if {${dir} != "" && ${script} != ""} { > ::eval ${script} [list ${dir}] > return "" > } else { > return ${dir} > } > } else { ># FIXME: What is this -script option doing here? > set obj [sourcenav::DirDialog ${w}.dirdialog \ > -title ${title} \ > -script ${script} \ > -initialdir ${initialdir}] > > set dir [${obj} activate] > itcl::delete object ${obj} > if {${dir} != ""} { > set last_accessed_dir ${dir} > } > if {${dir} != "" && ${script} != ""} { > eval ${script} [list ${dir}] > return "" > } else { > return ${dir} > } > } > } > > method open_file_cb {file} { > global sn_options > global prj_lines_num > > #make sure we stay in project directory (different interpeters). > catch {cd $sn_options(sys,project-dir)} > > #it can happen, that the open-dialog has changed the > #current working directory. > catch {cd $sn_options(sys,project-dir)} > > if {![file exists ${file}]} { > sn_error_dialog "[get_indep String FileNotExist]: ${file}" \ > [get_indep String FileNotExist] > } else { > catch {set file [sn_convert_FileName ${file}]} > editfile ${file} \ > -1 revert > #remove selection, somehow the text widget have strange behavior > #after calling the file dialog > $itk_component(editor) tag remove sel 0.0 end > } > focus $itk_component(editor) > } > > method open_file {} { > global sn_options > if {[Ask_For_Modified open] == 0} { > return 0 > } > set ret [FileDialog ${this} \ > -title [get_indep String Open] \ > -script [list ${this} open_file_cb] \ > -prefix open_file] > return 1 > } > > method saveas_file_cb {fast file} { > set file [sn_convert_FileName ${file}] > set xref [sn_processes_running] > > #Save file as a file, that not exist in the project > #when xref is running (fastsave only) > if {${xref} && ${fast} == 0} { > #focus $editor > set answer [tk_dialog auto [get_indep String > SaveAsFastSaveTitle] \ > "[get_indep String XRefIsRunning]\n[get_indep String \ > SaveAsFastSave]\n${file} ?" question_image 0 [get_indep > String \ > FastSave] [get_indep String Cancel]] > if {${answer} != 0} { > return 0 > } > set fast 1 > } > > return [save_file ${fast} ${file}] > } > > # Save As ... > method saveas_file {{fast 0} {file ""}} { > global sn_options > > #noname has to be replaced with blank > if {${file} == $sn_options(noname_file)} { > set file "" > } > if {${file} != ""} { > set initialdir [file dirname ${file}] > set file [file tail ${file}] > } else { > set initialdir "" > } > set ret [FileDialog ${this} \ > -title [get_indep String EditSaveFileAs] \ > -script [list ${this} saveas_file_cb ${fast}] \ > -prefix saveas_file \ > -save_open save \ > -initialdir ${initialdir} \ > -initialfile ${file}] > if {${ret} == ""} { > return 0 > } else { > return 1 > } > } > > # Quick Save > method fastsave_file {} { > return [save_file 1] > } > > method revert_file {{mode ""} {ignore_obj ""}} { > global SyncEditors_Disabled > > if {${mode} != "revert"} { > if {[sn_processes_running]} { > bell > return > } > set answer [Ask_For_Revert revert] > } else { > set answer 0 > } > > #reopen file > # > #Actualy we must revert all the editors with the > #same file name > if {${answer} != 0} { > return > } > incr SyncEditors_Disabled > foreach cls [itcl_info objects "*" \ > -class Editor&] { > if {[lsearch \ > -exact ${ignore_obj} ${cls}] != -1} { > continue > } > if {[${cls} cget -filename] == $itk_option(-filename)} { > set ed [${cls} editor] > ${cls} editfile $itk_option(-filename) "" revert > catch {${ed} see lastpos} > ${ed} mark set insert lastpos > ${cls} find_and_mark_tag > } > } > incr SyncEditors_Disabled -1 > } > > # Save the contents of a specified text widget into a specified file > # The previous contents of the file is saved to a ".bak" file before > being > # overwritten > method save_file {{fast 0} {file ""}} { > global sn_options > > #make sure we stay in project directory (different interpeters). > catch {cd $sn_options(sys,project-dir)} > > if {${file} != ""} { > set ff ${file} > } else { > set ff $itk_option(-filename) > } > > #no filename is specified > if {${ff} == $sn_options(noname_file)} { > return [saveas_file ${fast}] > } > > #file isn't modified > if {${ff} == $itk_option(-filename) && !$itk_option(-file_changed)} { > return 1 > } > > #xref is running, only fastsave is possible > #if edit mode disabled, no save possible > if {!${fast} && [sn_processes_running] || $sn_options(readonly)} { > bell > return 0 > } > > #test if the file has been modified external > if {[file exists ${ff}] && ${file_mtime} != 0 && ${file_mtime} != \ > [file mtime ${ff}]} { > set answer [tk_dialog auto [get_indep String \ > FileModifiedOutsideTitle] "[format [get_indep String \ > FileModifiedOutside] ${ff}]" question_image 0 [get_indep > String \ > Overwrite] [get_indep String Cancel]] > if {${answer} != 0} { > return 0 > } > } > > if {[sn_save_file $itk_component(editor) ${ff}] == 0} { > return 0 > } > > set file_mtime [file mtime ${ff}] > #file isn't modified now. > $this configure -file_changed 0 > > #refresh filename (needed by save-as) > if {${ff} != $itk_option(-filename)} { > set filename ${ff} > } > > #recolor file, after storing the new file name > if {!${fast}} { > color_file > } > > #That's meen that it is possible that the file is > #already availiable in other buffer and now has > #been overridden, revert those files > set allobj [itcl_info objects "*" \ > -class Editor&] > foreach other ${allobj} { > if {${other} == ${this} || [${other} cget -filename] != ${ff}} { > continue > } > set i [lsearch \ > -exact ${allobj} ${other}] > set ign_obj [lreplace ${allobj} ${i} ${i}] > if {!${fast}} { > ${other} revert_file "revert" ${ign_obj} > } else { > ${other} setmodified 0 > } > #update modification date for all other edit views > #with the dame file name > ${other} config \ > -file_mtime ${file_mtime} > ${other} DispModified > ${other} SetTitle > } > > # Important ! > set tkText($itk_component(editor),prevCmd) {} > > #actualize the reuse-checkbutton and the title > #to reset the changed flag > DispModified > SetTitle > > return 1 > } > > proc SaveAll {} { > catch {unset files} > #first fast save all files > foreach ed [itcl_info objects "*" \ > -class Editor&] { > if {[${ed} cget -file_changed]} { > ${ed} fastsave_file > set files([${ed} cget -filename]) 1 > } > } > catch {unset files} > } > > method insert_file_cb {f} { > global sn_options > > if {![file exists ${f}]} { > sn_error_dialog "[get_indep String FileNotExist]: ${f}" \ > [get_indep String FileNotExist] > return 0 > } > > #open file > if {[catch {set f [open ${f} r]} msg]} { > sn_error_dialog "${msg} ${f}" > return 0 > } else { > fconfigure ${f} \ > -encoding $sn_options(def,encoding) \ > -blocking 0 > } > > #insert text into editor > if {![catch {$itk_component(editor) get sel.first sel.last}]} { > set fpos [$itk_component(editor) index sel.first] > tkTextReplace $itk_component(editor) [$itk_component(editor) > index sel.first] \ > [$itk_component(editor) index sel.last] [read \ > -nonewline ${f}] > } else { > set fpos [$itk_component(editor) index insert] > tkTextInsert $itk_component(editor) insert [read \ > -nonewline ${f}] > } > close ${f} > > #sometimes there is a wrong selected block, delete it > set epos [$itk_component(editor) index insert] > $itk_component(editor) tag del sel > #mark new inserted text > $itk_component(editor) tag add sel ${fpos} ${epos} > > #see last inserted character > $itk_component(editor) see insert > > return 1 > } > > method insert_file {} { > set ret [FileDialog ${this} \ > -title [get_indep String EditInsertFile] \ > -script [list ${this} insert_file_cb] \ > -prefix insert_file] > if {${ret} == ""} { > return 0 > } else { > return 1 > } > } > > #find a window with specified filename > proc find_window_with_file {file {state "normal"}} { > foreach win [itcl_info objects "*" -class MultiWindow&] { > set ed [${win} editor] > set ew [${win} editw] > if {${ed} == "" || ${ew} == ""} { > continue > } > if {[${ed} cget -filename] == ${file} && [${ew} cget -state] > == ${state}} { > return ${win} > } > } > return "" > } > > method SetFondPos {pos {center 0} {find_mark 1} {select 1}} { > global sn_options > global sn_all_scopes > > if {${pos} == ""} { > set pos [$itk_component(editor) index insert] > set select 0 > } > > if {$sn_options(def,edit-mark-current-position) == 0} { > set mrk 0 > } else { > set mrk 1 > } > > set w $itk_component(editor) > > ${w} mark set lastpos insert > > set poi_sn [string first "." ${pos}] > > set pos [trim_text_index \ > -digit ${pos}] > > if {${pos} == ""} { > bell \ > -displayof ${w} > return > } > > #cut integer value to be max. 8 digits > set line [lindex [split ${pos} .] 0] > if {[string length ${line}] > 8} { > set pos "[string range ${line} 0 8].[lindex [split ${pos} .] 1]" > } > > ${w} mark set insert ${pos} > ${w} mark set anchor insert > ${w} tag remove sel 0.0 end > if {${select}} { > if {${poi_sn} == -1} { > #mark or goto first character > if {${mrk}} { > ${w} tag add sel "insert linestart" "insert lineend + 1c" > } else { > #goto line, move the insert cursor to first printable > #character in the line > set txt [${w} get "insert linestart" "insert lineend"] > set txt1 [string trim ${txt}] > if {${txt} != ${txt1}} { > set i [string first [string range ${txt1} 0 0] > ${txt}] > if {${i} > 0} { > ${w} mark set insert "${pos} +${i}c" > ${w} mark set anchor insert > } > } > } > } else { > set fnd 0 > foreach nm [${w} tag names insert] { > if {[lsearch \ > -exact ${sn_all_scopes} ${nm}] != -1} { > set fnd 1 > set rng [${w} tag prevrange ${nm} "insert+1c"] > if {${mrk}} { > eval ${w} tag add sel ${rng} > } > break > } > } > > if {${mrk} && !${fnd}} { > ${w} tag add sel "insert wordstart" "insert wordend" > } > } > } > > if {${center}} { > set pos [expr int(${line} - [text_page_num_lines ${w}] / 2) - 1] > if {${pos} < 0} { > set pos 0 > } > ${w} yview ${pos} > } else { > ${w} see ${pos} > } > > if {${pos} > 1} { > find_and_mark_tag > } > > focus $itk_component(editor) > } > > method addselection {pos ranges} { > eval $itk_component(editor) tag add sel ${pos} ${ranges} > $itk_component(editor) mark set lastpos insert > $itk_component(editor) mark set insert ${pos} > $itk_component(editor) see insert > } > > method DispModified {} { > if {[winfo exists $itk_option(-mesg_area).reuse]} { > if {$itk_option(-file_changed)} { > $itk_option(-mesg_area).reuse config \ > -state disabled > } else { > $itk_option(-mesg_area).reuse config \ > -state normal > } > } > } > > #Find an editor with a specified file name > proc find_Editor_with_File {file {except ""}} { > foreach cls [itcl_info objects "*" \ > -class Editor&] { > if {${cls} != ${except} && ${file} == [${cls} cget -filename]} { > return ${cls} > } > } > return "" > } > > method Ask_For_Revert {reason} { > global sn_options > > #we can revert the buffer, when there is another > #editor with the same file name > if {${reason} != "revert" && $itk_option(-file_changed) && > $itk_option(-filename) != \ > $sn_options(noname_file) && [find_Editor_with_File > $itk_option(-filename) \ > ${this}] != ""} { > return 0 > } > if {$itk_option(-file_changed)} { > > if {$itk_option(-filename) == $sn_options(noname_file)} { > set file "Buffer" > } else { > set file $itk_option(-filename) > } > > switch ${reason} { > "new" { > set txt [get_indep String HasBeenModified] > set title [get_indep String EditNewFile] > set ok [get_indep String NewFile] > } > "open" { > set txt [get_indep String HasBeenModified] > set title [get_indep String OpenFile] > set ok [get_indep String Open] > } > "revert" { > set txt [get_indep String HasBeenModified] > set title [get_indep String RevertFile] > set ok [get_indep String Revert] > } > "another" { > set txt [get_indep String OpenNewBuffer] > set title [get_indep String RevertFile] > set ok [get_indep String Revert] > } > default { > set txt [get_indep String HasBeenModified] > set title [get_indep String RevertFile] > set ok [get_indep String Revert] > } > } > > focus $itk_component(editor) > set answer [tk_dialog auto ${title} "${file} ${txt}" \ > question_image 0 ${ok} [get_indep String Cancel]] > } else { > #file not modified > set answer 0 > } > return ${answer} > } > > method Ask_For_Modified {reason} { > global sn_options > > #we can revert the buffer, when there is another > #editor with the same file name > if {${reason} != "revert" && $itk_option(-file_changed) && > $itk_option(-filename) != \ > $sn_options(noname_file) && [find_Editor_with_File > $itk_option(-filename) \ > ${this}] != ""} { > return 1 > } > if {$itk_option(-file_changed)} { > > if {$itk_option(-filename) == $sn_options(noname_file)} { > set file "Buffer" > } else { > set file $itk_option(-filename) > } > > switch ${reason} { > "new" { > set txt [get_indep String HasBeenModified] > set title [get_indep String EditNewFile] > set ok [get_indep String NewFile] > } > "open" { > set txt [get_indep String HasBeenModified] > set title [get_indep String OpenFile] > set ok [get_indep String Open] > } > "revert" { > set txt [get_indep String HasBeenModified] > set title [get_indep String RevertFile] > set ok [get_indep String Revert] > } > "another" { > set txt [get_indep String OpenNewBuffer] > set title [get_indep String RevertFile] > set ok [get_indep String Revert] > } > default { > set txt [get_indep String HasBeenModified] > set title [get_indep String RevertFile] > set ok [get_indep String Revert] > } > } > > #Is Auto-Save enabled > if {$sn_options(def,auto-save)} { > set answer 1 > } else { > focus $itk_component(editor) > set answer [tk_dialog auto ${title} "${file} ${txt}" \ > question_image 0 [get_indep String Save] [get_indep > String \ > EditFastSave] [get_indep String DonotSave] \ > [get_indep String Cancel]] > } > switch -- ${answer} { > 0 { > #save > return [save_file] > } > 1 { > #fast save > return [fastsave_file] > } > 2 { > #don't save (revert) > #don't save file > return 1 > } > default { > #cancel > return 0 > } > } > } else { > #file not modified > return 1 > } > } > > method Title {{full 1}} { > global sn_options > > set tf [file tail $itk_option(-filename)] > if {$itk_option(-file_changed)} { > set tf "** ${tf} **" > } > if {[$itk_component(editor) cget -state] != "normal"} { > append tf " [get_indep String FileViewOnly]" > } \ > elseif {[file exists $itk_option(-filename)] && ![file writable > $itk_option(-filename)]} { > append tf " [get_indep String TitleReadOnly]" > } > if {${full}} { > return [sn_title ${tf}] > } else { > return ${tf} > } > } > method Icon {} { > if {$itk_option(-file_changed)} { > return [sn_view_icon "" "** [file tail > $itk_option(-filename)] **"] > } else { > return [sn_view_icon [file tail $itk_option(-filename)]] > } > } > method SetTitle {} { > global sn_options sn_root > > #toplevel window > set win [winfo toplevel $itk_component(editor)] > > wm title ${win} [Title] > wm iconname ${win} [Icon] > set lines 0 > scan [$itk_component(editor) index "end-1c"] %d lines > > set nm [file join $sn_options(sys,project-dir) > $itk_option(-filename)] > > #display the file name in native OS conditions > set nm [file nativename ${nm}] > > set $itk_option(-message_var) "$nm: $lines [get_indep String Lines]" > } > > proc is_fileModified {file} { > #we must accept that by creating a file in an empty project > #paf_db_f is not defined. > if {[::info commands paf_db_f] == ""} { > return 0 > } > > #this happens when neu file is being edited! > if {![file exists ${file}]} { > return 0 > } > > #compare stored and actual file status > set filestatus [paf_db_f get \ > -key -col [list 0 1 2] ${file}] > file stat ${file} st > > #modify time changed? > if {[lindex ${filestatus} 1] != $st(mtime)} { > return 1 > } > return 0 > } > > method UpdateHighlights {{run_parse 1}} { > global sn_options > global env > global sn_debug > global $itk_component(editor)-group > upvar #0 $itk_component(editor)-group grp > > if {! [file exists $itk_option(-filename)]} { > return > } > > #maybe the file is not availiable in the project > if {${run_parse}} { > if {$sn_options(def,auto-reparse)} { > if {![sn_parse_uptodate [list $itk_option(-filename)] 0]} { > return > } > } > } > > if {[::info commands paf_db_f] != ""} { > set highfile [paf_db_f get \ > -key -col {0 2} $itk_option(-filename)] > } else { > set highfile "" > } > > set grp [lindex ${highfile} 0] > > if {[lsearch \ > -exact $sn_options(sys,builtin-highlighting) ${grp}] != -1} { > global sn_text_highlight_group > ::set sn_text_highlight_group($itk_component(editor)) ${grp} > > sn_log "Highlighting -delall \"$itk_option(-filename)\", > group \"${grp}\"" > > Sn_Syntax_Highlight \ > -delall ${grp} $itk_component(editor) 1.0 end > return > } > > set highfile [lindex ${highfile} 1] > > #verify if the file is modified (modified status) > set mod [is_fileModified $itk_option(-filename)] > > if {!${mod} && ${highfile} != "" && [file exists ${highfile}]} { > sn_log "Highlighting \"$itk_option(-filename)\": ${highfile}" > if {[catch {Sn_Highlight_Text $itk_component(editor) > ${highfile}} err]} { > bgerror ${err} > } > if {$sn_options(def,edit-xref-highlight)} { > catch {Sn_Highlight_Text $itk_component(editor) > $itk_option(-filename).HIGH} > } > return > } > > set highcmd [sn_highlight_browser $itk_option(-filename) "h"] > if {${highcmd} == ""} { > sn_log "Empty highlighter command for \"$itk_option(-filename)\"" > return > } > > set outf [sn_tmpFileName] > lappend highcmd \ > -s ${outf} > > if {!${mod}} { > lappend highcmd \ > -n $sn_options(db_files_prefix) $itk_option(-filename) > } > > sn_log "Highlighter: ${highcmd}" > > if {${mod}} { > $itk_component(editor) tag remove key 1.0 end > $itk_component(editor) tag remove rem 1.0 end > if {[catch {eval exec \ > -- ${highcmd} << {[$editor get 1.0 end]}} err]} { > bgerror ${err} > return > } > } else { > if {[catch {eval exec \ > -- ${highcmd}} err]} { > bgerror ${err} > return > } > } > > if {!${mod}} { > set highfile [paf_db_f get \ > -key -col [list 2] $itk_option(-filename)] > } else { > set highfile ${outf} > } > > # It might happen, that the highlighting filename could > # not be inserted into thet database. > if {${highfile} == ""} { > set fd [open ${outf}] > fconfigure ${fd} \ > -encoding $sn_options(def,system-encoding) \ > -blocking 0 > set highfile [gets ${fd}] > close ${fd} > # Lets mark it for delete. > lappend outf ${highfile} > } > > sn_log "Loading: ${highfile}" > > if {${highfile} != ""} { > if {[catch {Sn_Highlight_Text $itk_component(editor) > ${highfile}} err]} { > bgerror ${err} > } > } > > if {$sn_options(def,edit-xref-highlight)} { > catch {Sn_Highlight_Text $itk_component(editor) > $itk_option(-filename).HIGH} > } > > if {[info exists env(TMP)] && [file dirname ${highfile}] != > $env(TMP)} { > lappend outf ${highfile} > } > > if {!${sn_debug}} { > file delete \ > -- ${outf} > } > } > > #all == -1: disable all filter flags > #all == 1: enable all filter flags > #all == 0: current state of filter flags > private method read_filetags {{all 0} {file_cont ""}} { > global sn_options sn_sep combobox_editor_scopes > > if {$itk_option(-symbols) == ""} { > error "read_filetags should not be called with a symbol combo" > } > > #we do have new symbols in the combo box, make sure that > #this symbols are drawn when pulldown the combo box > set displayed 0 > > if {$itk_option(-symbols_filter) != ""} { > upvar #0 $itk_option(-symbols_filter)-related related > set qry "" > foreach s [array names combobox_editor_scopes] { > upvar #0 $itk_option(-symbols_filter)-${s} value > if {${all} == -1} { > uplevel #0 "set $itk_option(-symbols_filter)-${s} off" > continue > } > if {${all} ||([info exists value] && ${value} != "off")} { > foreach db $combobox_editor_scopes(${s}) { > if {[::info commands paf_db_${db}] != ""} { > uplevel #0 "set > $itk_option(-symbols_filter)-${s} \ > ${s}" > lappend qry ${db} > } > } > } > } > } else { > set qry "" > set related 1 > } > > if {${qry} == ""} { > return "" > } > > if {${related}} { > #read only the symbols for the edited file > # Class,symbol,type,position. > if {${file_cont} != ""} { > #set qry ".+ \([join $qry "|"]\) .*" > set qry ".+${sn_sep}\([join ${qry} "|"]\)${sn_sep}.*" > #calls a C/function > return [sn_db_format_qry [lmatch \ > -regexp ${file_cont} ${qry}]] > } else { > #set qry ".+ \([join $qry "|"]\)\$" > set qry ".+${sn_sep}\([join ${qry} "|"]\)\$" > if {[::info commands paf_db_fil] != ""} { > set syms [paf_db_fil seq \ > -data -col {2 3 4 1} \ > -regexp ${qry} "$itk_option(-filename)${sn_sep}"] > #calls a C/function > return [sn_db_format_qry ${syms}] > } else { > return "" > } > } > } else { > #read all symbols of all files > set combo [string range $itk_option(-symbols) 0 [expr \ > [string last "." $itk_option(-symbols)] - 1]] > set syms "" > #set qry ".+ \([join $qry "|"]\)\$" > set qry ".+${sn_sep}\([join ${qry} "|"]\)\$" > catch { > set syms [paf_db_fil seq \ > -data -regexp ${qry} \ > -col {2 3 4 1}] > } > return [sn_db_format_qry ${syms}] > } > } > > method GetFileTags {all {file_cont ""}} { > #add symbols into combobox for symbol list > #only if the related flag is setted > upvar #0 $itk_option(-symbols_filter)-related related > > if {$itk_option(-symbols) != "" && ${related}} { > $itk_option(-symbols) configure -contents [read_filetags > ${all} ${file_cont}] > } > > #find the actual tag (symbol), mark it and view > #it in the combo box > find_and_mark_tag > } > > method find_tag {{pos ""}} { > global sn_options sn_sep > if {${pos} == ""} { > if {[catch {set idx [$itk_component(editor) index {insert > wordstart}]}]} { > return > } > } else { > set idx ${pos} > } > > set tag [lindex [lmatch [$itk_component(editor) tag names ${idx}] > "* *"] end] > if {${tag} == "" || [lindex ${tag} end] == "cl"} { > set sec_idx [$itk_component(editor) index "${idx} lineend -1c > wordstart"] > set sec_tag [lindex [lmatch [$itk_component(editor) tag names > ${sec_idx}] \ > "* *"] end] > > if {${sec_tag} == ""} { > if {${tag} == ""} { > $itk_component(editor) mark unset %beg% %end% > return > } > } else { > set tag ${sec_tag} > set idx ${sec_idx} > } > } > > set beg 0.0 > set end 0.0 > set ranges [$itk_component(editor) tag ranges ${tag}] > for {set off 0; set max [expr [llength ${ranges}] / 2]} {${off} < \ > ${max}} {incr off} { > set v [expr ${off} * 2] > set beg [lindex ${ranges} ${v}] > set end [lindex ${ranges} [expr ${v} + 1]] > if {[$itk_component(editor) compare ${beg} <= ${idx}] && > [$itk_component(editor) compare \ > ${end} >= ${idx}]} { > break > } > } > > if {[lindex ${tag} end] != "cl"} { > $itk_component(editor) mark set %beg% ${beg} > $itk_component(editor) mark set %end% ${end} > } else { > $itk_component(editor) mark unset %beg% %end% > } > > return [tag_with_sep ${tag}] > } > method find_offset {} { > if {[catch {set idx [$itk_component(editor) index {insert > wordstart}]}]} { > return 0 > } > > set tag [lindex [lmatch [$itk_component(editor) tag names ${idx}] > "* *"] end] > if {${tag} == "" || [lindex ${tag} end] == "cl"} { > set sec_idx [$itk_component(editor) index "${idx} lineend -1c > wordstart"] > set sec_tag [lindex [lmatch [$itk_component(editor) tag names > ${sec_idx}] \ > "* *"] end] > > if {${sec_tag} == ""} { > if {${tag} == ""} { > return 0 > } > } else { > set tag ${sec_tag} > set idx ${sec_idx} > } > } > > set beg 0.0 > set end 0.0 > set ranges [$itk_component(editor) tag ranges ${tag}] > for {set off 0; set max [expr [llength ${ranges}] / 2]} {${off} < \ > ${max}} {incr off} { > set v [expr ${off} * 2] > set beg [lindex ${ranges} ${v}] > set end [lindex ${ranges} [expr ${v} + 1]] > if {[$itk_component(editor) compare ${beg} <= ${idx}] && > [$itk_component(editor) compare \ > ${end} >= ${idx}]} { > return ${off} > } > } > return 0 > } > > proc tag_with_sep {tag} { > global sn_sep > if {[llength ${tag}] < 3} { > set tag "# ${tag}" > } > #set tag [join $tag $sn_sep] > return [sn_db_format_qry [list ${tag}]] > } > > method find_and_mark_tag {} { > global sn_options sn_sep sn_scopes > if {[catch {set idx [$itk_component(editor) index {insert > wordstart}]}]} { > return > } > > set $itk_option(-linenumber_var) [$itk_component(editor) index > insert] > > if {$itk_option(-symbols) != ""} { > $itk_option(-symbols) configure -entrytext "" > } > > #verify if we stay on a symbol declaration/implementaion > set pos_tags "" > foreach tg [$itk_component(editor) tag names ${idx}] { > if {[string first " " ${tg}] != -1} { > #tags like "symbol scope" > lappend pos_tags ${tg} > } > } > > set tag [lindex ${pos_tags} end] > if {${tag} == "" || [lindex ${tag} end] == "cl"} { > set sec_idx [$itk_component(editor) index "${idx} lineend -1c > wordstart"] > set sec_tag [lindex [lmatch [$itk_component(editor) tag names > ${sec_idx}] \ > "* *"] end] > > if {${sec_tag} == ""} { > if {${tag} == ""} { > $itk_component(editor) mark unset %beg% %end% > return > } > } else { > set tag ${sec_tag} > set idx ${sec_idx} > } > } > > set beg 0.0 > set end 0.0 > set ranges [$itk_component(editor) tag ranges ${tag}] > for {set off 0; set max [expr [llength ${ranges}] / 2]} {${off} < \ > ${max}} {incr off} { > set v [expr ${off} * 2] > set beg [lindex ${ranges} ${v}] > set end [lindex ${ranges} [expr ${v} + 1]] > if {[$itk_component(editor) compare ${beg} <= ${idx}] && > [$itk_component(editor) compare \ > ${end} >= ${idx}]} { > break > } > } > > if {[lindex ${tag} end] != "cl"} { > $itk_component(editor) mark set %beg% ${beg} > $itk_component(editor) mark set %end% ${end} > } else { > $itk_component(editor) mark unset %beg% %end% > } > > set tg [tag_with_sep ${tag}] > > if {$itk_option(-symbols) != ""} { > $itk_option(-symbols) selecttext [join ${tg}] ${off} > } > > upvar #0 ${this}-off old_off > > if {${tg} == ${old_tg} && ${old_off} == ${off}} { > return > } > > set old_tg ${tg} > set old_off ${off} > > #execute selectcommand, when the tag is changed > if {$itk_option(-selectcommand) != ""} { > split_symbol ${tg} cls sym scope > set line [$itk_component(editor) index insert] > #::eval $selectcommand [list $scope $sym $cls $filename $line > "" \ > "" ""] > ::eval $itk_option(-selectcommand) [Selection] > } > } > > # > # Indent/Outdent the selected area (or the current line) of the file. > # > proc Indent {cls indent} { > global sn_options > global tkPriv > global sn_text_highlight_group > > set editor [${cls} editor] > set pos [$editor index @0,0] > > if {[catch {set beg [$editor index "sel.first linestart"]}]} { > set beg [$editor index "insert linestart"] > set end [$editor index "insert lineend"] > } else { > #avoid to include an extra line by getting the index > #this can happen, when the selection is make to the > #end of line > set last_line_col [lindex [split [$editor index sel.last] \ > "."] end] > if {${last_line_col} == "0"} { > ::set tkPriv(selectMode) "line" > set end [$editor index "sel.last -1c"] > } else { > set end [$editor index "sel.last lineend"] > } > } > > if {[info exists sn_text_highlight_group($editor)]} { > set group $sn_text_highlight_group($editor) > } else { > set group "" > } > upvar #0 ${cls}-indenting_broken indenting_broken > set indenting_broken 0 > > #execute SN-internal indent/outdent procedure > set txt [$editor get ${beg} ${end}] > set newtxt [sn_indent_outdent \ > -indent ${indent} \ > -indentwidth $sn_options(def,edit-indentwidth) \ > -tabwidth $sn_options(def,edit-tabstop) \ > -replacetabs $sn_options(def,edit-tab-inserts-spaces) \ > -group ${group} ${txt}] > > #nothing changed, return! > if {${indenting_broken} || [string compare ${newtxt} ${txt}] == 0} { > return > } > > #replace with reworked text > tkTextReplace $editor ${beg} ${end} ${newtxt} > > #eventually reparse a fast-saved file > #$cls UpdateHighlights > > #reset some tags > $editor tag remove sel 0.0 end > $editor tag add sel ${beg} "${end} lineend + 1c" > set ypos [expr [lindex [split ${pos} "."] 0] - 1] > $editor yview ${ypos} > > #that's all folk > return > } > > method print {} { > global tcl_platform > if {$tcl_platform(platform) != "windows"} { > print_dialog $itk_component(editor) > } else { > ide_print_text $itk_component(editor) > } > } > > proc print_file {print_dialog t} { > global tcl_platform sn_options > > upvar #0 ${print_dialog}-ptarget target > switch -- ${target} { > "marked" { > if {[catch {set lst [${t} get sel.first sel.last]} err]} { > #no selection? > sn_error_dialog ${err} > return > } > } > "view" { > set end [${t} index @0,[winfo height ${t}]] > set lst [${t} get @0,0 "${end} lineend"] > } > "all" - > default { > set lst [${t} get 0.0 end] > } > } > > if {${print_dialog} != ""} { > itcl::delete object ${print_dialog} > } > > #we have to translate \t to the current size number of tabs > #this have to be done always, because the pr command on unix > #makes also indenting at the beginning of line, so that the > #first tab could be wrong displayed > set tabsize [${t} cget -tabsize] > #at lease one space > set spaces " " > for {set i 1} {${i} < ${tabsize}} {incr i} { > append spaces " " > } > regsub \ > -all \t ${lst} ${spaces} lst > > #write contents into file > set tmpf [sn_tmpFileName] > set fd [open ${tmpf} "w+"] > fconfigure ${fd} \ > -encoding $sn_options(def,system-encoding) \ > -blocking 0 > puts ${fd} ${lst} > close ${fd} > > if {$tcl_platform(platform) != "windows"} { > upvar #0 ${print_dialog}-cmd cmd > } else { > set cmd ide_winprint > } > > sn_print_file ${cmd} ${tmpf} > > catch {file delete \ > -- ${tmpf}} > catch {unset target} > catch {unset cmd} > } > > proc print_dialog {t} { > global sn_options > global tcl_platform > > set print_dialog "[winfo toplevel ${t}].printdlg" > > if {$tcl_platform(platform) == "windows"} { > upvar #0 ${print_dialog}-ptarget target > > #default print all when no selection > ::set target "all" > > #if selection availiable ask to print selection only > if {! [catch {set lst [${t} get sel.first sel.last]}] && ${lst} \ > != ""} { > set answer [tk_dialog auto [get_indep String Print] \ > [get_indep String PrintSelection] question_image 0 \ > [get_indep String All] [get_indep String Marked] \ > [get_indep String Cancel]] > if {${answer} == 2} { > return > } > if {${answer} == 1} { > ::set target "marked" > } > } > Editor&::print_file ${print_dialog} ${t} > return > } > > if {[winfo exists ${print_dialog}]} { > ${print_dialog} raise > return > } > set topl [winfo toplevel ${t}] > set print_dialog [sourcenav::Window ${print_dialog} \ > -leader ${t}] > > sn_motif_buttons ${print_dialog} bottom 0 [get_indep String ok] \ > [get_indep String cancel] > ${print_dialog}.button_0 config \ > -command "Editor&::print_file ${print_dialog} ${t}" > ${print_dialog}.button_1 config \ > -command "itcl::delete object ${print_dialog}" > > global ${print_dialog}-ptarget ${print_dialog}-cmd > set ${print_dialog}-ptarget "all" > set tit [wm title ${topl}] > regsub \ > -all {\*} ${tit} "" tit > regsub \ > -all {\[} ${tit} {\\[} tit > regsub \ > -all {\]} ${tit} {\\]} tit > set ${print_dialog}-cmd [format > $sn_options(def,ascii-print-command) \ > ${tit}] > ${print_dialog} configure -title [list [get_indep String Print] > ${tit}] > > frame ${print_dialog}.command > label ${print_dialog}.command.prompt \ > -text [get_indep String SQLPprintercmd] > entry ${print_dialog}.command.cmd \ > -width 70 \ > -textvariable ${print_dialog}-cmd > focus ${print_dialog}.command.cmd > bind ${print_dialog}.command.cmd \ > "${print_dialog}.button_0 invoke" > pack ${print_dialog}.command.prompt \ > -side left > pack ${print_dialog}.command.cmd \ > -side left \ > -padx 10 \ > -fill x \ > -expand y > pack ${print_dialog}.command \ > -fill x \ > -expand y > > radiobutton ${print_dialog}.marked \ > -text [get_indep String Marked] \ > -variable ${print_dialog}-ptarget \ > -value marked > radiobutton ${print_dialog}.all \ > -text [get_indep String All] \ > -variable ${print_dialog}-ptarget \ > -value all > #radiobutton $print_dialog.view -text [get_indep String View] \ > # -variable $print_dialog-ptarget -value view > pack ${print_dialog}.marked \ > -anchor w \ > -padx 60 > pack ${print_dialog}.all \ > -anchor w \ > -padx 60 > #pack $print_dialog.view -anchor w -padx 60 > > ${print_dialog} move_to_mouse > catch {${print_dialog} resizable no no} > > ${print_dialog} take_focus > } > > method filter {{all 0}} { > if {$itk_option(-symbols) != ""} { > $itk_option(-symbols) configure -contents [read_filetags ${all}] > } > } > > #this function is called, when the symbols combobox > #is called > method postcommand {m} { > if {! ${displayed}} { > filter > set displayed 1 > } > } > > #called, when the editor should be activated > method activate {} { > if {$itk_option(-menu) != ""} { > } > if {$itk_option(-toolbar) != ""} { > pack $itk_component(toolbar) \ > -side left > } > #by switching to the editor, disable the > #flag to read all symbols, because it can take > #a long time > if {$itk_option(-symbols_filter) != ""} { > upvar #0 $itk_option(-symbols_filter)-related related > ::set related 1 > } > DispModified > GetFileTags 0 "" > focus $itk_component(editor) > } > > method deactivate {} { > if {$itk_option(-toolbar) != ""} { > pack forget $itk_component(toolbar) > } > set $itk_option(-message_var) "" > > if {$itk_option(-linenumber_var) != ""} { > set $itk_option(-linenumber_var) "" > } > } > > method Focus_In {} { > global last_Editor > ::set last_Editor ${this} > > if {$itk_option(-linenumber_var) != ""} { > set $itk_option(-linenumber_var) [$itk_component(editor) > index insert] > } > SetTitle > } > > method Focus_Out {} { > > set $itk_option(-message_var) "" > > if {$itk_option(-linenumber_var) != ""} { > set $itk_option(-linenumber_var) "" > } > } > > #converts "symbol(scope) class" to "class symbol scope" > proc split_symbol {ssym class symbol scope} { > upvar ${class} cc > upvar ${symbol} ss > upvar ${scope} xs > > #convert 'foo()(md) boo' --> 'foo%%(md) boo' > regsub \ > -all {\(\)\(} [join ${ssym}] {%%\(} sym > #convert 'foo%%(md) boo' --> 'foo%% md boo' > regsub \ > -all {\(|\)} ${sym} " " sym > #convert 'foo%% md boo' --> 'foo() md boo' > regsub \ > -all {%%} ${sym} {()} sym > set ss [lindex ${sym} 0] > set xs [lindex ${sym} 1] > set cc [lindex ${sym} 2] > } > > # Figure out which symbol menus should be used in the editor! > proc combobox_scopes {} { > global combobox_editor_scopes sn_fortran_scopes > set scp [list cl {cl t un} e {e ec} fu {fu fd md mi} fr {fr} gv \ > {con gv iv} ma {ma}] > > foreach sc {com cov su} { > if {[::info commands paf_db_${sc}] != ""} { > lappend scp com {com cov} su {su} > break > } > } > array set combobox_editor_scopes ${scp} > } > > ################################################ > #goto specified symbol > # > #one important information is that this function > #should only be called from the combobox and not > #external, except the call simulate the combobox > #functionality > method goto {combo ssym} { > if {${ssym} == ""} { > return > } > > #dump the current view into the history stack > ${topw} history_stack_add_point ${this} > > if {$itk_option(-symbols_filter) != ""} { > upvar #0 $itk_option(-symbols_filter)-related related > } else { > set related 1 > } > > #convert 'foo()(md) boo' --> 'foo%%(md) boo' > regsub \ > -all {\(\)\(} ${ssym} {%%\(} sym > #convert 'foo%%(md) boo' --> 'foo%% md boo' > regsub \ > -all {\(|\)} ${sym} " " sym > #convert 'foo%% md boo' --> 'foo() md boo' > regsub \ > -all {%%} ${sym} {()} sym > if {[llength ${sym}] == 3} { > set name "[lindex ${sym} 2] [lindex ${sym} 0]" > set scope [lindex ${sym} 1] > } else { > set name [lindex ${sym} 0] > set scope [lindex ${sym} 1] > } > if {${scope} == ""} { > set scope cl > } > > #get the offset of the selected text, if there > #are more than one entry with the same text > if {${combo} != ""} { > set off [${combo} offset] > } else { > set off 0 > } > > if {${related}} { > #get ranges with the specified scope > set tg "${name} ${scope}" > set pos [$itk_component(editor) tag ranges ${tg}] > set len [llength ${pos}] > #there are two tags (first,end) with the same name > set pos [lindex ${pos} [expr {${off} * 2}]] > > SetFondPos ${pos} 0 0 > } else { > set pos "" > } > > # If the given symbol is not found by searching > # for tags in the text widget, search the DB > # without a scope for symbols in this file. > > if {${pos} == ""} { > set cnt [read_matched_from_db "" "" \ > -exact ${name} "" "" $itk_option(-filename) \ > -1 -1 0 ${off}] > if {${cnt} != ""} { > gotofile_cb "" [lindex ${cnt} 0] "" ${off} > } > } > } > > method getfilename {} { > return $itk_option(-filename) > } > > method getvalidfilename {} { > global sn_options > if {$itk_option(-filename) != $sn_options(noname_file)} { > return $itk_option(-filename) > } else { > return "" > } > } > > method editor {} { > return $itk_component(editor) > } > > method setmodified {m {reporterror ""}} { > # If file is readonly and first modified, warn user > # for this. > if {${reporterror} != "noerror" && ${m} && [file exists > $itk_option(-filename)] \ > && ![file writable $itk_option(-filename)]} { > sn_error_dialog "$itk_option(-filename) [get_indep String > ErrorNotWrite]" > set ret "error" > } else { > set ret "" > } > > $this configure -file_changed ${m} > DispModified > return ${ret} > } > > #tells if the current file is editable > method canModify {} { > global sn_options > #no permissions > if {[file exists $itk_option(-filename)] && ![file writable > $itk_option(-filename)]} { > return 0 > } > #file is opened as readonly > if {$itk_option(-editstate) != "normal"} { > return 0 > } > return 1 > } > > #tells if the file is a valid file, this is true > #if the file name is valid > method validFilename {} { > global sn_options > if {$itk_option(-filename) == $sn_options(noname_file)} { > return 0 > } > return 1 > } > > #simulate Text Edit > method mark args { > ::eval $itk_component(editor) mark ${args} > } > > #this function is called from the retriever, when something > #is selected > method gotofile_cb {w line data {off 0}} { > if {${w} != ""} { > set line [Retriever&::convert_to_line ${w}] > } > > if {${line} == ""} { > error "Editor&::gotofile_cb empty line argument" > } > > set line [split ${line} \t] > set sym [lindex ${line} 0] > set cls [lindex ${line} 1] > set file [lindex ${line} 4] > set pos [lindex ${line} 5] > > #get scope and symbol name > get_key_and_scope ${sym} name scope > set name [string trim "${name} ${cls}"] > > #probably correct filename > set file [sn_convert_FileName ${file}] > > #add current position to history stack > ${topw} history_stack_add_point ${this} > > #if another file should be loaded and the actual > #file is modified, ask to use another window > if {${file} != $itk_option(-filename) && > $itk_option(-file_changed)} { > EditFile ${name} ${file} ${pos} > return > } else { > set answer 0 > } > > if {${answer} == 0} { > #load the file, if it's different > if {${file} != $itk_option(-filename)} { > editfile ${file} ${pos} revert > } else { > SetFondPos ${pos} 0 0 > } > } > > focus $itk_component(editor) > } > > method gotosymbol {{scope ""} {sym ""} {cls ""} {file ""} {from ""} > {type \ > ""} {prm ""} {to ""} {always 1}} { > > #verify if gotosymbol is disabled, this is required, because > #it can happen, that the editfile command is called twice. > global gotosymbol_active > if {[info exists gotosymbol_active] && ${gotosymbol_active} == 0} { > return 0 > } > > #add current position to prev positions list > ${topw} history_stack_add_point ${this} > > if {${file} != "" &&(${from} != "" || ${sym} == "")} { > if {${file} != $itk_option(-filename)} { > editfile ${file} ${from} > } \ > elseif {${from} != ""} { > SetFondPos ${from} 0 0 > } > return 1 > } > > #if something specified > if {"${scope}${sym}${cls}${file}" != ""} { > #if we are around the area, as example a class member > #and the gotosymbol is in this area, don't change > #your area > if {${always} == 0 && ${file} == "" && $itk_option(-symbols) != \ > ""} { > set txt [$itk_option(-symbols) cget -entrytext] > split_symbol $txt cc ss xscope > if {${scope} == "cl" && ${sym} == ${cc} || ${scope} == \ > ${xscope} && ${sym} == ${ss} && ${cls} == ${cc}} { > return 1 > } > } > if {${cls} != ""} { > set sym "${cls} ${sym}" > } > sn_retrieve_symbol ${sym} ${scope} ${file} \ > -exact 1 1 "${this} gotofile_cb" "" ${type} ${prm} > return 1 > } > return 0 > } > > #return selected text in a readable format > method Selection {} { > global sn_sep > set ranges [$itk_component(editor) tag ranges sel] > set pos [$itk_component(editor) index {insert wordstart}] > set off [find_offset] > > #make sure that the cursor doesn't stay in a header, when > #this is true, we have to accept the current position, > #NOT THE SELECTION > if {[points_to_header $itk_component(editor) ${pos}] == "" && > ${ranges} != ""} { > #grep can have added more than one selection region! > if {[llength ${ranges}] > 2} { > set ranges [lrange ${ranges} 0 1] > } > set txt [::eval $itk_component(editor) get ${ranges}] > #delete new lines from the selection > if {[string first \n ${txt}] != -1} { > set txt [lindex [split ${txt} \t] 0] > } > set txt [string trim ${txt}] > > set scope "" > set cls ${txt} > set sym "" > set from "" > set type "" > set prm "" > set to "" > > if {${txt} != ""} { > #if insert position points to a header, > #pass the filename also to the selection, not only this, > #also return the exact db position of the position. > if {[points_to_header $itk_component(editor) ${pos}] != ""} { > set file [getvalidfilename] > > #get current scope > set tg [find_tag] > split_symbol ${tg} dummy dummy scope > > #build pattern to look for > set pat [Retriever&::pattern ${txt}] > > #we have to return the exact position > set cnt [read_matched_from_db "" ${scope} \ > -exact ${pat} "" "" $itk_option(-filename) \ > -1 -1 0 ${off}] > if {${cnt} != ""} { > set cnt [split ${cnt} \t] > if {[string first ${sn_sep} ${pat}] != -1} { > set cls [lindex [split ${pat} ${sn_sep}] 0] > set sym [lindex [split ${pat} ${sn_sep}] 1] > } else { > set sym ${pat} > set cls "" > } > set type [lindex ${cnt} 2] > set prm [lindex ${cnt} 3] > set from [lindex ${cnt} 5] > set to [lindex ${cnt} 6] > } else { > set from ${pos} > set cls ${txt} > } > } else { > set file "" > } > return [list ${scope} ${sym} ${cls} ${file} ${from} ${type} \ > ${prm} ${to}] > } > } else { > set tg [find_tag] > if {${tg} != ""} { > split_symbol ${tg} cls sym scope > > #return the exact description of the symbol > set cnt [read_matched_from_db "" ${scope} \ > -exact [string trim "${cls}${sn_sep}${sym}" > ${sn_sep}] "" \ > "" $itk_option(-filename) \ > -1 -1 0 ${off}] > if {${cnt} != ""} { > set cnt [split ${cnt} \t] > set type [lindex ${cnt} 2] > set prm [lindex ${cnt} 3] > set from [lindex ${cnt} 5] > set to [lindex ${cnt} 6] > } else { > set type "" > set prm "" > set from ${pos} > set to "" > } > return [list ${scope} ${sym} ${cls} > $itk_option(-filename) ${from} \ > ${type} ${prm} ${to}] > } > } > > #nothing is selected, return file and it's position > return [list "" "" "" $itk_option(-filename) ${pos}] > } > > method clearselection {} { > $itk_component(editor) tag remove sel 0.0 end > } > > method Focus {} { > focus $itk_component(editor) > } > > #make a title for the Dump position, this is usefull > #for the views stack (prev/next) > method DumpTitle {{dump ""}} { > if {${dump} == ""} { > set dump [Dump] > } > set tg [find_tag] > if {${tg} != ""} { > split_symbol ${tg} cls sym scope > return "Edit [string trim "${sym}(${scope}) ${cls}"]" > } else { > return "Edit [lindex ${dump} 0] \[[lindex ${dump} 1]\]" > } > } > > method AddHistoryFromDump {dumpstr title} { > set tg [find_tag] > > foreach {key val} ${dumpstr} { > set dump(${key}) ${val} > } > if {$dump(offset) == ""} { > set dump(offset) 0 > } > > if {${tg} != ""} { > split_symbol ${tg} cls sym scope > if {${cls} != ""} { > set name [string trim "${cls} ${sym}"] > } else { > set name [string trim ${sym}] > } > #don't store the position in the file > #this makes alot of conflicts > set data [list ${scope} ${name} $dump(offset) $dump(file)] > set tt ${name} > } else { > set scope f > set data [list f $dump(file)] > set tt $dump(file) > } > > #Add position into history > sn_add_history ${scope} ${data} [sn_make_history_title edit > ${scope} \ > ${tt}] > } > > #return the important data to restore this widget > #in later time again (used by saving the project) > method Dump {} { > global sn_options > global tkText > > if {$itk_option(-filename) == $sn_options(noname_file)} { > #no dump for nonamed files > return "" > } > > set pos [$itk_component(editor) index insert] > set state [$itk_component(editor) cget -state] > set tabsize [$itk_component(editor) cget -tabsize] > set offset [find_offset] > > if {[info exists tkText($itk_component(editor),ovwrt)]} { > set ovwrt $tkText($itk_component(editor),ovwrt) > } else { > set ovwrt 0 > } > > #save settings as {key value} > return [list file $itk_option(-filename) pos ${pos} state > ${state} ovrwt \ > ${ovwrt} tabsize ${tabsize} offset ${offset}] > } > > #gets the result from the function "Dump" to > #restore the older state (used by restoring the project) > method Restore {str} { > global sn_options > > foreach {key val} ${str} { > set restdata(${key}) ${val} > } > if {! [info exists restdata(pos)]} { > #backward compatible > set restdata(file) [lindex ${str} 0] > set restdata(pos) [lindex ${str} 1] > set restdata(state) [lindex ${str} 2] > set restdata(ovwrt) [lindex ${str} 3] > set restdata(tabsize) [lindex ${str} 4] > } > > if {$restdata(file) != $itk_option(-filename)} { > editfile $restdata(file) -1 > } > > #don't set overwrite mode!! > #set_overwrite $editor $restdata(ovwrt) set > > #be sure, that we use tabsize, not tabs value, tabs value > #is in pixels and could be too large. > if {$restdata(tabsize) > 8 || $restdata(tabsize) < 2} { > set restdata(tabsize) $sn_options(def,edit-tabstop) > } > > #don't restore the state of the file > $itk_component(editor) config \ > -tabsize $restdata(tabsize) > > #Don't mark the position, just jump to it > SetFondPos $restdata(pos) 1 1 0 > > #set Focus to the widget!! > #Focus > } > > # This method is only ever called from MultiWindow&::Refresh_Yourself. > # It must be a no-op for an editor. We would never want to revert > # changes in an open editor or revert the contents of an editor > # to those on disk without the user's permission. > > method Refresh_Display {} { > } > > method Update_Layout {} { > global sn_options > > # Actual font size and colors. > $itk_component(editor) configure \ > -font $sn_options(def,edit-font) \ > -fg $sn_options(def,edit-fg) \ > -bg $sn_options(def,edit-bg) \ > -selectforeground $sn_options(def,select-fg) \ > -selectbackground $sn_options(def,select-bg) > > # Actual tab size. > set_tabsize $itk_component(editor) > > # Actualize tag colors. > init_tags $itk_component(editor) > > # Wrap. > set_wrap $itk_component(editor) > > # Overwrite flag. > set_overwrite $itk_component(editor) "" set > > #right mouse option menu > bind_right_mouse $itk_component(editor) > > #readonly-project > if {$sn_options(readonly)} { > set st disabled > } else { > set st normal > } > if {$itk_option(-editstate) != ${st}} { > set itk_option(-editstate) ${st} > $itk_component(editor) configure \ > -state $itk_option(-editstate) > } > } > > #this function copies all the information from src to > #dst, like contents, tags, .. > proc friend_copy {dst src} { > set sed [${src} editor] > set ded [${dst} editor] > > #delete existing buffer > ${ded} delete 0.0 end > > #Add the contents of the src editor > ${ded} insert 0.0 [${sed} get 0.0 end] > > #delete the last '\n' from the destination buffer > ${ded} delete {end-1c} end > > #set the same modified flag for the new buffer > ${dst} setmodified [${src} cget -file_changed] noerror > > #set same mtime for the view > ${dst} iset file_mtime [${src} cget -file_mtime] > } > > #called, when the widget should be closed > #mode=0: Ask if nessecary (no other buffer > # with the same filename > #mode=1: always close > method Close {{mode 0}} { > if {${mode} == 0 && $itk_option(-file_changed)} { > if {[Ask_For_Modified revert]} { > #can be closed > return 1 > } else { > return 0 > } > } > return 1 > } > > method whoami {} { > return edit > } > > # Old tag names > private variable old_off "" > private variable old_tg "" > > # Protected variables > protected variable editor "" > protected variable displayed 0 > protected variable gotosymbol_active 1 > > #mtime for the file to prove if it has been modified > #external during it is opened in SN. > public variable file_mtime 0 > > #common variables > common ".multiwindow-\[0-9\]*" > > #public variables > itk_option define -filename filename Filename $sn_options(noname_file) { > editfile $itk_option(-filename) -1 > } > > # public variable file_changed 0 > > itk_option define -file_changed file_changed File_Changed 0 > public variable highlight y > itk_option define -findcombo findcombo Findcombo "" > #for readonly-projects > public variable topw "" > > private variable edit_SearchNoCase > private variable edit_SearchMethod > private variable edit_SearchString > private variable edit_SearchDirection > private variable edit_ReplaceString >} > >proc wait_editor_end {procfd} { > set end [gets ${procfd} msg] > if {${end} < 0} { > catch {close ${procfd}} > } else { > sn_log "wait_editor_end: ${msg}" > } > update idletasks >} > >#bind tags to the editor >Editor&::EditorBindings > ># ># Choose the current editor to edit the files ># >proc sn_edit_file {symbol file {line ""} {search 1} {state ""}} { > global Switch_Is_Enabled > incr Switch_Is_Enabled -1 > > sn_log "edit file (${symbol}, ${file}, ${line}, ${search}, ${state})" > > set ret [Editor&::EditFile ${symbol} ${file} ${line} ${search} ${state}] > > incr Switch_Is_Enabled > > return ${ret} >} Syd Polk spolk@redhat.com Engineering Manager +1 408 543 9430 Red Hat, Inc. From John@UltraBac.com Mon Apr 9 11:56:00 2001 From: John@UltraBac.com (John McCormick) Date: Mon, 09 Apr 2001 11:56:00 -0000 Subject: XREF Progress bar would be handy more than just on the Symbols window Message-ID: <60C3F0B752909B428D39EA63B4352E99048AAB@velma.ultrabac.com> I generally like to start on the Retriever window and any of the other windows available via the tabs. Took me a while to figure out that the Symbols window was the window the the xref progress bar. That bar is useful and should be displayed on the bottom of all of the sn windows. I'd like to build SN for windows do you guys have the build instructions? Thanks. From tromey@redhat.com Mon Apr 9 12:09:00 2001 From: tromey@redhat.com (Tom Tromey) Date: Mon, 09 Apr 2001 12:09:00 -0000 Subject: bug fix for goto problem References: <3AD1DE49.7030500@knuut.de> Message-ID: <87wv8tkhma.fsf@creche.redhat.com> >>>>> "Khamis" == Khamis Abuelkomboz (UUNET) writes: Khamis> since I want to work with SN5.0, because it's alot faster, Khamis> I was forced to fix another nasty bug.... Khamis> copy attatched to /share/sourcenav/gui Hi Khamis. It is traditional to send bug fixes as context- or uni-diffs. Sending replacement files is bad because it takes up a lot more bandwidth (typically). Diffs are also superior because they let the maintainers immediately see what has changed. Less work for maintainers means that patches go in more quickly, and everybody is happier. If you have SN checked out of cvs you can use "cvs diff -u" or "cvs diff -c" to create a diff. Otherwise you have to use "diff -u" or "diff -c" by hand (and remember to keep the original around). It's also good to write a ChangeLog entry and send it with the patch. This also makes it easier for developers to check in patches (I don't know about SN but on other projects I work on a ChangeLog entry is a prerequisite to any commit). I don't work on SN. I just happened to see two humongous email messages in my inbox this morning and thought I would send email about it. Tom From mdejong@cygnus.com Mon Apr 9 13:55:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Mon, 09 Apr 2001 13:55:00 -0000 Subject: A small feature proposal References: <5.0.2.1.0.20010409174118.0394f6a8@plris.com> Message-ID: > I worked with the system which used to save with the window not > only its last size+position but also the cursor position in a source file, > state of scrolling and even the last marked text in this window. > This feature was nice. > > Thanks. > > Leon Pollak > leonp@plris.com That sounds like a great feature. If you would like to implement it and post the patch, we will seriously consider adding it to the 5.0 codebase. Mo DeJong Red Hat Inc From mdejong@cygnus.com Mon Apr 9 13:59:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Mon, 09 Apr 2001 13:59:00 -0000 Subject: rebuild sourcenavigator in windows 98? References: <3AD17DC6.7060107@knuut.de> Message-ID: On Mon, 9 Apr 2001, Khamis Abuelkomboz (UUNET) wrote: > Ding wrote: > > > Hi, > > I download the sourcenavigator SN50-010322-source.tar.gz, > > I want to run it on windows98 ? can you tell me how to do that? > > Thanks a lot > > > > Best Regards, > > Ding xiaoxi > > unpack it to a destination directory and run > /H-i686-pc-cygwin/bin/snavigator.exe > > I agree with you that this is too simple to get to :-) > The people usually await a "setup.exe"... > > > khamis I don't think that is correct. The SN50-010322-source.tar.gz file is the source code, if you have a VC++ 5.0 compiler and Cygwin installed, you should be able to compile it. Otherwise, you will need to use the Windows binary: ftp://ftp.freesoftware.com/pub/sourceware/sourcenav/releases/binaries/SN50-010322-Windows.zip Mo DeJong Red Hat Inc From neeam@yahoo.com Mon Apr 9 21:06:00 2001 From: neeam@yahoo.com (Subrata Datta) Date: Mon, 09 Apr 2001 21:06:00 -0000 Subject: snav:History-->grep References: <20010406065257.39142.qmail@web11607.mail.yahoo.com> Message-ID: <20010410040613.5155.qmail@web11607.mail.yahoo.com> When I pulled down History-->grep--> snav initiates a new grep . In sn4.5.2 it used to get the info from cache. did I miss something here in term of config. parameter. I did not alter cache info. that comes default. regards, subrata. __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ From spolk@redhat.com Tue Apr 10 11:48:00 2001 From: spolk@redhat.com (Syd Polk) Date: Tue, 10 Apr 2001 11:48:00 -0000 Subject: XREF Progress bar would be handy more than just on the Symbols wi ndow References: <60C3F0B752909B428D39EA63B4352E99048AAB@velma.ultrabac.com> Message-ID: <4.2.0.58.20010410114854.00a23f10@pop.cygnus.com> At 11:55 AM 4/9/01 -0700, John McCormick wrote: >I generally like to start on the Retriever window and any of the other windows >available via the tabs. Took me a while to figure out that the Symbols >window was >the window the the xref progress bar. That bar is useful and should be >displayed >on the bottom of all of the sn windows. > >I'd like to build SN for windows do you guys have the build instructions? > >Thanks. The build instructions are in the README file in the source tarball now. Syd Polk spolk@redhat.com Engineering Manager +1 408 543 9430 Red Hat, Inc. From MChalla@LANL.Gov Tue Apr 10 15:13:00 2001 From: MChalla@LANL.Gov (Matt Challacombe) Date: Tue, 10 Apr 2001 15:13:00 -0000 Subject: PLEASE REMOVE ME FROM THIS LIST! References: Message-ID: <0104101710590D.01158@ice> PLEASE REMOVE ME FROM THIS LIST! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + Matt Challacombe, Ph.D. http://www.t12.lanl.gov/~mchalla/ + + Los Alamos National Laboratory email: MChalla@LANL.Gov + + Group T-12, Mail Stop B268 phone: (505) 665-5905 + + Los Alamos, New Mexico 87545 fax: (505) 665-3909 + + + + "The secret to mountain biking is pretty simple. The slower you go + + the more likely it is you'll crash." -- Julie Furtado + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ From mdejong@cygnus.com Tue Apr 10 16:44:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Tue, 10 Apr 2001 16:44:00 -0000 Subject: snav:History-->grep References: <20010410040613.5155.qmail@web11607.mail.yahoo.com> Message-ID: On Mon, 9 Apr 2001, Subrata Datta wrote: > When I pulled down History-->grep--> snav > initiates a new grep . In sn4.5.2 it used to get the info > from cache. > > did I miss something here in term of config. parameter. > > I did not alter cache info. that comes default. The grep cache feature was removed in 5.0. It was a bad idea since it meant the results you were looking at might no longer exits. It also wasted loads of memory. Mo DeJong Red Hat Inc From mdejong@cygnus.com Tue Apr 10 17:44:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Tue, 10 Apr 2001 17:44:00 -0000 Subject: PLEASE REMOVE ME FROM THIS LIST! References: <0104101710590D.01158@ice> Message-ID: Please don't bother everyone with this sort of crap. http://sources.redhat.com/lists.html Mo From cskoniec@asc.corp.mot.com Tue Apr 10 17:50:00 2001 From: cskoniec@asc.corp.mot.com (Chris SKONIECZNY) Date: Tue, 10 Apr 2001 17:50:00 -0000 Subject: Can't download source navigator Message-ID: <3AD3AA4B.AD927A5D@asc.corp.mot.com> I wanted to load ver 5 but FTP server requires user ID and password - I do not have any though . cs From neeam@yahoo.com Tue Apr 10 19:22:00 2001 From: neeam@yahoo.com (Subrata Datta) Date: Tue, 10 Apr 2001 19:22:00 -0000 Subject: snav:History-->grep References: Message-ID: <20010411022221.46958.qmail@web11608.mail.yahoo.com> Thanks for the info. Removing grep cache is a little too far shot in my humble opinion. It would have been nice to have this feature as option. regards, SD --- Mo DeJong wrote: > On Mon, 9 Apr 2001, Subrata Datta wrote: > > > When I pulled down History-->grep--> snav > > initiates a new grep . In sn4.5.2 it used to get the info > > from cache. > > > > did I miss something here in term of config. parameter. > > > > I did not alter cache info. that comes default. > > The grep cache feature was removed in 5.0. It was > a bad idea since it meant the results you were looking > at might no longer exits. It also wasted loads of > memory. > > Mo DeJong > Red Hat Inc ===== Subrata Datta ---------------- neeam@yahoo.com sdatta@ciena.com __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ From mdejong@cygnus.com Tue Apr 10 20:08:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Tue, 10 Apr 2001 20:08:00 -0000 Subject: snav:History-->grep References: <20010411022221.46958.qmail@web11608.mail.yahoo.com> Message-ID: On Tue, 10 Apr 2001, Subrata Datta wrote: > Thanks for the info. Removing grep cache is a little too far shot > in my humble opinion. It would have been nice to have this feature > as option. > > regards, > SD Well, you are welcome to add it back in for your own version. There are some real problems with storing the entire output of grep in the project file, so be warned. Also, the code that managed the grep history and pushing and popping of the grep results is quite nasty. There is a hack in there that was meant to keep it working with 4.5 generated project files (it just ignored grep results in the history and automatically reran the grep). My question is, why do you need that feature? Mo DeJong Red Hat Inc From tromey@redhat.com Tue Apr 10 20:44:00 2001 From: tromey@redhat.com (Tom Tromey) Date: Tue, 10 Apr 2001 20:44:00 -0000 Subject: Can't download source navigator References: <3AD3AA4B.AD927A5D@asc.corp.mot.com> Message-ID: <87snjgks6g.fsf@creche.redhat.com> >>>>> "Chris" == Chris SKONIECZNY writes: Chris> I wanted to load ver 5 but FTP server requires user ID and Chris> password - I do not have any though . Try user "ftp" and for the password use your email address. Tom From mdejong@cygnus.com Tue Apr 10 21:40:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Tue, 10 Apr 2001 21:40:00 -0000 Subject: Can't download source navigator References: <87snjgks6g.fsf@creche.redhat.com> Message-ID: > >>>>> "Chris" == Chris SKONIECZNY writes: > > Chris> I wanted to load ver 5 but FTP server requires user ID and > Chris> password - I do not have any though . > > Try user "ftp" and for the password use your email address. > > Tom When the FTP thing comes up, it just means the server is overloaded. Try one of the mirror sites, like: ftp://ftp.freesoftware.com/pub/sourceware/sourcenav/releases/SN50-010322-source.tar.gz Mo From khamis@knuut.de Tue Apr 10 23:45:00 2001 From: khamis@knuut.de (Khamis Abuelkomboz (UUNET)) Date: Tue, 10 Apr 2001 23:45:00 -0000 Subject: snav:History-->grep References: Message-ID: <3AD3FD4F.80102@knuut.de> I join Subrata in the case, that storing the grep history was very usefull, especially when you are having a large project. One grep is usually enough to get back to results at later time. It's even the decide of the user to make a new grep, when he believes that the grep was no longer valid. Another case how I used grep history is to look what I greped before and if I made changes correct! Mo, I Agree with you that storing grep history took a big place, however I would limit storing history entries up to as example 100 entries. khamis Mo DeJong wrote: > On Tue, 10 Apr 2001, Subrata Datta wrote: > > >> Thanks for the info. Removing grep cache is a little too far shot >> in my humble opinion. It would have been nice to have this feature >> as option. >> >> regards, >> SD > > > Well, you are welcome to add it back in for your own version. > There are some real problems with storing the entire output > of grep in the project file, so be warned. Also, the code > that managed the grep history and pushing and popping of the > grep results is quite nasty. There is a hack in there that > was meant to keep it working with 4.5 generated project > files (it just ignored grep results in the history and > automatically reran the grep). My question is, why > do you need that feature? > > Mo DeJong > Red Hat Inc From leonp@plris.com Thu Apr 12 01:26:00 2001 From: leonp@plris.com (leonp@plris.com) Date: Thu, 12 Apr 2001 01:26:00 -0000 Subject: "Iconize project" cancels SN Message-ID: <5.0.2.1.0.20010412112114.00a81b00@plris.com> Hello, I tried to apply "Iconize project" menu item. The result was total cancelling of the SN application under Win2K, leaving project files busy. I am very sorry to confess that I don't know the TCL/TK language and therefore am not able to correct the problems I discover in SN, so my activities on the list are (just now) restricted only by reporting problems and proposals. Once more, sorry. Leon Pollak leonp@plris.com From rfweber@link.com Thu Apr 12 09:41:00 2001 From: rfweber@link.com (Richard F Weber) Date: Thu, 12 Apr 2001 09:41:00 -0000 Subject: Ada Parser status Message-ID: <3AD5DAB0.2030501@link.com> Well, I've been quiet for a while & was wondering what would be the best way to get what I have as far as an ada parser out for testing/eval. I've got some diff's to get applied to highlight the ada code write, as well as the ada parser part which should let you browse around includes, classes & have some basic XReff'ing stuff available. The one thing I'm most keen on is getting other Ada developers who are familiar with SNavigator looking at this to offer suggestions for improvements or bugs they find. Thanks. --Rich From spolk@redhat.com Thu Apr 12 10:11:00 2001 From: spolk@redhat.com (Syd Polk) Date: Thu, 12 Apr 2001 10:11:00 -0000 Subject: Ada Parser status References: <3AD5DAB0.2030501@link.com> Message-ID: <4.2.0.58.20010412101120.02279e10@pop.cygnus.com> At 12:41 PM 4/12/01 -0400, Richard F Weber wrote: >Well, I've been quiet for a while & was wondering what would be the best >way to get what I have as far as an ada parser out for testing/eval. > >I've got some diff's to get applied to highlight the ada code write, as >well as the ada parser part which should let you browse around includes, >classes & have some basic XReff'ing stuff available. >The one thing I'm most keen on is getting other Ada developers who are >familiar with SNavigator looking at this to offer suggestions for >improvements or bugs they find. > >Thanks. > >--Rich If you plan to contribute this back to us, you need to fill out the copyright assignment form. Instructions are at: http://sources.redhat.com/sourcenav/copyright.html Syd Polk spolk@redhat.com Engineering Manager +1 408 543 9430 Red Hat, Inc. From mdejong@cygnus.com Thu Apr 12 10:25:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 12 Apr 2001 10:25:00 -0000 Subject: "Iconize project" cancels SN References: <5.0.2.1.0.20010412112114.00a81b00@plris.com> Message-ID: On Thu, 12 Apr 2001 leonp@plris.com wrote: > Hello, > I tried to apply "Iconize project" menu item. The result was total > cancelling of the SN application under Win2K, leaving project files busy. Actually, it just unmaps all the windows and leaves hyper.exe running. This one is a known problem, but we really should have a bug in the DB about it since people are going to run into it. Could you add this to the bug DB? > I am very sorry to confess that I don't know the TCL/TK language > and therefore am not able to correct the problems I discover in SN, so my > activities on the list are (just now) restricted only by reporting problems > and proposals. > Once more, sorry. Well, you don't have to apologize for not fixing the bugs you run into. It is just better if you do. Mo From mdejong@cygnus.com Thu Apr 12 10:46:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 12 Apr 2001 10:46:00 -0000 Subject: Ada Parser status References: <3AD5DAB0.2030501@link.com> Message-ID: On Thu, 12 Apr 2001, Richard F Weber wrote: > Well, I've been quiet for a while & was wondering what would be the best > way to get what I have as far as an ada parser out for testing/eval. > > I've got some diff's to get applied to highlight the ada code write, as > well as the ada parser part which should let you browse around includes, > classes & have some basic XReff'ing stuff available. You just need to fill out the assignment form and post the patches. Developers should be able to incorporate the patches and recompile. Once the 8.3 upgrade is finished, we are going to move to a "point release" model where a updated snapshot is made available instead of patches.h > The one thing I'm most keen on is getting other Ada developers who are > familiar with SNavigator looking at this to offer suggestions for > improvements or bugs they find. Perhaps you could also try scaring up some ADA uses from elsewhere. I am not sure how many ADA coders use SN right now. You might be able to get new users interested by telling folks about the new ADA support. Mo From bismail@home.com Thu Apr 12 11:28:00 2001 From: bismail@home.com (Bany Ismail) Date: Thu, 12 Apr 2001 11:28:00 -0000 Subject: segmentation fault Message-ID: <3AD5F2FC.94C1C410@home.com> Hi, I downloaded a precompiled binary of source navigator 5.0. I tried to use the program and noticed that I always receive segmenation faults when trying to open an already existing project. However the program runs fine if everytime I need to open a project I create a new one with a different name but same directory. I am running Slackware 7.1, kernel 2.4.2. I also tried to build my own binary using the source code for the same version of source navigator. I ran 'source/./configure' followed by 'make', I get this error message at the end of 'make' make: *** No rule to make target 'all-libremote', needed by 'all-sid'. Stop. After that I tried a 'make install' even though 'make' apparently failed and get this message at the end of 'make install': /usr/bin/ld: cannot open -ltix4.4.8.1: No such file or directory collect2: ld returned 1 exit status make[2]: *** [hyper] Error 1 make[2]: Leaving directory '/home/bismail/incoming/source/snavigator/hyper' make[1]: *** [install-recursive] Error 1 make[1] Leaving directory '/home/bismail/incoming/source/snavigator' make: *** [install-snavigator] Error 2 I would really appreciate any help that you can offer as I really need a good IDE to go along with Insight debugger as I am a budding computer scientist in my third year of studies and would like to begin using professional grade software as early as possible :) From spolk@redhat.com Thu Apr 12 11:50:00 2001 From: spolk@redhat.com (Syd Polk) Date: Thu, 12 Apr 2001 11:50:00 -0000 Subject: segmentation fault References: <3AD5F2FC.94C1C410@home.com> Message-ID: <4.2.0.58.20010412115101.0199ec50@pop.cygnus.com> At 02:25 PM 4/12/01 -0400, Bany Ismail wrote: >Hi, > >I downloaded a precompiled binary of source navigator 5.0. I tried to >use the program and noticed that I always receive segmenation faults >when trying to open an already existing project. However the program >runs fine if everytime I need to open a project I create a new one with >a different name but same directory. I am running Slackware 7.1, kernel >2.4.2. > >I also tried to build my own binary using the source code for the same >version of source navigator. I ran 'source/./configure' followed by >'make', I get this error message at the end of 'make' Do "make all-snavigator" instead of just "make". When that finishes, do "make install-snavigator". >make: *** No rule to make target 'all-libremote', needed by 'all-sid'. >Stop. > >After that I tried a 'make install' even though 'make' apparently failed >and get this message at the end of 'make install': > >/usr/bin/ld: cannot open -ltix4.4.8.1: No such file or directory >collect2: ld returned 1 exit status >make[2]: *** [hyper] Error 1 >make[2]: Leaving directory >'/home/bismail/incoming/source/snavigator/hyper' >make[1]: *** [install-recursive] Error 1 >make[1] Leaving directory '/home/bismail/incoming/source/snavigator' >make: *** [install-snavigator] Error 2 > >I would really appreciate any help that you can offer as I really need a >good IDE to go along with Insight debugger as I am a budding computer >scientist in my third year of studies and would like to begin using >professional grade software as early as possible :) Syd Polk spolk@redhat.com Engineering Manager +1 408 543 9430 Red Hat, Inc. From mdejong@cygnus.com Thu Apr 12 12:05:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 12 Apr 2001 12:05:00 -0000 Subject: segmentation fault References: <3AD5F2FC.94C1C410@home.com> Message-ID: On Thu, 12 Apr 2001, Bany Ismail wrote: > Hi, > > I downloaded a precompiled binary of source navigator 5.0. I tried to > use the program and noticed that I always receive segmenation faults > when trying to open an already existing project. However the program > runs fine if everytime I need to open a project I create a new one with > a different name but same directory. I am running Slackware 7.1, kernel > 2.4.2. Yeah, I need to remove that Linux binary. SN should NEVER segfault. If it does, it is most likely a compiler bug or a glibc problem. You need to compile your own version. > I also tried to build my own binary using the source code for the same > version of source navigator. I ran 'source/./configure' followed by > 'make', I get this error message at the end of 'make' > > make: *** No rule to make target 'all-libremote', needed by 'all-sid'. > Stop If you run "make all-snavigator" and the "make install-snavigator" that will fix it. > After that I tried a 'make install' even though 'make' apparently failed > and get this message at the end of 'make install': > > /usr/bin/ld: cannot open -ltix4.4.8.1: No such file or directory That is a new one, try the above all-snavigator and see if that fixes it. > I would really appreciate any help that you can offer as I really need a > good IDE to go along with Insight debugger as I am a budding computer > scientist in my third year of studies and would like to begin using > professional grade software as early as possible :) Well, you might be surprised by what passes for "professional grade" software in the industry. We think Source-Navigator is a very good tool, but we could certainly use your help in making it better. Mo From capes@robots.ox.ac.uk Fri Apr 13 04:13:00 2001 From: capes@robots.ox.ac.uk (David Capel) Date: Fri, 13 Apr 2001 04:13:00 -0000 Subject: auto completion References: <987159756.5333.ezmlm@sources.redhat.com> Message-ID: Are there any plans to add tab-completion on symbol names in the editor, along the lines of the Emacs "hippie-expand" packages? ( Or does this feature already exist and I've missed it? ) I work with a set of C++ libraries which have some very long class/member/function names, and this feature is indispensible. Source Navigator is a great project. Keep up the good work! David From dennis@ipl.dtu.dk Fri Apr 13 04:54:00 2001 From: dennis@ipl.dtu.dk (Dennis Krøger) Date: Fri, 13 Apr 2001 04:54:00 -0000 Subject: Making directories for new projects Message-ID: <00e901c0c412$37c50c90$ce17a8c0@d> Hi... I was wondering... How come you have to make a new directory outside of Source Navigator when you want to make a new project? In my mind it would make more sence to ask if the user would like to create the directory when there is none for the project file.... That is not so bad, but what is worse is that the dialog gets totally canceled instead of just not making the project and retunring to the new project dialog... Can be really annoying, especially when it a long path... Aside from that, this is the coolest IDE I have EVER seen!!! Regards, and sorry for my bad english Dennis Kr????ger From neeam@yahoo.com Fri Apr 13 08:16:00 2001 From: neeam@yahoo.com (Subrata Datta) Date: Fri, 13 Apr 2001 08:16:00 -0000 Subject: Making directories for new projects References: <00e901c0c412$37c50c90$ce17a8c0@d> Message-ID: <20010413151635.83713.qmail@web11603.mail.yahoo.com> > > Aside from that, this is the coolest IDE I have EVER seen!!! > I agree when I first started a on project, all I was given huge code and doc. Thanks to SN I figured out most of it myself. Great work SN developers! Nonetheless I saw the following issues.. in the parser I tried to accomadate other files type like *.txt, *.con .. It tooke .txt and but not *.con or other file types. Pl. let me know if I'm missing something here. SN 5.0 seems to be faster that SN4.5.2 but no faster that MS visual C++ env.It would be nice to get SN5.0 to that point. regards, SD __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ From Marta.Stojanovic@nrc.ca Sat Apr 14 19:31:00 2001 From: Marta.Stojanovic@nrc.ca (Stojanovic, Marta) Date: Sat, 14 Apr 2001 19:31:00 -0000 Subject: SNsdk on WinNT (re-visited) Message-ID: <9258C238472FD411AA860004AC369AF906D20CAF@nrcmrdex1.imsb.nrc.ca> Hi all ! Remember that SNsdk issue from the previous version (see mailing archives, Oct-Dec 2000, thread : SNsdk on WinNT) ? Correct me if I'm wrong, but it doesn't seem to have been touched in January, as it was mentioned ... It gives the same CreateProcess error, and I don't see any difference in that winCon.c file. Any ideas, suggestions ... ? I'd really like to make my Tcl script work on hyper on Win. Thanks. Kind regards, Marta. From emotion168@ms67.url.com.tw Mon Apr 16 01:42:00 2001 From: emotion168@ms67.url.com.tw (emotion168@ms67.url.com.tw) Date: Mon, 16 Apr 2001 01:42:00 -0000 Subject: 21213 sourcenav about e-promotion Message-ID: <4f97a55b1d2402a46d31450aa4c7babd@NO-ID-FOUND.mhonarc.org> Title: china-art (from cloudeight's Horizon Collection release date April 10, 1999) ???? ????p????????????????????T????????????HE-Mail????}????o????H????????????????????y????????????????. Dear sourcenav,???? ???? ????j????a????????????????????Q????L????Q????????????????????????????????????K????????????P????L????????????????????????????????????S????????????????????}????o????????????????, ????????????P????{????????????????????????????[????j????s????????????P????A????????. ????????????????????\????o????????????U????C????x????Z????????????L????k????????????n????????????u????@: ???? 1. ????????????????????n????p????????????????????????????_, ????????????????????W????????????????????????????????????????????????????y????????????????????????????????????????. ????R????F????????????????????n????????????Pe-mail????W????????????????????????, ????o????????????????????????????X????????????|????e????q,????u????????????n????Y????????????????, ????b????????????_????????????????????~????????????N????????????????????i????????????????. ???? 2. ????e????U????L????H????N????o, ????????????????????????????p????????????????????w????????????????????s, ????j????????????????????????????O????????e-mail, ????????????O????????????O????P????????????????????o????o????????????????????w????????????????????G. ???? 3. ????]????S????g????????????????????]????j????q????????????o, ????y????????????????????H????H????????????P????????????????????????????????????????, ????QISP????????????i????????????????????????????v... ???? 4. ????????????F????????????T????[????????, ????????????????????p????????????????????@????????????z, ????L????k????????????n????o????H????e????????????????????u????@, ????o????H????????????????????`????P????????????k, ????o????H????????????????????????????????????B????z. ????y????????????????????????????\????b, ????????????????????????????????????G????D ???? ????p????G????A????????????W????z????P????????, ????????????B????G 1. ???? ????????PC????????????????????????????????????????????????????O, ????????????????????^????????????n????????????S????x????Z. ???? 2. ????????????????????Q????????????ne-mail????}????o. ????q????F????????????????????T????????e-mail????}????o????[????????????P????????????k????@>> ????????????????????X????A????????????u????????????@>> ????????????????????se-mail????j????????????@>> ????o????H????u????@????????????????????@>> ????????????????????????????@????????????z ????????????@????s????????????????????X????D????????????????????b????????????~????????????N????????,????w????????????????????????????S????F????????????????????????????????????W????????????D????@????@ ????O????o????Ie-mail????}????o????????????L????????????????????C????????????s????i????????????????????????????????????O????P????M????????, ????????????]????????????B????????????????????????????????????????????????????????????H????????????????????????????????????w????????, ????i????O????O????????????F????]????????????????????h????H????????????O????????????????????????????j????W????e????????????????????L????N????q????????????????????D????]????????????p????????????????????n,????????????????????????????T????[????????????????????????????k????~????????????F????????????????????????????P????????????????????B????????????????????o????????????????????D ???? ????P????????????s????????, ????i????????????Q????????????q????????????????????D????@????]????????????????????O????????????????????????????????e-mail????W????????????^ ????@ abc ????@ ????@ ????@ ????@ ????@ ????@ ????@ ????@ ????@ ????@ From rfweber@link.com Mon Apr 16 12:52:00 2001 From: rfweber@link.com (Richard F Weber) Date: Mon, 16 Apr 2001 12:52:00 -0000 Subject: auto completion References: Message-ID: <3ADB4D6B.5040106@link.com> Speaking of which, this brings up a small problem I conveniently ignored when working on my parser. Is there a way to search for symbols in a given set of files? For example, in Ada, you can "Use" a file (basically include it), and then do a "with" to reduce the namespace. This tends to make it tough if you do a "Use pkg_a; with pkg_a" & "Use pkg_b; with pkg_b", and a call is made to a function called "func1". Which package do you reference to? How do you know if "func1" belongs to pkg_a or pkg_b? I did find a routine called get_symbol, but I'm having a heck of a time trying to figure out how to call it right, and what is necessary. Is there any other routine I can use to do quick queries like that against the database, or will I have to dig into the DB_API to write my own? This seems to tie right in because the editor could be set-up to analyze on the fly which files are included in, and offer those symbols as automatic completion for the end-user to use. Thanks. --Rich David Capel wrote: >Are there any plans to add tab-completion on symbol names in the editor, >along the lines of the Emacs "hippie-expand" packages? ( Or does this >feature already exist and I've missed it? ) I work with a set of C++ >libraries which have some very long class/member/function names, and >this feature is indispensible. > >Source Navigator is a great project. Keep up the good work! > >David > > > From cmmcinn@super.org Tue Apr 17 07:23:00 2001 From: cmmcinn@super.org (Celia McInnis) Date: Tue, 17 Apr 2001 07:23:00 -0000 Subject: Commands in build window? References: <3AB63701.93F44B0@super.org> <3AB7C9F7.978679B2@super.org> Message-ID: <3ADC51BC.5B883FCA@super.org> I have upgraded to SN 5.0 (on linux), and now am having trouble executing commands from the make window. I have been getting the following error: the Directory "" cannot be created. Any suggestions? Thanks, Celia McInnis From irox@redhat.com Tue Apr 17 08:59:00 2001 From: irox@redhat.com (Ian Roxborough) Date: Tue, 17 Apr 2001 08:59:00 -0000 Subject: Commands in build window? References: <3AB63701.93F44B0@super.org> <3AB7C9F7.978679B2@super.org> <3ADC51BC.5B883FCA@super.org> Message-ID: <3ADC6841.375068A4@redhat.com> Celia McInnis wrote: > > I have upgraded to SN 5.0 (on linux), and now am having trouble executing > commands from the make window. I'll assume that you are running external makefiles or build system. > I have been getting the following error: > > the Directory "" cannot be created. > > Any suggestions? This is a minor bug which isn't setting any default directory for the Build Directory (actually, they all seems to have problems with there default settings). You can get around this by make sure that the "Build Targets" combobox is set to "", then you can enter the directory which you wish to execute the build command in. Ian, From irox@redhat.com Tue Apr 17 09:41:00 2001 From: irox@redhat.com (Ian Roxborough) Date: Tue, 17 Apr 2001 09:41:00 -0000 Subject: SNsdk on WinNT (re-visited) References: <9258C238472FD411AA860004AC369AF906D20CAF@nrcmrdex1.imsb.nrc.ca> Message-ID: <3ADC71EC.E7C48EE0@redhat.com> "Stojanovic, Marta" wrote: > > Hi all ! > > Remember that SNsdk issue from the previous version (see mailing archives, > Oct-Dec 2000, thread : SNsdk on WinNT) ? Correct me if I'm wrong, but it > doesn't seem to have been touched in January, as it was mentioned ... It > gives the same CreateProcess error, and I don't see any difference in that > winCon.c file. > > Any ideas, suggestions ... ? I'd really like to make my Tcl script work on > hyper on Win. Hi, I remember looking into this a few months ago. Unfortunately nothing ended up making it into the final release (strange side effects and other work took over). One thing I did do was get hyper to output to standard out without the use of SNsdk. I will see if I can find a patch for getting this to work. I don't remember the exact reason for not including it in this release, but it may have something to do with the slow down if you launch normal SN for under cygwin. I probably won't get a chance to hunt out the patch (if I still have it) until this weekend. Ian. From irox@redhat.com Tue Apr 17 09:53:00 2001 From: irox@redhat.com (Ian Roxborough) Date: Tue, 17 Apr 2001 09:53:00 -0000 Subject: auto completion References: Message-ID: <3ADC74D3.CC8EF99A@redhat.com> David Capel wrote: > > Are there any plans to add tab-completion on symbol names in the editor, > along the lines of the Emacs "hippie-expand" packages? ( Or does this > feature already exist and I've missed it? ) I work with a set of C++ > libraries which have some very long class/member/function names, and > this feature is indispensible. I've been planning to add this for a while, but never seem to have time to do this (I've been thinking about it for years...). It will probably be added at some point, but I can't tell you when. I don't think it would be too hard. In fact it would probably be a good starting point for somebody wanting to get involved with SN development. Until somebody gets time to implement it, we can start to spec out the new features that we want. Including additional preferences to turn it on/off or change the mode, which keys to activate it, cancel it, accept it, never do it for that symbol again, etc.. Ian. From marta.stojanovic@nrc.ca Tue Apr 17 10:54:00 2001 From: marta.stojanovic@nrc.ca (Marta Stojanovic) Date: Tue, 17 Apr 2001 10:54:00 -0000 Subject: SNsdk on WinNT (re-visited) References: <9258C238472FD411AA860004AC369AF906D20CAF@nrcmrdex1.imsb.nrc.ca> <3ADC71EC.E7C48EE0@redhat.com> Message-ID: <3ADC84E0.1A3EA8D1@nrc.ca> Thank you very much, Ian, I'd appreciate it if you could find me that patch anytime. I don't think I'd use Cygwin, so it shouldn't be a problem. Kind regards, Marta. Ian Roxborough wrote: > > Hi, I remember looking into this a few months ago. Unfortunately nothing > ended up making it into the final release (strange side effects and other > work took over). > > One thing I did do was get hyper to output to standard out without the > use of SNsdk. I will see if I can find a patch for getting this to work. > I don't remember the exact reason for not including it in this release, > but it may have something to do with the slow down if you launch normal > SN for under cygwin. > > I probably won't get a chance to hunt out the patch (if I still have it) > until this weekend. > > Ian. From mdejong@cygnus.com Tue Apr 17 23:28:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Tue, 17 Apr 2001 23:28:00 -0000 Subject: HTML, Properties Parsers References: <3ACC903F.1050100@knuut.de> Message-ID: On Thu, 5 Apr 2001, Khamis Abuelkomboz (UUNET) wrote: > Here are two parsers for HTML and Java Developers, what I found very > usefull: > > http://home.knuut.de/khamis/sn/index.html > > Khamis Hey Khamis, did you get a chance to fill out the copyright assignment form? http://sources.redhat.com/sourcenav/copyright.html We would like to take a look at your parsers, but we have to make sure all that legal mumbo jumbo is out of the way first. Mo DeJong Red Hat Inc From bertini@dsi.unifi.it Wed Apr 18 03:43:00 2001 From: bertini@dsi.unifi.it (Marco Bertini) Date: Wed, 18 Apr 2001 03:43:00 -0000 Subject: SN and CVS integration Message-ID: <3ADD6FE1.4C808B15@dsi.unifi.it> Dear all, I think I need some more explanations than those provided in the SN 5.0 manual about the CVS functions. I have a working CVS server on a RedHat, and I've compiled SN 5.0 on an IRIX client. At present, when I start a new project I can't check in the new files in the CVS using the check-in function of SN, but I have to use the "cvs add" command from shell. After this step I can start to use the check-in function. The steps I follow are: 1) create the project directory on the CVS server 2) login on the CVS server on the client 3) check out the directory 4) start SN and start coding 5) cvs add the files from the shell 6) now I can check in/out the files using the SN functions Is this the correct beahviour, or is it possible to do everything from within SN ? Best regards, Marco Bertini -- | Ing. Marco Bertini - http://viplab.dsi.unifi.it/~bertini | Dipartimento Sistemi & Informatica | Tel. +39-055-4796.540 - Fax: +39-055-4796.363 | Universita' di Firenze - Ingegneria elettronica From hans.plesser@itf.nlh.no Thu Apr 19 00:42:00 2001 From: hans.plesser@itf.nlh.no (Hans Ekkehard Plesser) Date: Thu, 19 Apr 2001 00:42:00 -0000 Subject: SN 5.0 / Linux : No version control Message-ID: <15070.38629.504324.358195@itfhep.nlh.no> Hi! I have recently compiled and installed SN 5.0 on my Linux machine and it works just fine. But I have no "Revision Control" entry in the "Tools" menu, nor anywhere else. The only place VC shows up is in the preferences menu, where I chose CVS, which I usually use. Any idea why there is no Revision Control menu? If more info is needed to locate the problem, please mail me! Thanks a lot in advance, Hans --------------------------------------------------------------------- Dr. Hans Ekkehard Plesser Tel. : +47 6494 8832 Institutt for tekniske fag Fax : +47 6494 8810 Norges landbruksh????gskole e-mail: hans.plesser@itf.nlh.no N-1432 ????s, Norway WWW : arken.nlh.no/~itfhep --------------------------------------------------------------------- From irox@redhat.com Thu Apr 19 09:34:00 2001 From: irox@redhat.com (Ian Roxborough) Date: Thu, 19 Apr 2001 09:34:00 -0000 Subject: SN 5.0 / Linux : No version control References: <15070.38629.504324.358195@itfhep.nlh.no> Message-ID: <3ADF12F9.BDAE5F09@redhat.com> Well I just checked it and it still seems to be there. At a guess I'd say that you are looking in the "Tools" menu on the Symbol Browser, when it is under the "Tools" menu on the Editor window. Otherwise I've no idea what happened. Ian. Hans Ekkehard Plesser wrote: > > Hi! > > I have recently compiled and installed SN 5.0 on my Linux machine and > it works just fine. But I have no "Revision Control" entry in the > "Tools" menu, nor anywhere else. The only place VC shows up is in the > preferences menu, where I chose CVS, which I usually use. > > Any idea why there is no Revision Control menu? If more info is > needed to locate the problem, please mail me! > > Thanks a lot in advance, > Hans > > --------------------------------------------------------------------- > Dr. Hans Ekkehard Plesser Tel. : +47 6494 8832 > Institutt for tekniske fag Fax : +47 6494 8810 > Norges landbruksh????gskole e-mail: hans.plesser@itf.nlh.no > N-1432 ????s, Norway WWW : arken.nlh.no/~itfhep > --------------------------------------------------------------------- From irios@proin.es Fri Apr 20 07:30:00 2001 From: irios@proin.es (Nacho de los Ríos Tormo) Date: Fri, 20 Apr 2001 07:30:00 -0000 Subject: Unable to build in SuSE 7.0 Message-ID: <01042016325500.28678@irios> After my lack of success in executing snav5 binaries in SuSE Linux 7.0, I have found some time to try to build the sources. My builds failed when reaching the fortran parser, as there seems to be at least one missing file (snavigator/parsers/fortran/fortran.c). I could only get the build working by removing references to "snavigator/parsers/fortran" from "snavigator/configure" and "snavigator/configure.in", as well as references to "fortran" from "snavigator/parsers/Makefile.in" and "snavigator/parsers/Makefile.am". With this changes, I was able to build and run snav5. I have lost the integration with fortran, which I'm sure I wont miss ... I don't see, however, how could these sources compile without changes for other people; maybe SuSE sets up gcc or make with options that make it more finicky with missing files .... By the way, are there any plans to make snav more friendly to truetype fonts? The visual quality of the fonts that Source Navigator uses leaves A LOT to be desired, while my X server offers a few great quality truetype fonts. Thanks for a great product, Nacho de los R????os Tormo Procedimientos Integrados S.L. SPAIN From khamis@knuut.de Mon Apr 23 03:04:00 2001 From: khamis@knuut.de (Khamis Abuelkomboz (UUNET)) Date: Mon, 23 Apr 2001 03:04:00 -0000 Subject: Bugfix for sorting problem in the symbol browser Message-ID: <3AE3FDC9.8070105@knuut.de> This patch applies to SN5.0 and SN4.52. The whole file is located at http://home.knuut.de/sn/compare.c Please notice that it uses the same compare conditions like the column sorting... You can download the binaries with this change for windows platforms: http://home.knuut.de/sn/sn452/hyper.exe http://home.knuut.de/sn/sn50/hyper.exe PATCH-Output for the fixed file /snavigator/hyper/compare.c: +++ compare.c Mon Apr 23 09:46:47 2001 @@ -23,8 +23,10 @@ */ +#include #include #include "tclInt.h" +#include "tkInt.h" /* *---------------------------------------------------------------------- @@ -79,44 +81,12 @@ right++; } - for ( ; (*left != '\0') && (*right != '\0'); left++, right++) { - if (*left == *right) { - continue; - } - - leftCh = toupper(*left); - rightCh = toupper(*right); - - if (leftCh < rightCh) { - Tcl_SetIntObj(Tcl_GetObjResult(interp), -1); - return TCL_OK; - } else if (rightCh < leftCh) { - Tcl_SetIntObj(Tcl_GetObjResult(interp), 1); - return TCL_OK; - } else { - /* `A' is less than `a'. */ - if (isupper(*left) && islower(*right)) { - Tcl_SetIntObj(Tcl_GetObjResult(interp), -1); - return TCL_OK; - } - /* `a' is greater than `A'. */ - if (islower(*left) && isupper(*right)) { - Tcl_SetIntObj(Tcl_GetObjResult(interp), 1); - return TCL_OK; - } - } - } - - if (*left == '\0') { - if (*right == '\0') { - Tcl_SetIntObj(Tcl_GetObjResult(interp), 0); - } else { - Tcl_SetIntObj(Tcl_GetObjResult(interp), -1); + dummy = (tolower(*left) - tolower(*right)); + if (dummy == 0 && *left != '\0') + { + dummy = strcasecmp (left + 1, right + 1); } - } else { - Tcl_SetIntObj(Tcl_GetObjResult(interp), 1); - } - + Tcl_SetIntObj(Tcl_GetObjResult(interp), dummy); return TCL_OK; } From khamis@knuut.de Mon Apr 23 03:06:00 2001 From: khamis@knuut.de (Khamis Abuelkomboz (UUNET)) Date: Mon, 23 Apr 2001 03:06:00 -0000 Subject: Bugfix for sorting problem in the symbol browser References: <3AE3FDC9.8070105@knuut.de> Message-ID: <3AE3FE64.8070406@knuut.de> Ups, the URLS are Khamis Abuelkomboz (UUNET) wrote: > The whole file is located at http://home.knuut.de/sn/compare.c http://home.knuut.de/khamis/sn/compare.c > http://home.knuut.de/sn/sn452/hyper.exe > http://home.knuut.de/sn/sn50/hyper.exe http://home.knuut.de/khamis/sn/sn452/hyper.exe http://home.knuut.de/khamis/sn/sn50/hyper.exe From bmunday@3glab.com Thu Apr 26 05:24:00 2001 From: bmunday@3glab.com (Bill Munday) Date: Thu, 26 Apr 2001 05:24:00 -0000 Subject: Using Nedit, gvim, etc Editors with Snav 4.x References: <3AE3FE64.8070406@knuut.de> Message-ID: Hi, Up till now I have been happy with SN Editor until recently where it has started to mess up syntax highlighting, an nor can it highlight sam files. How do I use another editor and still maintain the jumping to errors during the build step? As changing the Preferences - EDIT = external editor does not give a clean integration. Thanks Bill PS How comes no one aswered my previous emails? PS2 Have you thought about docking the windows like Microsoft VC6 From john.mills@atl.viasat.com Thu Apr 26 06:05:00 2001 From: john.mills@atl.viasat.com (Mills, John) Date: Thu, 26 Apr 2001 06:05:00 -0000 Subject: SN-5.0 Building Question Message-ID: <5C44CEE7DF7AD4119783000629A813F0D48723@SRV32-EXCH-NTS> Hello - I just built SN-5.0 from 'SN50-010322-source.tar.gz' in a GNU/Linux RH6.2 setup. The "% make" build was successful except for the following error: "... make[1]: Leaving directory `/tmp/build/snavigator/libgui' make: *** No rule to make target `all-libremote', needed by `all-sid'. Stop. make[1]: Entering directory `/tmp/build/snavigator/db' ..." I forced the build to complete ("% make -k") with no further errors, and the results installed and at least start OK. What am I missing, and is it important? If so, how can I build the missing piece(s)? Thanks. - John Mills From mdejong@cygnus.com Thu Apr 26 12:02:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 26 Apr 2001 12:02:00 -0000 Subject: SN-5.0 Building Question References: <5C44CEE7DF7AD4119783000629A813F0D48723@SRV32-EXCH-NTS> Message-ID: On Thu, 26 Apr 2001, Mills, John wrote: > Hello - > > I just built SN-5.0 from 'SN50-010322-source.tar.gz' in a GNU/Linux RH6.2 > setup. The "% make" build was successful except for the following error: > "... > make[1]: Leaving directory `/tmp/build/snavigator/libgui' > make: *** No rule to make target `all-libremote', needed by `all-sid'. > Stop. > make[1]: Entering directory `/tmp/build/snavigator/db' > ..." > > I forced the build to complete ("% make -k") with no further errors, and the > results installed and at least start OK. > > What am I missing, and is it important? If so, how can I build the missing > piece(s)? > > Thanks. > - John Mills Sorry about that, the next bug fix release should fix that missing rule problem. For now, you just run `make all-snavigator` and the `make install-snavigator`. Mo DeJong Red Hat Inc From john.mills@atl.viasat.com Thu Apr 26 14:46:00 2001 From: john.mills@atl.viasat.com (Mills, John) Date: Thu, 26 Apr 2001 14:46:00 -0000 Subject: SN-5.0 Building Question Message-ID: <5C44CEE7DF7AD4119783000629A813F0D4877A@SRV32-EXCH-NTS> Mo - Thanks - I seem to have successfully built all the required pieces, but may not have gotten a few of them installed -- probably the installation had been abandoned somewhere short of completion. ('du' seems to show a few hundred KBy more stuff.) I actually bought SN-4.2 and a 4.5 upgrade, and I do like the tool. MDJ> Sorry about that, the next bug fix release should fix that MDJ> missing rule problem. For now, you just run `make all-snavigator` MDJ> and the `make install-snavigator`. MDJ> Mo DeJong MDJ> Red Hat Inc Regards - John Mills From irox@redhat.com Thu Apr 26 16:08:00 2001 From: irox@redhat.com (Ian Roxborough) Date: Thu, 26 Apr 2001 16:08:00 -0000 Subject: Using Nedit, gvim, etc Editors with Snav 4.x References: Message-ID: <3AE8AA23.40DD6178@redhat.com> Bill Munday wrote: > Up till now I have been happy with SN Editor until recently where it has > started to mess up syntax highlighting, an nor can it highlight sam files. SN doesn't know anything about sam files (I don't either for that matter). However, if you can produce a short reproducible test case for the highlighting problem, then it's a step closer to being fixed. > How do I use another editor and still maintain the jumping to errors > during the build step? Emacs is meant to have that level of integration, however it's possible that the Emacs integration is broken. Current, I don't think there are any other editors that could work like that. > As changing the Preferences - EDIT = external editor does not give a clean > integration. Yeah, that level of integration would require adding an editor interface layer that can control either an existing SN editor or be ported to control 3rd party editors. > PS How comes no one aswered my previous emails? I didn't have a good answer. Ian. From mdejong@cygnus.com Thu Apr 26 17:17:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 26 Apr 2001 17:17:00 -0000 Subject: SN-5.0 Building Question References: <5C44CEE7DF7AD4119783000629A813F0D4877A@SRV32-EXCH-NTS> Message-ID: On Thu, 26 Apr 2001, Mills, John wrote: > Mo - > > Thanks - I seem to have successfully built all the required pieces, but may > not have gotten a few of them installed -- probably the installation had > been abandoned somewhere short of completion. ('du' seems to show a few > hundred KBy more stuff.) Did the `make install-snavigator` rule fail? If not, then everything should have been installed correctly. > I actually bought SN-4.2 and a 4.5 upgrade, and I do like the tool. Glad to hear it. Now that the source is GPLed, you can also fix anything you don't like about SN. We think 5.0 is a lot better than the 4.X series, but we are interested in hearing from longtime users when it comes to stability and general ease of use issues. Mo DeJong Red Hat Inc From mdejong@cygnus.com Thu Apr 26 18:36:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 26 Apr 2001 18:36:00 -0000 Subject: Using Nedit, gvim, etc Editors with Snav 4.x References: Message-ID: On Thu, 26 Apr 2001, Bill Munday wrote: > Hi, > > Up till now I have been happy with SN Editor until recently where it has > started to mess up syntax highlighting, an nor can it highlight sam files. > > How do I use another editor and still maintain the jumping to errors > during the build step? I think that is covered here: http://sources.redhat.com/sourcenav/online-docs/userguide/editor.html#pgfId-1075901 > As changing the Preferences - EDIT = external editor does not give a clean > integration. Could you explain what you mean by that? An external editor is by definition not integrated. Mo From john.mills@atl.viasat.com Fri Apr 27 05:59:00 2001 From: john.mills@atl.viasat.com (Mills, John) Date: Fri, 27 Apr 2001 05:59:00 -0000 Subject: SN-5.0 Building Question Message-ID: <5C44CEE7DF7AD4119783000629A813F0D4879C@SRV32-EXCH-NTS> Mo - Thanks for the note. From: Mo DeJong Sent: Thursday, April 26, 2001 8:17 PM To: sourcenav@sources.redhat.com Subject: RE: SN-5.0 Building Question > Did the `make install-snavigator` rule fail? If not, then everything > should have been installed correctly. As I couldn't find installation directions in the SN-5.0 tarball, I just did 'make' and 'make install' instead of 'make all-snavigator' and 'make install-snavigator'. When I did the two latter steps, I had a clean build and installation. './source/README' refers me to an 'INSTALL' directory, which I didn't find. The text of ./source/snavigator/README is "README". &8-) If someone could confirm whether/where the building and installation information is in the fileset, I would be appreciative (and embarrassed, but not for the first time). Thanks again. - John Mills From bruce@cenderis.demon.co.uk Fri Apr 27 15:14:00 2001 From: bruce@cenderis.demon.co.uk (Bruce Stephens) Date: Fri, 27 Apr 2001 15:14:00 -0000 Subject: SN-5.0 Building Question References: <5C44CEE7DF7AD4119783000629A813F0D4879C@SRV32-EXCH-NTS> Message-ID: <87elue56x0.fsf@cenderis.demon.co.uk> "Mills, John" writes: [...] > If someone could confirm whether/where the building and installation > information is in the fileset, I would be appreciative (and > embarrassed, but not for the first time). I don't think they are. They were in the announcement sent to this list, but I don't think they're in the tarball. (Of course, this is silly---the default targets ought to work, and presumably will shortly.) When do we get CVS? From ewoodberry@airnetcom.com Tue May 1 07:19:00 2001 From: ewoodberry@airnetcom.com (Emily Woodberry) Date: Tue, 01 May 2001 07:19:00 -0000 Subject: Startup problem Message-ID: <07BB842D3E28D411804900508BAC02BDC4D220@ams1.aircom.com> My name is Emily Woodberry. I work for AirNet Communications in Melbourne, Florida. We had purchased Source Navigator 4.2 a number of years ago. We purchased additional licenses and an upgrade to 4.5 last year just prior to it becoming a FREE product. We also purchased a year of support, which is still current. I am having a problem that I cannot solve. I have one user who can bring up 4.2 just fine but when he attempts to run the new version, 4.5, he is getting an error that the reads: "error getting working directory name: no such file or directory" I have not been able to find any error message information on the tool. He is the only user who has experienced this problem. How do I resolve it? Thanks, Emily THIS TRANSMISSION, INCLUDING ANY ATTACHMENTS OR FILES, CONTAINS AIRNET COMMUNICATIONS CORPORATION CONFIDENTIAL AND PROPRIETARY INFORMATION WHICH MAY BE OTHERWISE EXEMPT FROM DISCLOSURE. The information is intended to be for the exclusive use of the individual or entity named above. If you are not the intended recipient, be advised that any disclosure, copying, distribution or other use of this information is strictly prohibited. If you have received this transmission in error, please notify us by telephone at 1-321-984-1990 or by email to postmaster@aircom.com immediately and do not read, print or save this information in any manner. From john.mills@atl.viasat.com Tue May 1 07:36:00 2001 From: john.mills@atl.viasat.com (Mills, John) Date: Tue, 01 May 2001 07:36:00 -0000 Subject: Startup problem Message-ID: <5C44CEE7DF7AD4119783000629A813F0D488E5@SRV32-EXCH-NTS> Ms. Woodberry - You didn't indicate your user's host environment, but perhaps he doesn't have a HOME environment setting defined, and SN may expect one. Does the installation work otherwise, such as defining and opening projects? - John Mills -----Original Message----- From: Emily Woodberry [ mailto:ewoodberry@airnetcom.com ] Sent: Tuesday, May 01, 2001 10:19 AM To: 'sourcenav@sources.redhat.com' Subject: Startup problem ... > I am having a problem that I cannot solve. I have one user who can > bring up 4.2 just fine but when he attempts to run the new version, > 4.5, he is getting an error that the reads: "error getting working > directory name: no such file or directory" From thomas.stroesslin@epfl.ch Tue May 1 09:10:00 2001 From: thomas.stroesslin@epfl.ch (Thomas Stroesslin) Date: Tue, 01 May 2001 09:10:00 -0000 Subject: Xref and find declaration of variables Message-ID: consider the following "project": myfile.c : int myglobalvar; int myfunc(int myarg) { int mylocalvar; int myvar; myvar = 1; mylocalvar = 1; myarg = 1; myglobalvar=1; } myotherfile.c : int myvar; // which is global ... I am working on myfile.c and try to find out things about my variables: 1) find declaration of myvar on the assignment line -> leads me to myvar of myotherfile.c (don't you have scope info in the db?) 2) same as 1) for mylocalvar -> doesn't find anything, doesn't report error -> does nothing! 3) same as 1) for myarg -> same as 2) 4) myglobalvar referred by -> finds nothing 5) myvar or mylocalvar or myarg referred by in function myfunc() -> same as 4 all these features are available in sniff+. IMHO, they are among the top 10 most importand code analysis features (the other 5 are working in sourcenavigator, good stuff) do you plan to include such features in future releases of sourcenavigator? If so, when - roughly - can I expect them to be implemented? cheers, tom From rfweber@link.com Tue May 1 10:32:00 2001 From: rfweber@link.com (Richard F Weber) Date: Tue, 01 May 2001 10:32:00 -0000 Subject: Xref and find declaration of variables References: Message-ID: <3AEEF30F.6050805@link.com> Don't know if it's a problem persay with SourceNavigator as compared to the C-Parser itself not registering the proper variable & keeping track of the scope of the current variable that's being worked with. However, this could explain some of the hang-ups I've been having with the Ada Parser if the database back-end doesn't do associations correctly. --Rich Thomas Stroesslin wrote: >consider the following "project": > >myfile.c : > >int myglobalvar; >int myfunc(int myarg) { > int mylocalvar; > int myvar; > > myvar = 1; > mylocalvar = 1; > myarg = 1; > myglobalvar=1; >} > >myotherfile.c : > >int myvar; // which is global >... > >I am working on myfile.c and try to find out things about my variables: > >1) find declaration of myvar on the assignment line -> leads me to myvar > of myotherfile.c (don't you have scope info in the db?) > >2) same as 1) for mylocalvar > -> doesn't find anything, doesn't report error -> does nothing! > >3) same as 1) for myarg > -> same as 2) > >4) myglobalvar referred by -> finds nothing > >5) myvar or mylocalvar or myarg referred by in function myfunc() > -> same as 4 > > >all these features are available in sniff+. IMHO, they are among the top >10 most importand code analysis features (the other 5 are working in >sourcenavigator, good stuff) > >do you plan to include such features in future releases of >sourcenavigator? If so, when - roughly - can I expect them to be >implemented? > >cheers, >tom > > From mdejong@cygnus.com Tue May 1 10:52:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Tue, 01 May 2001 10:52:00 -0000 Subject: Xref and find declaration of variables References: Message-ID: On Tue, 1 May 2001, Thomas Stroesslin wrote: ... Details of a bug ... > do you plan to include such features in future releases of > sourcenavigator? If so, when - roughly - can I expect them to be > implemented? > > cheers, > tom I think you are asking the wrong question here. Naturally we plan on fixing bugs in future releases. But the reality is that we have to work on things as time permits. If you really need this feature fixes by a specific date, why don't you roll up your sleeves and start hacking on the source code? If you are uninterested in hacking on the source code, you could always contract with Red Hat to fix the problem. Heck, you could even hire a third party to fix the problem and post a patch for inclusion into the next release. You have plenty of options when it comes to open source code. Mo DeJong Red Hat Inc From thomas.stroesslin@epfl.ch Wed May 2 04:33:00 2001 From: thomas.stroesslin@epfl.ch (Thomas Stroesslin) Date: Wed, 02 May 2001 04:33:00 -0000 Subject: Xref and find declaration of variables References: <3AEEF30F.6050805@link.com> Message-ID: >I think you are asking the wrong question here. Naturally we >plan on fixing bugs in future releases. But the reality is >that we have to work on things as time permits. If you ok, I reformulate the question :-) "do you plan to fix the bug of not having proper scoping?" don't say it's not a bug, cause at least my first example must be considered a bug. do you agree on that, Mo? Ok, the others are feature whishes. But then again, Mo: end-user feedback is an important part of open source software development, don't you think? the order is: 1) release 2) user feedback 3) finetune, enhance, bugfix etc. where 2) and 3) are looped. I spoke about 2), not 3) to sourcenav users: I'd like to know if anybody else also misses the features I described. Maybe I am spoiled, but IMHO, it is very hard to analyse someone else's code without those features. And remember: 3) comes later; so don't let you be scared to silence if someone tells you immediately to code your whishes yourself if you're not happy. to Mo: If you really _are_ an opensource-man, please be nicer to end-users, as they help a lot on improving opensource software. >really need this feature fixes by a specific date, why >don't you roll up your sleeves and start hacking on the >source code? If you are uninterested in hacking on the >source code, you could always contract with Red Hat >to fix the problem. Heck, you could even hire a third >party to fix the problem and post a patch for inclusion >into the next release. You have plenty of options >when it comes to open source code. > >Mo DeJong >Red Hat Inc cheers, tom > Thomas Stroesslin wrote: > > >consider the following "project": > > > >myfile.c : > > > >int myglobalvar; > >int myfunc(int myarg) { > > int mylocalvar; > > int myvar; > > > > myvar = 1; > > mylocalvar = 1; > > myarg = 1; > > myglobalvar=1; > >} > > > >myotherfile.c : > > > >int myvar; // which is global > >... > > > >I am working on myfile.c and try to find out things about my variables: > > > >1) find declaration of myvar on the assignment line -> leads me to myvar > > of myotherfile.c (don't you have scope info in the db?) > > > >2) same as 1) for mylocalvar > > -> doesn't find anything, doesn't report error -> does nothing! > > > >3) same as 1) for myarg > > -> same as 2) > > > >4) myglobalvar referred by -> finds nothing > > > >5) myvar or mylocalvar or myarg referred by in function myfunc() > > -> same as 4 > > > > > >all these features are available in sniff+. IMHO, they are among the top > >10 most importand code analysis features (the other 5 are working in > >sourcenavigator, good stuff) > > > >do you plan to include such features in future releases of > >sourcenavigator? If so, when - roughly - can I expect them to be > >implemented? > > > >cheers, > >tom > > > > > > > -- --------------------------------------- Thomas Stroesslin DI-MANTRA (INF 130) EPFL CH-1015 Lausanne phone: +41 (0)21 693 52 64 E-Mail: mailto:thomas.stroesslin@epfl.ch WWW: http://diwww.epfl.ch/~stroessl/index.html PGP: http://pgp5.ai.mit.edu:11371/pks/lookup?op=get&search=0x183AA136 From irox@redhat.com Wed May 2 11:28:00 2001 From: irox@redhat.com (Ian Roxborough) Date: Wed, 02 May 2001 11:28:00 -0000 Subject: Xref and find declaration of variables References: Message-ID: <3AF05198.CBB5E88C@redhat.com> Thomas Stroesslin wrote: > ok, I reformulate the question :-) "do you plan to fix the bug of not > having proper scoping?" don't say it's not a bug..... Heheh, I don't see how it could be a bug. I'll put it another way for you "do you plan to implement a complete scoping system?" The answer is "at some point, when we have time". Note that what you are asking us to do doesn't exist in SN yet. Maybe some hack or work around could be used, but I'd prefer to see a clean safe scope implementation that would work for nested namespaces, classes, inner-classes, etc. Ian. From mdejong@cygnus.com Wed May 2 12:43:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Wed, 02 May 2001 12:43:00 -0000 Subject: Xref and find declaration of variables References: Message-ID: On Wed, 2 May 2001, Thomas Stroesslin wrote: > Mo: end-user feedback is an important part of open > source software development, don't you think? Yes, but users actually fixing some problems is an important part of an open source project too. Asking "when can I expect this to be done" multiple times does not seem like feedback to me. > to Mo: > If you really _are_ an opensource-man, please be nicer to end-users, as > they help a lot on improving opensource software. I really don't follow. I am trying to help you to understand your options with respect to getting this bug fixed. I don't see what that has to do with being "nice to end users". Is the problem that you just don't like any of the options I have outlined, or do you object to the presentation? Mo From thomas.stroesslin@epfl.ch Thu May 3 00:15:00 2001 From: thomas.stroesslin@epfl.ch (Thomas Stroesslin) Date: Thu, 03 May 2001 00:15:00 -0000 Subject: Xref and find declaration of variables References: <3AF05198.CBB5E88C@redhat.com> Message-ID: > > ok, I reformulate the question :-) "do you plan to fix the bug of not > > having proper scoping?" don't say it's not a bug..... > > Heheh, I don't see how it could be a bug. Ok, you're right. in the example I mentionned, the Xref should at least say: "I don't know". However, it pretends knowing what it does and gives me the wrong answer. This is a bug. Saying that it didn't know would be a missing feature, which I could accept. I see that probably you'd have to remove the Xref completely to prevent giving false answers. > I'll put it another way for you "do you plan to implement a complete > scoping system?" > > The answer is "at some point, when we have time". > > Note that what you are asking us to do doesn't exist > in SN yet. Maybe some hack or work around could be used, I didn't know there was little (or none at all?) scoping support. I only guessed :-) Note: I would not dare asking you to implement it. I rather ask _if_ you planned to implement it, and heck, this is not the same The essence of my postings: Having a good xref is the most important thing for me. I don't care much about other features, I just want a good xref, and I want you to know that. thanks, tom From Matthias.Albert@sew-eurodrive.de Fri May 4 02:12:00 2001 From: Matthias.Albert@sew-eurodrive.de (Matthias.Albert@sew-eurodrive.de) Date: Fri, 04 May 2001 02:12:00 -0000 Subject: Source Navigator 5.0 Download Problem Message-ID: Hi, today I tried to download the Source Navigator 5.0 release. The problem is, that my browser (Internet Explorer, Windows NT, SP5) asks me for a user name and a password. Is the Source Navigator not available for free? Kind regards Matthias Albert From brecht.vermeulen@rug.ac.be Fri May 4 02:16:00 2001 From: brecht.vermeulen@rug.ac.be (Brecht Vermeulen) Date: Fri, 04 May 2001 02:16:00 -0000 Subject: Source Navigator 5.0 Download Problem References: Message-ID: <3AF27359.7557FC80@rug.ac.be> Hi Matthias, this happens when there are too much users on the ftp server. Try a mirror. best regards, Brecht Matthias.Albert@sew-eurodrive.de wrote: > > Hi, > today I tried to download the Source Navigator 5.0 release. The problem is, > that my browser (Internet Explorer, Windows NT, SP5) asks me for a user name > and a password. Is the Source Navigator not available for free? > > Kind regards > > Matthias Albert > > > > From erayo@cs.bilkent.edu.tr Sun May 6 03:17:00 2001 From: erayo@cs.bilkent.edu.tr (Eray Ozkural (exa)) Date: Sun, 06 May 2001 03:17:00 -0000 Subject: sourcenav 5.0 Message-ID: <3AF5245D.7AE82123@cs.bilkent.edu.tr> Which system libraries can I use to build sourcenav instead of ones included in the distribution among those of the tcl/tk family? -- Eray Ozkural (exa) Comp. Sci. Dept., Bilkent University, Ankara e-mail: erayo@cs.bilkent.edu.tr www: http://www.cs.bilkent.edu.tr/~erayo From erayo@cs.bilkent.edu.tr Sun May 6 03:43:00 2001 From: erayo@cs.bilkent.edu.tr (Eray Ozkural (exa)) Date: Sun, 06 May 2001 03:43:00 -0000 Subject: 5.0 build error Message-ID: <3AF52A79.6D5364D7@cs.bilkent.edu.tr> >From the tail of the build log make[3]: Leaving directory `/home/exa/devel/debian/source/libgui/src' make[3]: Entering directory `/home/exa/devel/debian/source/libgui' make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/home/exa/devel/debian/source/libgui' make[2]: Leaving directory `/home/exa/devel/debian/source/libgui' make[1]: Leaving directory `/home/exa/devel/debian/source/libgui' make: *** No rule to make target `all-libremote', needed by `all-sid'. Stop. I did $ ./configure $ make on a Debian i386 unstable system. I guess I'll just fix it, but this does not occur on Red Hat systems? Thanks, -- Eray Ozkural (exa) Comp. Sci. Dept., Bilkent University, Ankara e-mail: erayo@cs.bilkent.edu.tr www: http://www.cs.bilkent.edu.tr/~erayo From erayo@cs.bilkent.edu.tr Sun May 6 05:37:00 2001 From: erayo@cs.bilkent.edu.tr (Eray Ozkural (exa)) Date: Sun, 06 May 2001 05:37:00 -0000 Subject: 5.0 build error References: <3AF52A79.6D5364D7@cs.bilkent.edu.tr> Message-ID: <3AF5454D.4BEAFD0F@cs.bilkent.edu.tr> "Eray Ozkural (exa)" wrote: > > >From the tail of the build log > make[3]: Leaving directory `/home/exa/devel/debian/source/libgui/src' > make[3]: Entering directory `/home/exa/devel/debian/source/libgui' > make[3]: Nothing to be done for `all-am'. > make[3]: Leaving directory `/home/exa/devel/debian/source/libgui' > make[2]: Leaving directory `/home/exa/devel/debian/source/libgui' > make[1]: Leaving directory `/home/exa/devel/debian/source/libgui' > make: *** No rule to make target `all-libremote', needed by `all-sid'. Stop. just commenting out all-libremote dependency fixes this. -- Eray Ozkural (exa) Comp. Sci. Dept., Bilkent University, Ankara e-mail: erayo@cs.bilkent.edu.tr www: http://www.cs.bilkent.edu.tr/~erayo From spolk@baritoneconsulting.com Sun May 6 11:23:00 2001 From: spolk@baritoneconsulting.com (Syd Polk) Date: Sun, 06 May 2001 11:23:00 -0000 Subject: 5.0 build error Message-ID: <200105061822.LAA13283@postman.bayarea.net> Eray Ozkural (exa) wrote: >"Eray Ozkural (exa)" wrote: >> >> >From the tail of the build log >> make[3]: Leaving directory `/home/exa/devel/debian/source/libgui/src' >> make[3]: Entering directory `/home/exa/devel/debian/source/libgui' >> make[3]: Nothing to be done for `all-am'. >> make[3]: Leaving directory `/home/exa/devel/debian/source/libgui' >> make[2]: Leaving directory `/home/exa/devel/debian/source/libgui' >> make[1]: Leaving directory `/home/exa/devel/debian/source/libgui' >> make: *** No rule to make target `all-libremote', needed by `all-sid'. Stop. > >just commenting out all-libremote dependency fixes this. You can also use "make all-snavigator; make install-snavigator". This will actually build and install less stuff than "make; make install". From erayo@cs.bilkent.edu.tr Sun May 6 11:27:00 2001 From: erayo@cs.bilkent.edu.tr (Eray Ozkural (exa)) Date: Sun, 06 May 2001 11:27:00 -0000 Subject: 5.0 build error References: <200105061822.LAA13283@postman.bayarea.net> Message-ID: <3AF5974C.1245854C@cs.bilkent.edu.tr> Syd Polk wrote: > > You can also use "make all-snavigator; make install-snavigator". This > will actually build and install less stuff than "make; make install". Thanks, this is the preffered way to build snavigator I suppose. -- Eray Ozkural (exa) Comp. Sci. Dept., Bilkent University, Ankara e-mail: erayo@cs.bilkent.edu.tr www: http://www.cs.bilkent.edu.tr/~erayo From mdejong@cygnus.com Sun May 6 13:02:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Sun, 06 May 2001 13:02:00 -0000 Subject: sourcenav 5.0 References: <3AF5245D.7AE82123@cs.bilkent.edu.tr> Message-ID: On Sun, 6 May 2001, Eray Ozkural (exa) wrote: > Which system libraries can I use to build sourcenav instead of ones > included in the distribution among those of the tcl/tk family? You can't. At least not yet. After the Tcl/Tk 8.3 upgrade is finished I am going to add support for a --with-tcl and --with-tk set of flags that will let one use system libs instead of ones from the tree. Mo From marian@mail.jozep.com.au Mon May 7 04:47:00 2001 From: marian@mail.jozep.com.au (marian) Date: Mon, 07 May 2001 04:47:00 -0000 Subject: Help Indented text Message-ID: <3AF68A47.674D2BBE@mail.jozep.com.au> I have this little patch to give me auto brace completion, which call should I use to get proper indenting. I have used the tkTextInsert but this does not give correct nested indenting. proc sn_rc_editor {view text} { global auto_brace global sn_text_highlight_group if {$sn_text_highlight_group($text) == "c++"} { set auto_brace(for) {" \( ; ; \) \{\n\t" "\n\}"} set auto_brace(if) {" \( FALSE \) \{\n\t" "\n\}"} set auto_brace(else) {" \{\n\t" "\n\}"} set auto_brace(switch) {" \( \) \{\n\tcase " ":\n\tdefault:\n\}"} set auto_brace(while) {" \( \) \{\n\t" "\n\}"} set auto_brace(do) {" \{\n\t" "\n\} while \( FALSE \);"} # Auto build regexp string set names [array names auto_brace] set names [ join $names | ] set auto_brace(names) $names bind $text {auto_brace %W; break} } if {$sn_text_highlight_group($text) == "tcl"} { } proc auto_brace {W} { global auto_brace global sn_text_highlight_group set word [$W get "insert -1 chars wordstart" insert] if { [regexp {[$auto_brace(names)]} $word {}] } { tkTextInsert $w insert [lindex $auto_brace($word) 0] set index [$W index insert] tkTextInsert $w insert [lindex $auto_brace($word) 1] # Crunch out any trailing elements to make it all a bit tidier set tlist [lrange $auto_brace($word) 2 end] foreach element $tlist { ac_paste $W $element } $W mark set insert $index } } } From marian@mail.jozep.com.au Mon May 7 07:15:00 2001 From: marian@mail.jozep.com.au (marian) Date: Mon, 07 May 2001 07:15:00 -0000 Subject: Editor startup HELP!!!!!!!!!!!!! Message-ID: <3AF6ACF0.1C474C82@mail.jozep.com.au> The manual says that if I want to override behaviour in the editor I need to put code in .sn/rc.tcl. I have done this and find I have odd behaviour in all versions of sourcenav 4.2, 99r1, and 5.0. If I exit from sn with an editor window open, when I restart the same project in sn the previous editor window opens, but the behaviour I have placed in the rc.tcl does not work for this window. If I open a new editor window then the behaviour is there. The code will complete braces, type for{ and it will put for ( ; ; ) { } I like this style. But it only does this in newly opened editor windows. Desperately need help!!!!!!!!!!!!!!!!!!!!!!! This is the source put it in .sn/rc.tcl proc sn_rc_editor {view text} { global auto_brace global sn_text_highlight_group puts stdout $view puts stdout $text puts stdout $sn_text_highlight_group($text) set cpp "c++" set auto_brace(${cpp},for) {" \( ; ; \) \{\n\t" "\n\}"} set auto_brace(${cpp},if) {" \( FALSE \) \{\n\t" "\n\}"} set auto_brace(${cpp},else) {" \{\n\t" "\n\}"} set auto_brace(${cpp},switch) {" \( \) \{\n\tcase " ":\n\tdefault:\n\}"} set auto_brace(${cpp},while) {" \( \) \{\n\t" "\n\}"} set auto_brace(${cpp},do) {" \{\n\t" "\n\} while \( FALSE \);"} bind $text { auto_brace %W break } proc auto_brace {w} { global auto_brace global sn_text_highlight_group set word $sn_text_highlight_group($w) set word ${word},[$w get "insert -1 chars wordstart" insert] if { [info exists auto_brace($word)] == 1 } { $w insert insert [lindex $auto_brace($word) 0] set index [$w index insert] $w insert insert [lindex $auto_brace($word) 1] # Crunch out any trailing elements to make it all a bit tidier set tlist [lrange $auto_brace($word) 2 end] foreach element $tlist { $w insert insert $element } $w mark set insert $index } } } From jim@weathercom.com Mon May 7 22:48:00 2001 From: jim@weathercom.com (jim@weathercom.com) Date: Mon, 07 May 2001 22:48:00 -0000 Subject: Make control Message-ID: <3AF78905.85824E97@weathercom.com> Hi, I need to do some complicated stuff for an embedded app I'm working on. I need to: compile .java files (using jikes) execute a post-processor on the resulting class files bundle everything up and FTP it to the target machine send some commands over the serial port start everything going Now I can do all this in a make file, but how do I get SN to execute it correctly? And is this explained in the documentation somewhere? Thanks, JD From mdejong@cygnus.com Mon May 7 22:57:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Mon, 07 May 2001 22:57:00 -0000 Subject: Make control References: <3AF78905.85824E97@weathercom.com> Message-ID: On Tue, 8 May 2001 jim@weathercom.com wrote: > Hi, > > I need to do some complicated stuff for an embedded app I'm working on. > I need to: > > compile .java files (using jikes) > execute a post-processor on the resulting class files > bundle everything up and FTP it to the target machine > send some commands over the serial port start everything going > > Now I can do all this in a make file, but how do I get SN to execute it > correctly? And is this explained in the documentation somewhere? > > Thanks, > JD Sure, take a look at "External build systems": http://sources.redhat.com/sourcenav/online-docs/userguide/progide.html#pgfId-998496 Be sure to select the directory where the make command will be run. Mo DeJong Red Hat Inc From umairr@ifi.uio.no Wed May 9 03:09:00 2001 From: umairr@ifi.uio.no (Umair Rasool) Date: Wed, 09 May 2001 03:09:00 -0000 Subject: How to find cross reference for local variables. Message-ID: <3AF919DB.87675C3D@ifi.uio.no> Dear Sir, My question is regarding finding references to a class. Please consider the following example public class Database{ // class body public void writeToDatabase(){ // method body } } public class AnotherClass{ Database db = new Database; public void useDb(){ db.writeToDatabsse } } In this example I want to find all the places in other classes where the class Database is used. By using the xref feature in Source Navigator I don't get any references to the class Database. In other words Source Navigator is unable to find references to class Database, because the variable (db in this example) is defined (and initilalized) in the class body of class AnotherClass. If the varialbe in defined (or initlized) in a class method then Source Navigator gives all references to this particular class. Is there any way of finding out all the classes in the source code that are using the class underconsideration in their bodies and not in their methods? Are there som preferences that I may have to set to get through this problem? Thanking you in anticipation From Dautrevaux@microprocess.com Wed May 9 05:40:00 2001 From: Dautrevaux@microprocess.com (Bernard Dautrevaux) Date: Wed, 09 May 2001 05:40:00 -0000 Subject: How to find cross reference for local variables. Message-ID: <17B78BDF120BD411B70100500422FC6309E280@IIS000> > -----Original Message----- > From: Umair Rasool [ mailto:umairr@ifi.uio.no ] > Sent: Wednesday, May 09, 2001 12:20 PM > To: sourcenav@sources.redhat.com > Subject: How to find cross reference for local variables. > > > Dear Sir, > > My question is regarding finding references to a class. > Please consider the following example > > public class Database{ > // class body > public void writeToDatabase(){ > // method body > } > } > > > public class AnotherClass{ > Database db = new Database; Which C++ compiler were you using? I didn't kown it was valid C++ to initialize class members in the class definintion; they are deemed to be initialized in the various constructors IIRC :-) This is a feature I would have loved, as it would have allowed to simply avoid *any* uininitialized member, but I'm afraid it's not standard C++ (PLEASE if I'm wrong can anybody point me on th erelevant section of the standard?) If I'm true, then there is no sense in SN understanding an invalid declaration as having a valid semantics :-) Regards, Bernard -------------------------------------------- Bernard Dautrevaux Microprocess Ingenierie 97 bis, rue de Colombes 92400 COURBEVOIE FRANCE Tel: +33 (0) 1 47 68 80 80 Fax: +33 (0) 1 47 88 97 85 e-mail: dautrevaux@microprocess.com b.dautrevaux@usa.net -------------------------------------------- From Dautrevaux@microprocess.com Wed May 9 10:07:00 2001 From: Dautrevaux@microprocess.com (Bernard Dautrevaux) Date: Wed, 09 May 2001 10:07:00 -0000 Subject: How to find cross reference for local variables. Message-ID: <17B78BDF120BD411B70100500422FC6309E282@IIS000> > -----Original Message----- > From: Umair Rasool [ mailto:umairr@ifi.uio.no ] > Sent: Wednesday, May 09, 2001 3:15 PM > To: Bernard Dautrevaux > Subject: Re: How to find cross reference for local variables. > > > Dear Dautrevaux, > > First of all I would like to thank you for your response. After this I > would apologize for not mentioning the fact that the example code was > supposed to be "Java Code". I should've think at it ;-) > I have a Java application that I am trying to > find cross-references for and there I am having the problem > that I mentioned > in my previous e-mail. In Java it is possible to initalize > class members in > the class definitions. So does this means that the designers > have overlooked > this feature of Java? Yes, I'm afraid at the time SN was designed, the languages of choice were only C and C++, and probably Java was not anticipated 8-0 You there run into the fact that Java is like C++ (at least syntactically) so a C++-oriented tool will work fine one it, but not really the same so some features of the language may not be supported :-( Hopefully it should not be too difficult to add the right rule in SN's parser, although I've never even looked at the source code yet :-) Regards, Bernard -------------------------------------------- Bernard Dautrevaux Microprocess Ingenierie 97 bis, rue de Colombes 92400 COURBEVOIE FRANCE Tel: +33 (0) 1 47 68 80 80 Fax: +33 (0) 1 47 88 97 85 e-mail: dautrevaux@microprocess.com b.dautrevaux@usa.net -------------------------------------------- From senna@camelot.com Thu May 10 06:44:00 2001 From: senna@camelot.com (Yosi Markovich) Date: Thu, 10 May 2001 06:44:00 -0000 Subject: SourceNavigator packages Message-ID: <20010510164422.A31634@Satori.camelot-it.com> Hello, I was looking through the SourceNavigator website, trying to find rpms for this package without much luck. The binaries for SourceNavigator latest version (5.0) were not even available for Linux. I would be more than grateful if you can let me know where can I get either rpms or other forms of binary package for Linux (preferably, RedHat Linux). Sincerely, -- Yosi ------- In God We Trust -- all others must submit an X.509 certificate. GPG Key Fingerprint: 9F6F 3084 FCA4 3CE7 E664 E35D 09D3 36FE 7B45 97AA From jazzman@bayarea.net Thu May 10 09:58:00 2001 From: jazzman@bayarea.net (Syd Polk) Date: Thu, 10 May 2001 09:58:00 -0000 Subject: SourceNavigator packages Message-ID: <200105101658.JAA04761@postman.bayarea.net> Yosi Markovich wrote: >Hello, > >I was looking through the SourceNavigator website, trying to find rpms for >this package without much luck. The binaries for SourceNavigator latest >version (5.0) were not even available for Linux. >I would be more than grateful if you can let me know where can I get either >rpms or other forms of binary package for Linux (preferably, RedHat Linux). > >Sincerely, >-- >Yosi The easiest thing to do is download the source and build it. There is no such thing as a univeral binary that runs on all Linux platforms. And Source-Navigator has some dependencies which make generating RPMs somewhat tricky. However, it is not that hard to build. Download the source tarball, unpack it, go into the directory and type "./configure; make all-snavigator; make install-snavigator". Syd Polk jazzman@bayarea.net http://www.bayarea.net/~jazzman "Let the music be your light." -- Dave Edwards, KUHF-FM, 1982 From mdejong@cygnus.com Thu May 10 10:55:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 10 May 2001 10:55:00 -0000 Subject: SourceNavigator packages References: <20010510164422.A31634@Satori.camelot-it.com> Message-ID: On Thu, 10 May 2001, Yosi Markovich wrote: > Hello, > > I was looking through the SourceNavigator website, trying to find rpms for > this package without much luck. The binaries for SourceNavigator latest > version (5.0) were not even available for Linux. > I would be more than grateful if you can let me know where can I get either > rpms or other forms of binary package for Linux (preferably, RedHat Linux). There is no Linux binary, you have to download the source and compile it yourself. We are planning on creating an RPM for a future release. Mo DeJong Red Hat Inc From rjoyce@riverdelta.com Thu May 10 13:35:00 2001 From: rjoyce@riverdelta.com (Rich Joyce) Date: Thu, 10 May 2001 13:35:00 -0000 Subject: DataBase Locked on SN452 on Win NT Message-ID: <7F4AC78738EAD2119D86009027626C6D016A9EBB@packetbdc.riverdelta.com> I am trying to reparse my project and message box 'Database Locked' appears. Any clues?? is the data base the .proj file??? where are other files located if not Winnt/profiles/.sn and /cygnus/..../bin/bin.proj???? Also can anyone explain the difference between refresh and reparse??? Lost my links, where can i get binary for SN 5.0 thanks all rich From mdejong@cygnus.com Thu May 10 15:54:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 10 May 2001 15:54:00 -0000 Subject: DataBase Locked on SN452 on Win NT References: <7F4AC78738EAD2119D86009027626C6D016A9EBB@packetbdc.riverdelta.com> Message-ID: On Thu, 10 May 2001, Rich Joyce wrote: > I am trying to reparse my project and message box > 'Database Locked' appears. Any clues?? There was a way to "break the lock" in an older version of SN, but it was remove during in 5.0. We had intended to move the lock out of the .proj file into a proj.lock file but ran out of time to implement that change. > is the data base the .proj file??? where are other files located > if not Winnt/profiles/.sn and /cygnus/..../bin/bin.proj???? They are in the .snprj dir in the same directory. > Also can anyone explain the difference between refresh and reparse??? I think refresh just checks file times while reparse will reparse the files no matter what. > Lost my links, where can i get binary for SN 5.0 ftp://mirrors.rcn.net/pub/sourceware/sourcenav/releases/binaries/ Mo DeJong Red Hat Inc From berek@usa.net Thu May 10 17:56:00 2001 From: berek@usa.net (Berek Half-hand) Date: Thu, 10 May 2001 17:56:00 -0000 Subject: DataBase Locked on SN452 on Win NT References: Message-ID: Ok...so how do you "break the lock" in SN 4.5.2? -----Original Message----- From: sourcenav-owner@sources.redhat.com [ mailto:sourcenav-owner@sources.redhat.com]On Behalf Of Mo DeJong Sent: Thursday, May 10, 2001 6:55 PM To: sourcenav@sources.redhat.com Subject: Re: DataBase Locked on SN452 on Win NT On Thu, 10 May 2001, Rich Joyce wrote: > I am trying to reparse my project and message box > 'Database Locked' appears. Any clues?? There was a way to "break the lock" in an older version of SN, but it was remove during in 5.0. We had intended to move the lock out of the ..proj file into a proj.lock file but ran out of time to implement that change. > is the data base the .proj file??? where are other files located > if not Winnt/profiles/.sn and /cygnus/..../bin/bin.proj???? They are in the .snprj dir in the same directory. > Also can anyone explain the difference between refresh and reparse??? I think refresh just checks file times while reparse will reparse the files no matter what. > Lost my links, where can i get binary for SN 5.0 ftp://mirrors.rcn.net/pub/sourceware/sourcenav/releases/binaries/ Mo DeJong Red Hat Inc From mdejong@cygnus.com Thu May 10 18:05:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 10 May 2001 18:05:00 -0000 Subject: DataBase Locked on SN452 on Win NT References: Message-ID: On Thu, 10 May 2001, Berek Half-hand wrote: > Ok...so how do you "break the lock" in SN 4.5.2? When the project came up, it would ask you if you wanted to break the lock. Thing is, this could easily open the same project in two different SN executables which would destroy the database. You can't really do that now, but that does not really help you since you are stuck with a locked project. If you are interested in hacking the source a bit, you could fix this. Otherwise, adding a bug report to the bug DB is the way to go. Mo From punt@kerrskorner.org Sat May 12 12:49:00 2001 From: punt@kerrskorner.org (punt) Date: Sat, 12 May 2001 12:49:00 -0000 Subject: Building libraries Message-ID: <0105121554460H.01467@dev1> As anyone gotten 5.0 to successfully build a library? I noticed the link option between library and executable is grayed, but still selectable. When I select library, and do a build, it bombs at the link process (it is not asking gcc or the librarian to create the lib file). Anyone else have this ? Charles From punt@kerrskorner.org Sun May 13 06:43:00 2001 From: punt@kerrskorner.org (punt) Date: Sun, 13 May 2001 06:43:00 -0000 Subject: Relative path names Message-ID: <0105130949040N.01467@dev1> I noticed to specifiy include paths, libraries, etc, Source Nagivator automot expands it to an abosulte path name. Anyway to make it save them as relative to the project directory, so one can effectively share project files between people? Charles From irox@redhat.com Mon May 14 09:44:00 2001 From: irox@redhat.com (Ian Roxborough) Date: Mon, 14 May 2001 09:44:00 -0000 Subject: Building libraries References: <0105121554460H.01467@dev1> Message-ID: <3B000B40.B87CD781@redhat.com> punt wrote: > > As anyone gotten 5.0 to successfully build a library? I noticed the link > option between library and executable is grayed, but still selectable. When I > select library, and do a build, it bombs at the link process (it is not > asking gcc or the librarian to create the lib file). The library building bits need to be revisited. I'm not sure what problem you are having, but it may be related to flag order problems with the linker flags. When I wrote the backend build system I didn't pay attention to flag ordering and it seems "ar" needs flags in a certain order. This probably won't get fixed until a build engine rewrite. Ian. From punt@kerrskorner.org Mon May 14 15:49:00 2001 From: punt@kerrskorner.org (punt) Date: Mon, 14 May 2001 15:49:00 -0000 Subject: Building libraries References: <0105121554460H.01467@dev1> <3B000B40.B87CD781@redhat.com> Message-ID: <01051418550400.05494@dev1> Well, I am not sure that is the issue. It looks as if ar is never called, but the linker is: gcc -r ../bin/libdatastore.a diskmulstor.o mapdatadisk.o gcc: ../bin/libdatastore.a: No such file or directory Note that ../bin/libdatastore.a is the library I am attempting to build. Even though I selected library in the link options, it is as if it was not accepted (As I stated before, the selection was "grayed", but one could select and change it). This wasn't a problem on 4.52. On Monday 14 May 2001 11:43, Ian Roxborough wrote: > punt wrote: > > As anyone gotten 5.0 to successfully build a library? I noticed the link > > option between library and executable is grayed, but still selectable. > > When I select library, and do a build, it bombs at the link process (it > > is not asking gcc or the librarian to create the lib file). > > The library building bits need to be revisited. I'm not sure > what problem you are having, but it may be related to flag order > problems with the linker flags. > > When I wrote the backend build system I didn't pay attention > to flag ordering and it seems "ar" needs flags in a certain > order. This probably won't get fixed until a build engine > rewrite. > > Ian. From Dautrevaux@microprocess.com Tue May 15 01:03:00 2001 From: Dautrevaux@microprocess.com (Bernard Dautrevaux) Date: Tue, 15 May 2001 01:03:00 -0000 Subject: Building libraries Message-ID: <17B78BDF120BD411B70100500422FC6309E28F@IIS000> > -----Original Message----- > From: punt [ mailto:punt@kerrskorner.org ] > Sent: Tuesday, May 15, 2001 1:55 AM > To: Ian Roxborough; punt > Cc: sourcenav@sourceware.cygnus.com > Subject: Re: Building libraries > > > Well, I am not sure that is the issue. It looks as if ar is > never called, > but the linker is: > > > gcc -r ../bin/libdatastore.a diskmulstor.o mapdatadisk.o > gcc: ../bin/libdatastore.a: No such file or directory > Looks like SN thinks the archiver is named gcc... Or is it your settings? Just my .02 euro Bernard -------------------------------------------- Bernard Dautrevaux Microprocess Ingenierie 97 bis, rue de Colombes 92400 COURBEVOIE FRANCE Tel: +33 (0) 1 47 68 80 80 Fax: +33 (0) 1 47 88 97 85 e-mail: dautrevaux@microprocess.com b.dautrevaux@usa.net -------------------------------------------- From erayo@cs.bilkent.edu.tr Tue May 15 04:01:00 2001 From: erayo@cs.bilkent.edu.tr (Eray Ozkural (exa)) Date: Tue, 15 May 2001 04:01:00 -0000 Subject: SourceNavigator packages References: <20010510164422.A31634@Satori.camelot-it.com> Message-ID: <3B010BA9.4B013895@cs.bilkent.edu.tr> Yosi Markovich wrote: > > Hello, > > I was looking through the SourceNavigator website, trying to find rpms for > this package without much luck. The binaries for SourceNavigator latest > version (5.0) were not even available for Linux. > I would be more than grateful if you can let me know where can I get either > rpms or other forms of binary package for Linux (preferably, RedHat Linux). You can still use the debian packages I've made. Go to www.debian.org and have a look, just extract the package and copy the tree to your system. You just need the dpkg binary. Check the deps and install rpms for those (but it shouldn't have many except standard stuff) Or can alien target rpms? ;) If you're interested you may convert the package to rpm. Many people have been asking for rpms. Thanks, -- Eray Ozkural (exa) Comp. Sci. Dept., Bilkent University, Ankara e-mail: erayo@cs.bilkent.edu.tr www: http://www.cs.bilkent.edu.tr/~erayo From khamis2@t-online.de Tue May 15 05:12:00 2001 From: khamis2@t-online.de (Khamis Abuelkomboz UUNET) Date: Tue, 15 May 2001 05:12:00 -0000 Subject: bugfix for unloading problem Message-ID: <3B011E64.60909@knuut.de> The following patch fixes the problem, where sometimes some files can't be unloaded. It seems that there is a bug in the database itself. This bugfix is some workaround of this problem. The complete file can be downloaded from http://khamis.do-is.com/sn/dbsym.c A already compiled hyper.exe can be downloaded from http://khamis.do-is.com/sn/sn50/hyper.exe khamis --- /d/Packages/sn/SN451/snavigator/hyper/dbsym.c Fri Feb 11 22:50:36 2000 +++ dbsym.c Mon Apr 30 12:01:06 2001 @@ -945,6 +945,15 @@ argc--; } #endif + /* + * end of the script options + */ + else if (strcmp (argv[2], "--") == 0) + { + argv++; + argc--; + break; + } else { Tcl_AppendResult(interp, argv[0]," ", argv[1], @@ -2033,9 +2042,28 @@ LOGGER((LOGFP,"%ld records have been scanned from %ld\n", scan_counter,rec_counter)); } + else if (dbp->type == DB_BTREE) + { + ret = dbp->del(dbp,&key,0); + if (ret == 0) + counter ++; + else for (flag = R_FIRST; + dbp->seq(dbp,&key,&data,flag) == 0; + flag = R_NEXT + ) + { + if (memcmp(key.data, key_pattern, key_pattern_size) == 0) + { + ret = dbp->del(dbp,&key,R_CURSOR); + if (ret == 0) + counter++; + break; + } + } + } else { - ret = dbp->del(dbp,&key,flag); + ret = dbp->del(dbp,&key,0); if (ret == 0) counter++; } @@ -2048,7 +2076,7 @@ return -1; } - LOGGER((LOGFP,"%ld records have been deleted\n",counter)); + LOGGER((LOGFP,"%ld records have been deleted, db-type=%s\n",counter, (dbp->type == DB_BTREE ? "btree" : "hash"))); return counter; } From Michal.Buczko@domdata.depfa-it.com Wed May 16 00:11:00 2001 From: Michal.Buczko@domdata.depfa-it.com (Buczko, Michal) Date: Wed, 16 May 2001 00:11:00 -0000 Subject: Building libraries Message-ID: <164EA92EE2DDD4119DA40050DA83578D2BBE81@mailserver3.domdata.depfa-it.com> Hi, I had a simmilar problem with building a library using sn and after changing linker from 'gcc' to 'ar' is seems to work perfectly but i think there is another bug. building executable file gcc was unable to generete output because all libraries i want to include are added to command line like this: gcc -o ble ble1.o ble2.o /usr/lib/libncurses.a /usr/lib/libgcontrol.a this causes lots of conflicts (no matter what is the order of these libraries), but after replacing /usr/lib/libncurses.a with -lncurses and /usr/lib/libgcontrol.a with -lgcontrol everything goes ok. that`s way i wrote a simple patch that renames all included libraries from /usr/lib/lib*.a to -l*. it isn`t too flexible but it should work. file: gui/buildtarget.tcl method GetLibraryFiles {} { regsub -all -nocase {(/usr/lib/lib)([^\.]+)(\.a)} ${LibFiles} {-l\2} LibFiles <---- added line return ${LibFiles} } Best regards, Michal Buczko =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= DomData sp. z.o.o E-mail: Michal.Buczko@domdata.depfa-it.com =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > -----Original Message----- > From: Bernard Dautrevaux [ mailto:Dautrevaux@microprocess.com ] > Sent: Tuesday, May 15, 2001 9:41 AM > To: 'punt'; Ian Roxborough > Cc: sourcenav@sourceware.cygnus.com > Subject: RE: Building libraries > > > > -----Original Message----- > > From: punt [ mailto:punt@kerrskorner.org ] > > Sent: Tuesday, May 15, 2001 1:55 AM > > To: Ian Roxborough; punt > > Cc: sourcenav@sourceware.cygnus.com > > Subject: Re: Building libraries > > > > > > Well, I am not sure that is the issue. It looks as if ar is > > never called, > > but the linker is: > > > > > > gcc -r ../bin/libdatastore.a diskmulstor.o mapdatadisk.o > > gcc: ../bin/libdatastore.a: No such file or directory > > > > Looks like SN thinks the archiver is named gcc... Or is it > your settings? > > Just my .02 euro > > Bernard > > -------------------------------------------- > Bernard Dautrevaux > Microprocess Ingenierie > 97 bis, rue de Colombes > 92400 COURBEVOIE > FRANCE > Tel: +33 (0) 1 47 68 80 80 > Fax: +33 (0) 1 47 88 97 85 > e-mail: dautrevaux@microprocess.com > b.dautrevaux@usa.net > -------------------------------------------- > From rainer.kiehne@tu-clausthal.de Wed May 16 01:44:00 2001 From: rainer.kiehne@tu-clausthal.de (Rainer Kiehne) Date: Wed, 16 May 2001 01:44:00 -0000 Subject: Scrolling in CVS-History Message-ID: <01051610470100.02085@garfield.heim7.tu-clausthal.de> Hi all, I don't know if I found a bug or a missing feature, but there is no scrollbar in the Revision Control Editor -> History Windows. Chosing a special entry only works sometimes, i.e As long as the file is still highlighted in yellow in the Project files window I can choose a special log enty. If there is an other file underlined black in the Project files window any input to the History window is ignored. Althoug the drop down menu is still usable but with no effect. How can I get access to early log entries (except from using console, or chosing them one by one)? TIA Rainer PS: Thanks for that great program - I saved a lot of time using it. -- Rainer Kiehne Leibnizstrasse 22/Zi.96 38678 Clausthal-Zellerfeld rainer.kiehne@tu-clausthal.de From scherrey@innoverse.com Wed May 16 19:09:00 2001 From: scherrey@innoverse.com (Benjamin Scherrey) Date: Wed, 16 May 2001 19:09:00 -0000 Subject: Getting SN5 running over a 452 install. Message-ID: <01051622034003.22887@incognito.switchco.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm having a heckuva time getting SN5 running on my linux machine (RedHat 6.2 w 2.4x kernel upgraded). I've got 452 installed (built from source) and it has no problem running. I d/l'd 5 and built/installed it but when I try to run it I get a 'Error: invalid command name "sn_tcl_tk_init"' message at the command prompt. I'm guessing that this is some kind of tcl conflict but I really know nothing about Tk/Tcl so I don't know how to address this. Unfortunately there doesn't seem to be a "make uninstall" available for either version (which is really bad! please fix this!) so I just have to install 452 back over. How do I get rid of SN and install from scratch? Will this fix my 5 issue? thanx & later, Ben Scherrey -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.8 iQA/AwUBOwMxf2j9nzX41wUgEQIVqACfXu/EXlVsvETQnZ67sTY5My1MFa4An2CO kk+NJKU30CeRJ3d1dnnS6sFl =xuf0 -----END PGP SIGNATURE----- From mdejong@cygnus.com Thu May 17 13:17:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 17 May 2001 13:17:00 -0000 Subject: Getting SN5 running over a 452 install. References: <01051622034003.22887@incognito.switchco.com> Message-ID: On Wed, 16 May 2001, Benjamin Scherrey wrote: > I d/l'd 5 and built/installed it but when I try to > run it I get a 'Error: invalid command name "sn_tcl_tk_init"' message at the > command prompt. Did you build as root and then try to run it as a normal user? Do you get the same error if you build/install/run as a normal user? Mo From scherrey@innoverse.com Thu May 17 15:06:00 2001 From: scherrey@innoverse.com (Benjamin Scherrey) Date: Thu, 17 May 2001 15:06:00 -0000 Subject: Getting SN5 running over a 452 install. References: Message-ID: <01051717584000.30629@incognito.switchco.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 17 May 2001 04:17 pm, Mo DeJong wrote: > On Wed, 16 May 2001, Benjamin Scherrey wrote: > > I d/l'd 5 and built/installed it but when I try to > > run it I get a 'Error: invalid command name "sn_tcl_tk_init"' message at > > the command prompt. > > Did you build as root and then try to run it as a normal user? Yes - the behavior I described was under that scenerio. When I try to run as root I get a different error: 'Error: invalid command name "Preferences&::load_default_settings"'. > Do you get the same error if you build/install/run as a normal > user? I haven't tried this although that won't be adequate for my final solution as I need all users to be able to run SN. I'll setup to try this now to help debug and if I get a different result I'll report back here. thanx & later, Ben Scherrey -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.8 iQA/AwUBOwRJk2j9nzX41wUgEQIcTwCfb+f4dArNgj8CywKurUip/azmYMoAnjLN EzrkZ/MIqik8qN/qVTAKUohi =FZTv -----END PGP SIGNATURE----- From netalex@tiscalinet.it Sat May 19 08:04:00 2001 From: netalex@tiscalinet.it (Netalex) Date: Sat, 19 May 2001 08:04:00 -0000 Subject: I: DANGER: possible virus infection - ATTENZIONE: possibile infezione virus Message-ID: <00ac01c0e074$5cdd2980$2a2cfea9@netalex> ----- Original Message ----- From: Netalex To: Simone Colivicchi Sent: Saturday, May 19, 2001 4:47 PM Subject: DANGER: possible virus infection - ATTENZIONE: possibile infezione virus > [english version above] > Purtroppo il mio sistema ???? stato infettato dal virus Win32.Magistr.A, alias > di I-Worm.Magistr.A . Stando alle descrizioni sui siti dei programmi > antivirus, ???? un virus particolarmente cattivo che fra le altre cose pu???? > cancellare il flash bios. > Il suo sistema di diffusione consiste nel prendere la rubrica di posta e per > ciascun indirizzo scrivere 1 (e uno solo) messaggio composto da una sequenza > casuale di caratteri presi da un file .doc o .txt a caso nell'HD, e un > eseguibile a caso fra quelli infettati dal virus come allegato. > Quindi, se in questi giorni vi ???? arrivata a mio nome una mail con queste > caratteristiche (oggetto e corpo privi di senso o cmq frammento di un testo > + ampio, e un eseguibile allegato), NON APRITE l'eseguibile (.exe) ma > cancellate la mail subito. > Se avete per errore lanciato l'eseguibile, potete trovare sul sito > www.centralcommand.com un tool secifico e gratutito per la rimozione di > I-Worm.Magistr.A. > Vi ringrazio dell'attenzione e mi scuso per qualunque inconveniente possa > aver creato. > Netalex > > Unfortunately my system is infected b the virus Win32.Magistr.A, > I-Worm.Magistr.A "alias". Referring to his descriptions on the antivirus > program's sites, it is a particularly bad virus that between the other > belongingses can > cancel the flash bios. > His diffusion system consists of taking the mail address book and for > every addresses write 1 (and only) message created from a random sequence of > characters took from a .doc line or .txt at random in the HD, and a > executable randomly chosed between those infected from the virus as a > enclosure. > Therefore, if in these days you've got a mail from me or from oe f the > address in the to: field of thi s message with these > characteristics (object and deprived body of sense or fragment of a longer > text, and an executable enclosure), don't OPEN the executable (.exe) but > cancel the [mail] immediately. > If you have launched the executable for error, you could find on the site > [www.centralcommand.com] a free specific tool for the removal of > I-Worm.Magistr.A. > There I thank for the attention and I apologize for any drawback I can > have created. > Netalex > > > > > > > > > > > > > From kaa@comail.ru Sat May 19 18:47:00 2001 From: kaa@comail.ru (Artem Khodush) Date: Sat, 19 May 2001 18:47:00 -0000 Subject: Getting SN5 running over a 452 install. References: <01051717584000.30629@incognito.switchco.com> Message-ID: <005d01c0e0cf$78f220c0$3737370a@artem> Benjamin Scherrey wrote: > > Yes - the behavior I described was under that scenerio. When I try to run as > root I get a different error: 'Error: invalid command name > "Preferences&::load_default_settings"'. > I was hit by this, too. Somehow the tclIndex file in the share/sourcenav/gui directory is not built completely - the script that builds it during install time fails with the error message: application-specific initialization failed: invalid command name "tcl_findLibrary". After I rerun that command by hand, everything works. The script is: here=\`pwd\` && TCL_LIBRARY=%{source_dir}/tcl8.1/library && export TCL_LIBRARY && \\ PATH="\$PATH":%{build_dir}/tcl8.1/unix && export PATH && \\ cd %{prefix}/usr/local/share/sourcenav/gui && \\ rm -f tclIndex && \\ echo "auto_mkindex %{prefix}/usr/local/share/sourcenav/gui" > mkindex.tcl && \\ %{build_dir}/itcl/itcl/unix/itclsh mkindex.tcl && \\ rm -f mkindex.tcl && \\ chmod 644 tclIndex To verify that /usr/local/share/sourcenav/gui/tclIndex is built properly, see if it lists Preferences::load_default_settings among other things. Or you may just grab that file from the binary and drop it onto your installation. From mdejong@cygnus.com Sun May 20 14:33:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Sun, 20 May 2001 14:33:00 -0000 Subject: Scrolling in CVS-History References: <01051610470100.02085@garfield.heim7.tu-clausthal.de> Message-ID: On Wed, 16 May 2001, Rainer Kiehne wrote: > Hi all, > > I don't know if I found a bug or a missing feature, but there is no scrollbar > in the Revision Control Editor -> History Windows. Humm, that does seem odd. You can click and drag up or down in the tags window or the log window, but they really should have scroll bars. Could you file a bug report for this problem using the new bug DB? After doing that, you might want to take a shot at fixing the problems, the code is in gui/rcs.tcl. Mo DeJong Red Hat Inc From kclyu@novatechnology.co.kr Mon May 21 04:47:00 2001 From: kclyu@novatechnology.co.kr (???) Date: Mon, 21 May 2001 04:47:00 -0000 Subject: Want to build Source Navigator 5.0 in windows platform Message-ID: <004201c0e1eb$c37bab80$b10301c1@novatechnology.co.kr> This is a mail-robot? I want to build SN 5.0 in windows ME... SN 4.5.2 binary distribution give me a too many confusion to me compare to 5.0 Thanks. KeunChang Lyu. From Eckhard.Froebel@t-online.de Wed May 23 04:19:00 2001 From: Eckhard.Froebel@t-online.de (Eckhard Fröbel) Date: Wed, 23 May 2001 04:19:00 -0000 Subject: printout Message-ID: <3B0B9C49.9F6D0F7F@T-Online.de> Dear Sirs, The printouts out of my source navigator 4.5.1 are very very small. Can you help? (Windows ME, HP Deskjet 880C, Stand alone system, no network) Best regards Eckhard From hugov@tr.comm.mot.com Thu May 24 08:13:00 2001 From: hugov@tr.comm.mot.com (Hugo Varotto) Date: Thu, 24 May 2001 08:13:00 -0000 Subject: Printing XREF from SN 5.0 References: <3B0B9C49.9F6D0F7F@T-Online.de> Message-ID: <3B0D2531.1DFAD35@tr.comm.mot.com> Hello, I downloaded the binary version of Sn 5.0 for sun-sparc, and I'm having problem printing from inside SN. Specifically, every time that I select the print option ( either from iside the editor, xref, etc ), a big dialog window pops up that says: Bad option "on_close" should be one of ..." and it gives a very long list of window names, properties, etc. I cannot even get to the print option dialog. Strangely, this works great if I use 4.52 So, I'm puzzled by this, and I was planning on getting the source code and take a chance on it, but before I was wondering if somebody else is having the same problem and how did you solve. If that's not the case, could somebody point to the possible reason of this happening. Lastly ( and I believe I need the input from a SN developer ), which function/module should I look at to figure out what's going on ? I'm not the same one having this problem, 3 other co-workers are having the same problem. I also downloaded the snapshot from April and I'm still having the same problem. However, I'm able to print source-code, just not XREFs. I tried to compare the files between 4.52 and 5.0 but they're completely different. I'm running Source Navigator on a Sun Sparc Ultra 10 under Solaris 2.6 Finally, thanks to all the Source Navigator developers, this is an incredible tool ! Hugo PS: I'm attaching the trace of the bug in case somebody knows what the problem might be ( I'm not an expert in TCL ). bad option "on_close": should be one of... .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog CalcPostScriptPages factor .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog CheckTakeFocus window .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog PopModalStack .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog PrintPostScriptPages .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog PushModalStack window .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog TopModalStack .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog __grid ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog activate .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog aspect ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog bind_tk ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog centerOnScreen .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog cget option .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog client ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog colormapwindows ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog command ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog component ?name? ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog config ?option? ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog config_tk ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog configure ?option? ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog deactivate ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog deiconify .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog focus_tk ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog focusmodel ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog frame_tk .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog geometry ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog grab ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog group ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog iconify .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog iconposition ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog icontwindow ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog isa className .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog itk_component option ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog itk_initialize ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog itk_option option ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog maxsize ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog minsize ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog move_to_mouse ?swap? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog overrideredirect ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog pageformat fmt .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog positionfrom ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog postscript_parameters .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog printit .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog protocol ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog raise ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog resizable ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog sizefrom ?arg arg ...? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog state .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog take_focus ?wdg? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog title ?argl? ?umlaut_map? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog transient ?window? .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog window_name .multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog withdraw while executing "${this} on_close "$itk_component(hull).actionframe.button_0 invoke"" while constructing object "::.multiwindow-1.nbook.nbframe.xref.paned.xref.xref.print_dialog" in ::PrintDialog::constructor (body line 17) invoked from within "PrintDialog $this.print_dialog -canvas ${can} -leader ${topw} -modality application -file [file join $sn_options(profile_dir) xref.ps" (object "::.multiwindow-1.nbook.nbframe.xref.paned.xref.xref" method "::XRef&::print" body line 10) invoked from within "${ActiveWidget} print" (object "::.multiwindow-1" method "::MultiWindow&::file_print" body line 2) invoked from within "::.multiwindow-1 file_print" (in namespace inscope "::MultiWindow&" script line 1) invoked from within "namespace inscope ::MultiWindow& {::.multiwindow-1 file_print}" invoked from within ".multiwindow-1.#multiwindow-1#menu.#multiwindow-1#menu#file invoke active" ("uplevel" body line 1) invoked from within "uplevel #0 [list $w invoke active]" (procedure "tkMenuInvoke" line 29) invoked from within "tkMenuInvoke .multiwindow-1.#multiwindow-1#menu.#multiwindow-1#menu#file 1 " (command bound to event) From jim@weathercom.com Thu May 24 08:45:00 2001 From: jim@weathercom.com (jim) Date: Thu, 24 May 2001 08:45:00 -0000 Subject: Include Preferences Tab Message-ID: <3B0D2BE8.2010309@weathercom.com> How do I go about adding directories to the include preferences tab? I can't start a new line in the directory list box. When I hit the enter key, the whole preferences window closes. Also, how do I make SN open up an include file when I double click on it in the Include Browser? At this point, all it does is pop up a window that says file doesn't exist when it most certainly does? Jim From mdejong@cygnus.com Thu May 24 12:15:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 24 May 2001 12:15:00 -0000 Subject: Printing XREF from SN 5.0 References: <3B0D2531.1DFAD35@tr.comm.mot.com> Message-ID: On Thu, 24 May 2001, Hugo Varotto wrote: > Hello, Hi. > I downloaded the binary version of Sn 5.0 for sun-sparc, and I'm having problem > printing from inside SN. Specifically, every time that I select the print option > ( either from iside the editor, xref, etc ), a big dialog window pops up that > says: > > Bad option "on_close" should be one of ..." That is PR 38, it slipped by in the 5.0 release. http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=38&database=sourcenav&return_url=http%3A%2F%2Fsources.redhat.com%2Fcgi-bin%2Fgnatsweb.pl%3Fdatabase%3Dsourcenav%3Bcmd%3Dsubmit%2520query%3Bcategory%3Dall%3Bseverity%3Dall%3Bpriority%3Dall%3Bresponsible%3Dall%3Bstate%3Dall%3Bclass%3Dall%3Bsynopsis%3D%3Bmultitext%3D%3Bcolumns%3Dcategory%3Bcolumns%3Dconfidential%3Bcolumns%3Dstate%3Bcolumns%3Dclass%3Bcolumns%3Dseverity%3Bcolumns%3Dresponsible%3Bcolumns%3Dsubmitter_id%3Bcolumns%3Dsynopsis%3Bsortby%3DSubmitter-Id%3B.cgifields%3Dcolumns%3B.cgifields%3Doriginatedbyme%3B.cgifields%3Dignoreclosed > So, I'm puzzled by this, and I was planning on getting the source code and take > a chance on it, but before I was wondering if somebody else is having the same > problem and how did you solve. If that's not the case, could somebody point to > the possible reason of this happening. Lastly ( and I believe I need the input > from a SN developer ), which function/module should I look at to figure out > what's going on ? There is a patch for the problem in the PR report. Mo DeJong Red Hat Inc From mdejong@cygnus.com Thu May 24 12:37:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 24 May 2001 12:37:00 -0000 Subject: Printing XREF from SN 5.0 References: Message-ID: On Thu, 24 May 2001, Mo DeJong wrote: > On Thu, 24 May 2001, Hugo Varotto wrote: > > > Hello, > > Hi. > > > I downloaded the binary version of Sn 5.0 for sun-sparc, and I'm having problem > > printing from inside SN. Specifically, every time that I select the print option > > ( either from iside the editor, xref, etc ), a big dialog window pops up that > > says: > > > > Bad option "on_close" should be one of ..." > > That is PR 38, it slipped by in the 5.0 release. > > http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=38&database=sourcenav&return_url=http%3A%2F%2Fsources.redhat.com%2Fcgi-bin%2Fgnatsweb.pl%3Fdatabase%3Dsourcenav%3Bcmd%3Dsubmit%2520query%3Bcategory%3Dall%3Bseverity%3Dall%3Bpriority%3Dall%3Bresponsible%3Dall%3Bstate%3Dall%3Bclass%3Dall%3Bsynopsis%3D%3Bmultitext%3D%3Bcolumns%3Dcategory%3Bcolumns%3Dconfidential%3Bcolumns%3Dstate%3Bcolumns%3Dclass%3Bcolumns%3Dseverity%3Bcolumns%3Dresponsible%3Bcolumns%3Dsubmitter_id%3Bcolumns%3Dsynopsis%3Bsortby%3DSubmitter-Id%3B.cgifields%3Dcolumns%3B.cgifields%3Doriginatedbyme%3B.cgifields%3Dignoreclosed Woops, sorry about that huge URL. This one is a bit smaller. http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=38&database=sourcenav Mo From madana1@eos.medtronic.COM Thu May 24 13:19:00 2001 From: madana1@eos.medtronic.COM (Andrey Madan) Date: Thu, 24 May 2001 13:19:00 -0000 Subject: Please help Message-ID: Hi, My name is Andrey Madan. I am working for Medtronic Inc. I am trying to evaluate yourproduct in order to determine if it fits the needs of my team (about 20 developers). We are working on a big project and we need reliable program to visualize our source. Hence, we need something like Source-Navigator. It runs great , but I could not parse correctly those kind of symbols asm{ bcc ilong2:0 ; " i div ; " } The parser actually thinks that I am using " and ' as some sort of comments, and does not create xref information for that part of code. Any help will be greatly appreciated, Thank you, Andrey Madan From hugov@tr.comm.mot.com Thu May 24 13:40:00 2001 From: hugov@tr.comm.mot.com (Hugo Varotto) Date: Thu, 24 May 2001 13:40:00 -0000 Subject: Printing XREF from SN 5.0 References: Message-ID: <3B0D71B3.A7ED7A7C@tr.comm.mot.com> Thanks for your very fast answer. This definitely solves the problem. Are there any plans on putting it in a new release or snapshot ? I see that the snapshot is from sometime in april, and the fix was created in May 14. I assume that maybe all UNIX users are having this same problem ? Thanks again ! Hugo Mo DeJong wrote: > > On Thu, 24 May 2001, Mo DeJong wrote: > > > On Thu, 24 May 2001, Hugo Varotto wrote: > > > > > Hello, > > > > Hi. > > > > > I downloaded the binary version of Sn 5.0 for sun-sparc, and I'm having problem > > > printing from inside SN. Specifically, every time that I select the print option > > > ( either from iside the editor, xref, etc ), a big dialog window pops up that > > > says: > > > > > > Bad option "on_close" should be one of ..." > > > > That is PR 38, it slipped by in the 5.0 release. > > > > http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=38&database=sourcenav&return_url=http%3A%2F%2Fsources.redhat.com%2Fcgi-bin%2Fgnatsweb.pl%3Fdatabase%3Dsourcenav%3Bcmd%3Dsubmit%2520query%3Bcategory%3Dall%3Bseverity%3Dall%3Bpriority%3Dall%3Bresponsible%3Dall%3Bstate%3Dall%3Bclass%3Dall%3Bsynopsis%3D%3Bmultitext%3D%3Bcolumns%3Dcategory%3Bcolumns%3Dconfidential%3Bcolumns%3Dstate%3Bcolumns%3Dclass%3Bcolumns%3Dseverity%3Bcolumns%3Dresponsible%3Bcolumns%3Dsubmitter_id%3Bcolumns%3Dsynopsis%3Bsortby%3DSubmitter-Id%3B.cgifields%3Dcolumns%3B.cgifields%3Doriginatedbyme%3B.cgifields%3Dignoreclosed > > Woops, sorry about that huge URL. This one is a bit smaller. > > http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=38&database=sourcenav > > Mo From mdejong@cygnus.com Thu May 24 13:49:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 24 May 2001 13:49:00 -0000 Subject: Printing XREF from SN 5.0 References: <3B0D71B3.A7ED7A7C@tr.comm.mot.com> Message-ID: On Thu, 24 May 2001, Hugo Varotto wrote: > Thanks for your very fast answer. This definitely solves the problem. > > Are there any plans on putting it in a new release or snapshot ? Well yes, but we are kind of busy with the Tcl/Tk 8.3 and Itcl 3.2 upgrade right now. > I see that the snapshot is from sometime in april, and the > fix was created in May 14. I assume > that maybe all UNIX users are having this same problem ? Yup. Hey, if you are interested in helping speed up the release process, we could really use some help writing up some README files. What we really need to do is create a good snavigator/README file and then create a source -> tar file script that will copy the correct README files into the toplevel directory of the release .tar file. Mo From mdejong@cygnus.com Thu May 24 13:57:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 24 May 2001 13:57:00 -0000 Subject: Please help References: Message-ID: On Thu, 24 May 2001, Andrey Madan wrote: > Hi, > > My name is Andrey Madan. I am working for Medtronic Inc. > I am trying to evaluate yourproduct in order to determine if it fits the needs of my team (about 20 developers). > We are working on a big project and we need reliable program to visualize our source. > Hence, we need something like Source-Navigator. > It runs great , but I could not parse correctly those kind of symbols > asm{ > bcc ilong2:0 ; " > i div ; " > } Is this inline asm code inside a .c file? I don't think our ASM parsers support that sort of usage. It would be an interesting project to add .c -> .asm parsing but it would require more than a little custom hacking. Mo DeJong Red Hat Inc From cmmcinn@super.org Fri May 25 11:08:00 2001 From: cmmcinn@super.org (Celia McInnis) Date: Fri, 25 May 2001 11:08:00 -0000 Subject: Adding a menu to build window References: Message-ID: <3B0E9F7A.5FEDED58@super.org> Is it possible to add a new menu to the make/build window in SN 5.0 (without changing the SN source code)? If so, can a couple of pointers be given? Thanks, Celia McInnis From mcinnisc@omnisig.com Fri May 25 21:39:00 2001 From: mcinnisc@omnisig.com (Celia McInnis) Date: Fri, 25 May 2001 21:39:00 -0000 Subject: Adding a menu to build window References: <3B0E9F7A.5FEDED58@super.org> Message-ID: <3B0FDF96.F737482@omnisig.com> I figured out how to do this late this afternoon (from the source code). If anyone wants to know how, just ask. Thanks. Celia McInnis wrote: > Is it possible to add a new menu to the make/build window in SN 5.0 (without changing the SN source code)? If so, can > a couple of pointers be given? > > Thanks, > Celia McInnis From seiferth@yahoo.com Tue May 29 09:58:00 2001 From: seiferth@yahoo.com (Justin Seiferth) Date: Tue, 29 May 2001 09:58:00 -0000 Subject: RCS Revision Control causes core dump? Message-ID: <20010529165802.6336.qmail@web13501.mail.yahoo.com> I have SN 5.0 installed on my RH 7.1 box and am trying to use Revision Control. I have rcs specified in the project preferences. The system checks in the code with/without a lock and the system correctly describes previously checked in files however when I attempt to use SN to checkout the file with or without a lock it crashes SN. Is this a know problem and / or one with a workaround or patch? RCS is installed on my system and I did the test with and without a RCS subdirectory. In addition, the system doesn't seem to recognize files which are checked in- it asks if they should be deleted from the project file list. I didn't see any similar bugs or TRs in a search through the archives. Thanks, Justin Seiferth@yahoo.com ===== My web page is at: http://www.seiferth-ryan.com __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ From seiferth@yahoo.com Tue May 29 09:58:00 2001 From: seiferth@yahoo.com (Justin Seiferth) Date: Tue, 29 May 2001 09:58:00 -0000 Subject: RCS Revision Control causes core dump? Message-ID: <20010529165805.20398.qmail@web13507.mail.yahoo.com> I have SN 5.0 installed on my RH 7.1 box and am trying to use Revision Control. I have rcs specified in the project preferences. The system checks in the code with/without a lock and the system correctly describes previously checked in files however when I attempt to use SN to checkout the file with or without a lock it crashes SN. Is this a know problem and / or one with a workaround or patch? RCS is installed on my system and I did the test with and without a RCS subdirectory. In addition, the system doesn't seem to recognize files which are checked in- it asks if they should be deleted from the project file list. I didn't see any similar bugs or TRs in a search through the archives. Thanks, Justin Seiferth@yahoo.com ===== My web page is at: http://www.seiferth-ryan.com __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ From hugov@tr.comm.mot.com Tue May 29 15:19:00 2001 From: hugov@tr.comm.mot.com (Hugo Varotto) Date: Tue, 29 May 2001 15:19:00 -0000 Subject: Printing XREF from SN 5.0 References: Message-ID: <3B14207A.190F9B82@tr.comm.mot.com> Hi Mo, could you please expand a little bit what you need with respect to the README files ? I'm not an expert writing documentation neiter an expert in Source Navigator, but I'll try to help as much as I can. Hugo Mo DeJong wrote: > > On Thu, 24 May 2001, Hugo Varotto wrote: > > > Thanks for your very fast answer. This definitely solves the problem. > > > > Are there any plans on putting it in a new release or snapshot ? > > Well yes, but we are kind of busy with the Tcl/Tk 8.3 and > Itcl 3.2 upgrade right now. > > > I see that the snapshot is from sometime in april, and the > > fix was created in May 14. I assume > > that maybe all UNIX users are having this same problem ? > > Yup. > > Hey, if you are interested in helping speed up the > release process, we could really use some help writing up > some README files. What we really need to do is > create a good snavigator/README file and then > create a source -> tar file script that will > copy the correct README files into the toplevel > directory of the release .tar file. > > Mo From mdejong@cygnus.com Tue May 29 16:31:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Tue, 29 May 2001 16:31:00 -0000 Subject: Helping new SN users (Re: Printing XREF from SN 5.0) References: <3B14207A.190F9B82@tr.comm.mot.com> Message-ID: On Tue, 29 May 2001, Hugo Varotto wrote: > Hi Mo, Hi Hugo. > could you please expand a little bit what you need with respect to the README > files ? I'm not an expert writing documentation neiter an expert in Source > Navigator, but I'll try to help as much as I can. > > Hugo For one thing, we want to try to stick to existing best practices. ftp://ftp.gnu.org/pub/gnu/standards/standards.text I would think a README and INSTALL file at the very least. There is already a toplevel README but it does not help much. What we want it a README that tells people a bit about Source-Navigator, what it does, why it is useful, and where to find info about how to build and INSTALL it. The goal of these initial help files is simply to help people get started. We don't want people to give up without even trying simply because they don't know where to get started (sadly, this is a real problem). Of course, if you want to know what types of getting started questions folks are likely to ask, just go to the source. http://sources.redhat.com/ml/sourcenav/ Mo DeJong Red Hat Inc From Robert.Breckner@IGT.com Wed May 30 16:54:00 2001 From: Robert.Breckner@IGT.com (Breckner.Robert.E) Date: Wed, 30 May 2001 16:54:00 -0000 Subject: Newbie questions Message-ID: <39A3BA4D6A9AD411A4390008C733C2469389AD@rnoengapp2.engr.intgame.com> I would really like to use Source Navigator as a cross development environment for a platform that has the 2.95.2 gnu toolset already available for Windows 2000. In general I found that everything worked great except for a few items. When I choose to use the build option I have to select a target type of executable or library. Both automatically assume an extension of .exe or .a should be added to what I give in the linker options. Can this be disabled as a .exe does not make sense on the platform I'm targeting. This would also be benificial for the library as I could use this setting to generate a shared object for the target platform. I read a bit in the manuals and I wanted to add a build and debug button on the tool bar rather than being forced to go through the menus, but I couldn't figure out what script file I needed to add this into. Thanks! Robert From Anders.Gustafson@emw.ericsson.se Thu May 31 03:57:00 2001 From: Anders.Gustafson@emw.ericsson.se (Anders Gustafson (EMW)) Date: Thu, 31 May 2001 03:57:00 -0000 Subject: Source Navigator Message-ID: <218E0A05F1A3D311B83F00508B6FAB810342364C@esemont200.gbg.edt.ericsson.se> Hi, I'm trying to download Source Navigator 4.5.2 from ftp://sources.redhat.com/pub/sourcenav/releases/ but it seems that you need a username and a password. How do I get that? Regards, Anders Gustafson Ericsson Microwave Systems AB Test Software Development Engineering and Technology Bor????s Factory P.O. Box 22150 SE-504 12 Bor????s, Sweden Phone: +46 33 17 99 11 From mdejong@cygnus.com Thu May 31 15:16:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 31 May 2001 15:16:00 -0000 Subject: Source Navigator References: <218E0A05F1A3D311B83F00508B6FAB810342364C@esemont200.gbg.edt.ericsson.se> Message-ID: On Thu, 31 May 2001, Anders Gustafson (EMW) wrote: > Hi, > > I'm trying to download Source Navigator 4.5.2 from > ftp://sources.redhat.com/pub/sourcenav/releases/ but it > seems that you need a username and a password. How do I get that? There is no password, that box shows in Netscape when there are too many FTP users (I know, it is strange). Use a mirror site and the problem should go away. Mo DeJong Red Hat Inc From corsepiu@faw.uni-ulm.de Fri Jun 1 00:41:00 2001 From: corsepiu@faw.uni-ulm.de (Ralf Corsepius) Date: Fri, 01 Jun 2001 00:41:00 -0000 Subject: Source Navigator References: Message-ID: <3B17477D.BB3E0EF0@faw.uni-ulm.de> Mo DeJong wrote: > > On Thu, 31 May 2001, Anders Gustafson (EMW) wrote: > > > Hi, > > > > I'm trying to download Source Navigator 4.5.2 from > > ftp://sources.redhat.com/pub/sourcenav/releases/ but it > > seems that you need a username and a password. How do I get that? > > There is no password, that box shows in Netscape when there > are too many FTP users (I know, it is strange). > > Use a mirror site and the problem should go away. Are there any plans for changing snavigator's distribution policy? You current policy is pretty annoying (ftp almost permantently unreachable - at least I haven't manage to access it, ever), only full 10MB-tarballs, no CVS, no diffs, no frequent bug fixes. Sorry, if this may sound like ranting, but it's definitely not indented to be regarded as such. Ralf From bruce.stephens@messagingdirect.com Fri Jun 1 03:26:00 2001 From: bruce.stephens@messagingdirect.com (Bruce Stephens) Date: Fri, 01 Jun 2001 03:26:00 -0000 Subject: Source Navigator References: <3B17477D.BB3E0EF0@faw.uni-ulm.de> Message-ID: Ralf Corsepius writes: [...] > You current policy is pretty annoying (ftp almost permantently > unreachable - at least I haven't manage to access it, ever), So use a mirror site. > only full 10MB-tarballs, no CVS, no diffs, no frequent bug fixes. diffs have been provided in the past. The diffs from 4.5.2 to 5.0 are probably much too big to be useful. CVS would be nice, of course---I don't know why that's not available yet. Perhaps this is still waiting on migration of Insight and Source Navigator to Tcl/Tk 8.3, and [incr Tcl] 3.2? -- Bruce Stephens Bruce.Stephens@MessagingDirect.com ACI Worldwide/MessagingDirect From mdejong@cygnus.com Fri Jun 1 10:08:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Fri, 01 Jun 2001 10:08:00 -0000 Subject: Source Navigator References: <3B17477D.BB3E0EF0@faw.uni-ulm.de> Message-ID: On Fri, 1 Jun 2001, Ralf Corsepius wrote: > Mo DeJong wrote: > > > > On Thu, 31 May 2001, Anders Gustafson (EMW) wrote: > > > > > Hi, > > > > > > I'm trying to download Source Navigator 4.5.2 from > > > ftp://sources.redhat.com/pub/sourcenav/releases/ but it > > > seems that you need a username and a password. How do I get that? > > > > There is no password, that box shows in Netscape when there > > are too many FTP users (I know, it is strange). > > > > Use a mirror site and the problem should go away. > > Are there any plans for changing snavigator's distribution policy? There was some talk of turning FTP access off completely and only allow mirror sites. > You current policy is pretty annoying (ftp almost permantently > unreachable - at least I haven't manage to access it, ever), only > full 10MB-tarballs, no CVS, no diffs, no frequent bug fixes. You are talking about two different things here. Use a mirror site to get a source release. As far as bug fixes go, there are not many of them since not a lot of them have been fixed recently. You can look at the individual bug reports to see if a patch has been posted. Some are fixed already and will be incorporated into the next release. In the future, we will have CVS up and running. Mo From john.mills@atl.viasat.com Fri Jun 1 12:30:00 2001 From: john.mills@atl.viasat.com (Mills, John) Date: Fri, 01 Jun 2001 12:30:00 -0000 Subject: Newbie questions Message-ID: <5C44CEE7DF7AD4119783000629A813F0096894@SRV32-EXCH-NTS> Hello - I used SN-4.2 in Linux for cross development; since I had a Makefile, the build took its instructions from that file and created whatever targets were specified there, as well as running the specified cross-toolset. I did a limited amount of work also with SN-4.2 in WinNT. The GNU tools themselves were hosted under 'cygwin', and I started SN from a cygwin console for them to inherit that environment. (There may be a _much_ more direct approach I didn't find, but that worked.) Could you take that approach? DISCLAIMERS - I haven't put much use on 5.0, I never used the SN building tools, nor am I doing cross-platform development at the moment. Regards - John Mills -----Original Message----- From: Breckner.Robert.E [ mailto:Robert.Breckner@IGT.com ] Sent: Wednesday, May 30, 2001 7:54 PM To: 'sourcenav@sources.redhat.com' Subject: Newbie questions I would really like to use Source Navigator as a cross development environment for a platform that has the 2.95.2 gnu toolset already available for Windows 2000. In general I found that everything worked great except for a few items. From Robert.Breckner@IGT.com Fri Jun 1 13:34:00 2001 From: Robert.Breckner@IGT.com (Breckner.Robert.E) Date: Fri, 01 Jun 2001 13:34:00 -0000 Subject: Newbie questions Message-ID: <39A3BA4D6A9AD411A4390008C733C2469389C1@rnoengapp2.engr.intgame.com> Actually I found that all I needed to do was modify the mkfilegen.tcl. It was set up to automatically add .exe and .a to executables and libraries. I removed this and everything works the way I wanted without having to make an external make file. Robert -----Original Message----- From: Mills, John [ mailto:john.mills@atl.viasat.com ] Sent: Friday, June 01, 2001 12:29 PM To: 'Breckner.Robert.E'; 'sourcenav@sources.redhat.com' Subject: RE: Newbie questions Hello - I used SN-4.2 in Linux for cross development; since I had a Makefile, the build took its instructions from that file and created whatever targets were specified there, as well as running the specified cross-toolset. I did a limited amount of work also with SN-4.2 in WinNT. The GNU tools themselves were hosted under 'cygwin', and I started SN from a cygwin console for them to inherit that environment. (There may be a _much_ more direct approach I didn't find, but that worked.) Could you take that approach? DISCLAIMERS - I haven't put much use on 5.0, I never used the SN building tools, nor am I doing cross-platform development at the moment. Regards - John Mills -----Original Message----- From: Breckner.Robert.E [ mailto:Robert.Breckner@IGT.com ] Sent: Wednesday, May 30, 2001 7:54 PM To: 'sourcenav@sources.redhat.com' Subject: Newbie questions I would really like to use Source Navigator as a cross development environment for a platform that has the 2.95.2 gnu toolset already available for Windows 2000. In general I found that everything worked great except for a few items. From mdejong@cygnus.com Sun Jun 3 15:36:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Sun, 03 Jun 2001 15:36:00 -0000 Subject: Download page changed. Message-ID: Due to some recent complaints, I made a change to the main download page. It now tells users to use a mirror and sends US users to a suggested default. http://sources.redhat.com/sourcenav/download.html Better? Mo DeJong Red Hat Inc From rcohen@dial.oleane.com Mon Jun 4 04:36:00 2001 From: rcohen@dial.oleane.com (Riccardo Cohen) Date: Mon, 04 Jun 2001 04:36:00 -0000 Subject: thanks Message-ID: <3B1B80C2.5E67B8CD@dial.oleane.com> I have been looking for a tool, cheap or free, that just gives the call tree in a proper manner. Thank you to have done it in a marvelous package full of easy to use features. Let me suggest one little thing. Suppose you have the two functions : void dumfunc2() { dumclass *doubleinst; // should appear with another class in ref doubleinst=new dumclass; doubleinst->doit(); delete doubleinst; } void dumfunc3(dumclass *doubleinst) { doubleinst->doit(); } Your analyse forget to tell that new and delete are called from the first one (dump main.to) # dumfunc2 fu # dumclass cl r 000064 D:/Devel/LIB_TOOL/CallGraf.2/main.cxx {} {} # dumfunc2 fu # dumclass cl r 000065 D:/Devel/LIB_TOOL/CallGraf.2/main.cxx {} {} # dumfunc2 fu dumclass doit mi r 000066 D:/Devel/LIB_TOOL/CallGraf.2/main.cxx {} {} # dumfunc3 fu # dumclass cl r 000069 D:/Devel/LIB_TOOL/CallGraf.2/main.cxx {dumclass *} {} # dumfunc3 fu dumclass doit mi r 000071 D:/Devel/LIB_TOOL/CallGraf.2/main.cxx {dumclass *} {} so the two functions seems to be the same from the caller/called point of view. There is also another point you may work on : sourcenavigator forgets base methods : class a { public: doit(); }; class b:class a { public: call() {doit();} } dump try.to : b call mi # doit ud r 000009 C:/zdrop/try.cxx {} {} doit() is not undefined but a method of the base class "a". Thanks anyway and please continue to support it ! -- Riccardo Cohen Articque Les Roches 37230 Fondettes France email = rcohen@dial.oleane.com web = http://www.articque.com tel: +33 02 47 49 90 49 fax: +33 02 47 49 91 49 From marta.stojanovic@nrc.ca Mon Jun 4 08:58:00 2001 From: marta.stojanovic@nrc.ca (Marta Stojanovic) Date: Mon, 04 Jun 2001 08:58:00 -0000 Subject: source code programming language Message-ID: <3B1BB063.B6E9ACF2@nrc.ca> Hi all! Does somebody know if there is a way for a tcl script running on hyper to know of programming language of a source code parsed by SN ? I'd like to know if project database files (created by SN) contain information on the language used. I'm interested in Java and C++, but it should work for others also. The only thing that occured to me is to see if the filename (which is a field in probably all database files) contains .java (.jav, .JAVA) or other. I know that we can change the extension for every language in File-Preferences, but I don't know whether we can access these preferences easily (from a tcl script). Probably there is some other way, I'd greatly appreciate your help. Thanks. Kind regards, Marta. From mdejong@cygnus.com Mon Jun 4 11:56:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Mon, 04 Jun 2001 11:56:00 -0000 Subject: source code programming language References: <3B1BB063.B6E9ACF2@nrc.ca> Message-ID: On Mon, 4 Jun 2001, Marta Stojanovic wrote: > Hi all! > > Does somebody know if there is a way for a tcl script running on hyper > to know of programming language of a source code parsed by SN ? I'd like > to know if project database files (created by SN) contain information on > the language used. I'm interested in Java and C++, but it should work > for others also. Well, yes the language is stored in the db entry for a file. You will have to figure out how to get that data out of a row on your own. Have a look at how the code does it now. Also note that a good DB interface is something we have wanted to do for some time but we have not had time for. Mo From Tal.Avital@klm.com Tue Jun 5 00:52:00 2001 From: Tal.Avital@klm.com (Avital, T. - SPLXV) Date: Tue, 05 Jun 2001 00:52:00 -0000 Subject: IBM AIX xompile problems Message-ID: <1DE83D89D0CBD21187DE0000836C7EF301DB9D6D@xe04001.ex.klm.nl> Hello everyone I am trying to compile source navigator under AIX machine (ver. 4.3.2) and after configure is running and I try to use make I get a strange syntax error - it has to b noted that I don't have gcc but IBM cc compiler and xlC compiler. I'm not good in Unix but I'm trying to do my best. As I spend 2 days trying to find binaries for it in the internet without success (the only thing I found is that there was some1 else who look for it and a replay that it was compiled once under AIX). Pls. any1 knows here how to do such a thing - I need help badly. Thanks ahead Tal ********************************************************************** This e-mail and any attachment may contain confidential and privileged material intended for the addressee only. If you are not the addressee, you are notified that no part of the e-mail or any attachment may be disclosed, copied or distributed, and that any other action related to this e-mail or attachment is strictly prohibited, and may be unlawful. If you have received this e-mail by error, please notify the sender immediately by return e-mail, and delete this message. Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its employees shall not be liable for the incorrect or incomplete transmission of this e-mail or any attachments, nor responsible for any delay in receipt. ********************************************************************** From corsepiu@faw.uni-ulm.de Tue Jun 5 00:52:00 2001 From: corsepiu@faw.uni-ulm.de (Ralf Corsepius) Date: Tue, 05 Jun 2001 00:52:00 -0000 Subject: nosrc.rpm Message-ID: <3B1C8FFD.91082DCC@faw.uni-ulm.de> Hi, Below is a nosrc.rpm I am using to install snavigator on my Linux-system. Besides containing an rpm-spec, it also contains a couple of hacks/work-arounds and fixes to problems I had encountered when building snavigator. Comments welcomed :) Ralf -- Ralf Corsepius Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW) Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690 mailto:corsepiu@faw.uni-ulm.de FAX: +49/731/501-999 http://www.faw.uni-ulm.de sourcenav-010412-l2l_1.nosrc.rpm -------------- next part -------------- A non-text attachment was scrubbed... Name: sourcenav-010412-l2l_1.nosrc.rpm Type: application/x-rpm Size: 4041 bytes Desc: not available URL: From mdejong@cygnus.com Tue Jun 5 01:02:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Tue, 05 Jun 2001 01:02:00 -0000 Subject: IBM AIX xompile problems References: <1DE83D89D0CBD21187DE0000836C7EF301DB9D6D@xe04001.ex.klm.nl> Message-ID: On Tue, 5 Jun 2001, Avital, T. - SPLXV wrote: > Hello everyone > I am trying to compile source navigator under AIX machine (ver. 4.3.2) and > after configure is running and I try to use make I get a strange syntax > error - it has to b noted that I don't have gcc but IBM cc compiler and xlC > compiler. It looks like Tcl/Tk and some of the other support libs have been ported to AIX, but you may be in for a bit of hacking to get it all working. It is not a platform we have done any testing on recently. You might want to see if gcc is available on your platform, it might save you some work. > I'm not good in Unix but I'm trying to do my best. As I spend 2 days trying > to find binaries for it in the internet without success (the only thing I > found is that there was some1 else who look for it and a replay that it was > compiled once under AIX). We provide binaries for a few systems, but for the most part you have to compile from source on the less widely used systems. > ********************************************************************** > This e-mail and any attachment may contain confidential and privileged > ... > ********************************************************************** In the future, please don't post notes to the list with these sorts of footers. This is a public mailing list. Mo DeJong Red Hat Inc From corsepiu@faw.uni-ulm.de Tue Jun 5 09:17:00 2001 From: corsepiu@faw.uni-ulm.de (Ralf Corsepius) Date: Tue, 05 Jun 2001 09:17:00 -0000 Subject: [patch] Fix to PR #75 Message-ID: <3B1D065A.4120DA7C@faw.uni-ulm.de> Hi, The patch below is supposed to fix the problem I had filed to the sourcenav bug database eariler today (PR #57). It changes the "m4parser" to be more selective on files to be treated as "m4". Ralf -- Ralf Corsepius Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW) Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690 mailto:corsepiu@faw.uni-ulm.de FAX: +49/731/501-999 http://www.faw.uni-ulm.de sourcenav-010412-sn_prop.cfg.in.diff -------------- next part -------------- A non-text attachment was scrubbed... Name: sourcenav-010412-sn_prop.cfg.in.diff Type: text/x-diff Size: 667 bytes Desc: not available URL: From neeam@yahoo.com Tue Jun 5 17:37:00 2001 From: neeam@yahoo.com (Subrata Datta) Date: Tue, 05 Jun 2001 17:37:00 -0000 Subject: two quesutions.. Message-ID: <20010606003716.5328.qmail@web11608.mail.yahoo.com> sorry if these are convered by FAQ.. (but I could not find). 1. How to increase the deault editor window size ? 2. How to get mutiple editor screens so that I can view/edit to source files side by side. ===== Subrata Datta ---------------- neeam@yahoo.com __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ From mdejong@cygnus.com Tue Jun 5 18:04:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Tue, 05 Jun 2001 18:04:00 -0000 Subject: sourcenav README and INSTALL files. Message-ID: Here are a couple of file I whipped up to deal with the lack of readme or install instructions in the download. Could folks take a look at them and see if there is anything that is confusing or just plain missing? thanks Mo DeJong Red Hat Inc % cat README This is Source-Navigator and IDE for C/C++/Java/Tcl/Fortran and a host of other languages. Source-Navigator includes powerful source code comprehension features that help a developer understand complex relationships between elements of a program's source. Source-Navigator is GPLed free software, see the COPYING file for more information about the GPL. The Source-Navigator project is hosted at sources.redhat.com: http://sources.redhat.com/sourcenav/ A public mailing list is available for help or general questions. Go to the project website to find out how to join the mailing list. One can find Source-Navigator documentation in the snavigator/doc/html directory, it is available in HTML format only. Consult the INSTALL file to learn how to build and install binaries of Source-Navigator. % cat INSTALL Note: These build/install instructions assume that you have already downloaded and extracted the files from the zip or tar file. Generic Build Notes: We suggest building outside of the src directory, this might be a new concept for most users, but it is really quite simple once you get the hang of it. With a build dir, all build related files for a specific architecture are stored outside of the src directory, so you can build multiple executables from the same source tree. UNIX Build: Building under UNIX systems is trivial, just create a build dir and run the configure script. The following commands assume the release is 5.0.1 and that the user wants to install into a non-default location (/usr/sourcenav). % mkdir snbuild ; cd snbuild % ../sourcenav-5.0.1/configure --prefix=/usr/sourcenav % make % make install Windows Build (VC++): Building under Windows is more tricky when compared to the UNIX build, be sure to follow the instructions exactly. Windows versions of Source-Navigator are created using the VC++ compiler and Cygwin. One needs to run the vcvars32.bat script to setup the needed env vars, typically this is done by starting command.com on Windows 95/98 or cmd.exe under NT and then running the vcvars32.bat script in the VC++ bin directory. After VC++ env vars are setup, start a bash shell by cd'ing to the Cygwin root directory and running cygwin.bat. In the bash shell, run the following commands. % export CC=cl % export CFLAGS="-Z7 -Od" You can now run the configure script in the normal way, but there are a couple of things to watch for. First, the configure script must be run with a relative path (../sourcenav-5.0.1/configure). Second, the --prefix path must be passed as a Windows native path, the following example assumes that /usr/sourcenav is mounted as D:/Cygwin/usr/sourcenav. % mkdir snbuild ; cd snbuild % ../sourcenav-5.0.1/configure --prefix=D:/Cygwin/usr/sourcenav % make % make install Binary Install: Installing a binary release of SN is simple, just extract the files from the archive, add the newly created sourcenav-5.0.1/bin directory to your PATH, and then type snavigator. Windows users can double-click on the snavigator.exe executable in the Explorer. From Tal.Avital@klm.com Wed Jun 6 02:13:00 2001 From: Tal.Avital@klm.com (Avital, T. - SPLXV) Date: Wed, 06 Jun 2001 02:13:00 -0000 Subject: IBM AIX xompile problems Message-ID: <1DE83D89D0CBD21187DE0000836C7EF301DBA10D@xe04001.ex.klm.nl> Hi again A little bit of hacking??? As I said im dummy in Unix all I wish is to b able to have the source navigator on my unix and as I read b4 in the mailing list RedHat already compiled it once under AIX machine so y not to publish this binaries as well?? Is there anyplace which gives exact explanation of how to compile and which changes u have to do to b able to compile it under AIX without gcc - only with xlC compiler? I mean in the sense of step 1 do that step2 do that. This will b the easiest for me as I will have my Unix courses only later this year ;o( and I need it badly now Pls. help such miserable person like me Thanks Tal ********************************************************************** This e-mail and any attachment may contain confidential and privileged material intended for the addressee only. If you are not the addressee, you are notified that no part of the e-mail or any attachment may be disclosed, copied or distributed, and that any other action related to this e-mail or attachment is strictly prohibited, and may be unlawful. If you have received this e-mail by error, please notify the sender immediately by return e-mail, and delete this message. Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its employees shall not be liable for the incorrect or incomplete transmission of this e-mail or any attachments, nor responsible for any delay in receipt. ********************************************************************** From irox@redhat.com Wed Jun 6 11:35:00 2001 From: irox@redhat.com (Ian Roxborough) Date: Wed, 06 Jun 2001 11:35:00 -0000 Subject: IBM AIX xompile problems References: <1DE83D89D0CBD21187DE0000836C7EF301DBA10D@xe04001.ex.klm.nl> Message-ID: <3B1E77E2.BF9FA071@redhat.com> Hi, AIX support (and a couple of others *nix) was dropped a while ago (I think 2 years or something). AIX is one of the more annoying forms of *nix to support and we don't really have any plans to maintain and test an AIX version (hey, if we have any AIX experts out there, we're taking patches). Source-Navigator currently only able to compile with gcc and MSVC++. If you are going to run SN on AIX, Step 1 is going to be getting a working set of GNU tools, gcc, but also you probably want binutils bash, make, sh, tar, etc.. Most of the AIX problems will probably come from setting up the build environment. Step 2 will probably involve find some patches for Tcl/Tk (maybe Tix and Itcl also) to get it running on AIX. One other thing: I wouldn't learn Unix on an AIX machine if you can avoid it. AIX was my first Unix and Unix development environment, it's very non standard and quirky. Otherwise, an AIX users who'd be kind enough to post a tar ball somewhere? Hope this helps, Ian. "Avital, T. - SPLXV" wrote: > > Hi again > A little bit of hacking??? As I said im dummy in Unix all I wish is to b > able to have the source navigator on my unix and as I read b4 in the mailing > list RedHat already compiled it once under AIX machine so y not to publish > this binaries as well?? Is there anyplace which gives exact explanation of > how to compile and which changes u have to do to b able to compile it under > AIX without gcc - only with xlC compiler? I mean in the sense of step 1 do > that step2 do that. This will b the easiest for me as I will have my Unix > courses only later this year ;o( and I need it badly now > Pls. help such miserable person like me > Thanks > Tal From junwu@tr.comm.mot.com Wed Jun 6 15:26:00 2001 From: junwu@tr.comm.mot.com (Jun Wu II) Date: Wed, 06 Jun 2001 15:26:00 -0000 Subject: Is Xref working with mixture code of C and Cobol Message-ID: <3B1EAE2D.14282DC7@tr.comm.mot.com> Hi, all: This is a question not frequently asked, I guess. I have been trying to use Xref to show the calling tree on some C and Cobol modules calling each other. It looks like it couldn't show C functions in a Cobol tree and vice versa. Does anybody know how to make this work? Or it's just not been implemented at all? Regards, JUN From rodger@synchronicity.com Wed Jun 6 17:16:00 2001 From: rodger@synchronicity.com (Rodger Hughes) Date: Wed, 06 Jun 2001 17:16:00 -0000 Subject: Source Navigator 5.0 and [incr TCL] Message-ID: <3B1EC7E4.FFDC8B0E@synchronicity.com> Hello Source-Navigator Team. I've just started playing with SN 5.0 and I can not get it to recognize classes, methods etc... in my ITCL source. I've even tried a very simple itcl source (see below.) I'm running under Window NT 4.0 SP6. I also tried SN 4.5.2 and get the same results. It ignores the classes, treats the methods as functions. The only "classes" I can get it to recognize are tcl namespaces. Also, if add an inherit foo line to the Timer class I get an error when the code parses. >From what I've seen, SN looks really useful. Second Question: whats the proper way to install 5.0 on windows? The binaries (.zip file) doesn't have an installer like 4.5.2 does and there aren't any instructions. Thanks Rodger Hughes. -------------- next part -------------- A non-text attachment was scrubbed... Name: tmp.proj Type: application/octet-stream Size: 16384 bytes Desc: not available URL: From irox@redhat.com Wed Jun 6 17:33:00 2001 From: irox@redhat.com (Ian Roxborough) Date: Wed, 06 Jun 2001 17:33:00 -0000 Subject: Source Navigator 5.0 and [incr TCL] References: <3B1EC7E4.FFDC8B0E@synchronicity.com> Message-ID: <3B1ECBCE.5C8746EC@redhat.com> Yeah, this is a big downer, we only work with Itcl 1.0/2.0 and not the 3.0 syntax (Yes, this does mean that we can't parser a big chunk of Source-Navigator). The required solution is either fix the current Itcl parser to work with Itcl 3.0 or write a new one (or adapt an existing one). When will this be done? Well, I was hoping to have an Itcl 3.0 parser by now, I started writing a new parser Tcl/Itcl in PCCTS, but I've not done anything on it for a while. Ian. Rodger Hughes wrote: > > Hello Source-Navigator Team. > > I've just started playing with SN 5.0 and I can not get it to recognize > classes, methods etc... in my ITCL source. I've even tried a very > simple > itcl source (see below.) I'm running under Window NT 4.0 SP6. > > I also tried SN 4.5.2 and get the same results. It ignores the classes, > treats > the methods as functions. The only "classes" I can get it to recognize > are > tcl namespaces. > > Also, if add an inherit foo line to the Timer class I get an error when > the code > parses. > > >From what I've seen, SN looks really useful. > > Second Question: whats the proper way to install 5.0 on windows? The > binaries (.zip file) doesn't have an installer like 4.5.2 does and there > aren't > any instructions. > > Thanks > Rodger Hughes. > > -------------------------------------------------------------------------------- > Name: tmp.proj > tmp.proj Type: unspecified type (application/octet-stream) > Encoding: base64 > > -------------------------------------------------------------------------------- > > package require Itcl > > ::itcl::class foo { > private variable f_up > private varible f_act > > public method fup {} { > puts $up > } > public method fact {} { > puts $act > } > constructor {up act} { > set f_up $up > set f_act $act > } > } > ::itcl::class Timer { > #inherit foo > private variable t_up > private varible t_act > > public method up {} { > puts $up > } > public method act {} { > puts $act > } > constructor {up act} { > set t_up $up > set t_act $act > } > } From mdejong@cygnus.com Wed Jun 6 17:50:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Wed, 06 Jun 2001 17:50:00 -0000 Subject: Source Navigator 5.0 and [incr TCL] References: <3B1EC7E4.FFDC8B0E@synchronicity.com> Message-ID: On Wed, 6 Jun 2001, Rodger Hughes wrote: > >From what I've seen, SN looks really useful. It is, but the parsers need work. > Second Question: whats the proper way to install 5.0 on windows? The > binaries (.zip file) doesn't have an installer like 4.5.2 does and there > aren't any instructions. Yeah, that is something I want to fix in the next release. Appended are the readme files I am planning on putting in the next release. Would they have helped? Mo DeJong Red Hat Inc % cat README This is Source-Navigator and IDE for C/C++/Java/Tcl/Fortran and a host of other languages. Source-Navigator includes powerful source code comprehension features that help a developer understand complex relationships between elements of a program's source. Source-Navigator is released under the terms of the GPL; see the COPYING file for more information about the GPL. The Source-Navigator project is hosted at sources.redhat.com: http://sources.redhat.com/sourcenav/ A public mailing list is available for help or general questions. Go to the project website to find out how to join the mailing list. One can find Source-Navigator documentation in the snavigator/doc/html directory. Documentation is available in HTML format only. Consult the INSTALL file to learn how to build and install binaries of Source-Navigator. % cat INSTALL Note: These build/install instructions assume that you have already downloaded and extracted the files from the zip or tar file. Generic Build Notes: We suggest building outside of the source directory. This way, all build related files for a specific architecture are stored outside of the source directory. This makes it easy to build multiple executables from a single source tree. We suggest building outside of the src directory, this might be a new concept for most users, but it is really quite simple once you get the hang of it. With a build dir, all build related files for a specific architecture are stored outside of the src directory, so you can build multiple executables from the same source tree. UNIX Build: To build under a UNIX system, simply create a build directory and run the configure script. The following commands assume the release is 5.0.1 and that the user wants to install into a non-default location (/usr/sourcenav). % mkdir snbuild ; cd snbuild % ../sourcenav-5.0.1/configure --prefix=/usr/sourcenav % make % make install Windows Build (VC++): Building under Windows is more tricky when compared to the UNIX build, be sure to follow the instructions exactly. Windows versions of Source-Navigator are created using the VC++ compiler and Cygwin. One needs to run the vcvars32.bat script to setup the needed env vars. Typically, this is done by starting command.com on Windows 95/98 or cmd.exe under NT and then running the vcvars32.bat script in the VC++ bin directory. After VC++ env vars are setup, start a bash shell by cd'ing to the Cygwin root directory and running cygwin.bat. In the bash shell, run the following commands. % export CC=cl % export CFLAGS="-Z7 -Od" You can now run the configure script in the normal way. Of course, there are a couple of things to take note of. First, the configure script must be run with a relative path (../sourcenav-5.0.1/configure). Second, the --prefix path must be passed as a Windows native path, the following example assumes that /usr/sourcenav is mounted as D:/Cygwin/usr/sourcenav. % mkdir snbuild ; cd snbuild % ../sourcenav-5.0.1/configure --prefix=D:/Cygwin/usr/sourcenav % make % make install Binary Install: To install a binary release of Source-Navigator, extract the files from the archive and add the sourcenav-5.0.1/bin directory to your PATH. You can then run Source-Navigator from the command line using the snavigator script. Windows users can also double-click on the snavigator.exe executable in the Explorer. From corsepiu@faw.uni-ulm.de Wed Jun 6 18:09:00 2001 From: corsepiu@faw.uni-ulm.de (Ralf Corsepius) Date: Wed, 06 Jun 2001 18:09:00 -0000 Subject: Terminal symbol highlightening Message-ID: <3B1ED484.9A157498@faw.uni-ulm.de> Hi, I am looking for a way to implement keyword/terminal symbol highlightening in a SN-parser. Eg. I want the word "include" to be highlighted include How to achieve this? Ralf From scherrey@innoverse.com Wed Jun 6 18:22:00 2001 From: scherrey@innoverse.com (Benjamin Scherrey) Date: Wed, 06 Jun 2001 18:22:00 -0000 Subject: Getting SN5 running over a 452 install. References: Message-ID: <01060621161301.11872@incognito.switchco.com> Its been a long time but I'm just no getting around to this.... I did indeed build/install as root and it runs (apparently) fine as root. I recall that this was a problem in 452 but I don't recall which file I need to fix the permissions on so all users can run it. Can't this be fixed in the install portion of the build? Anyway, please let me know which file I need to fix permissions on. thanx & later, Ben Scherrey On Thursday 17 May 2001 04:17 pm, Mo DeJong wrote: > On Wed, 16 May 2001, Benjamin Scherrey wrote: > > I d/l'd 5 and built/installed it but when I try to > > run it I get a 'Error: invalid command name "sn_tcl_tk_init"' message at > > the command prompt. > > Did you build as root and then try to run it as a normal user? > Do you get the same error if you build/install/run as a normal > user? > > Mo From corsepiu@faw.uni-ulm.de Thu Jun 7 01:11:00 2001 From: corsepiu@faw.uni-ulm.de (Ralf Corsepius) Date: Thu, 07 Jun 2001 01:11:00 -0000 Subject: sourcenav/59 References: <20010607025442.15865.qmail@sourceware.cygnus.com> Message-ID: <3B1F376A.9631F851@faw.uni-ulm.de> mdejong@sources.redhat.com wrote: > > Synopsis: parsers/cpp/* contains comments in a foreign language > > State-Changed-From-To: open->closed > State-Changed-By: mdejong > State-Changed-When: Wed Jun 6 19:54:42 2001 > State-Changed-Why: > This is not a bug report! Simple complaints should > be directed to the mailing list. What? > http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=59&database=sourcenav Unreadable source-code is not supposed to be bugs? Sorry, but I do not share this opinion. IMO, it's a matter of code-quality and in open source are part of the documentation. Ralf From Tal.Avital@klm.com Thu Jun 7 02:17:00 2001 From: Tal.Avital@klm.com (Avital, T. - SPLXV) Date: Thu, 07 Jun 2001 02:17:00 -0000 Subject: AIX again ;o) Message-ID: <1DE83D89D0CBD21187DE0000836C7EF301DBA37A@xe04001.ex.klm.nl> Hi again Well so I understand that SN was compiled in the previous versions (2 years ago) is it possible to find those old version binaries, as I need it for a very simple usage. It is needed for a special language which is mostly simplified and has not much in it (as I will write the parser for it) I can live without many features of the SN - so old version will not be a problem, any one has it? Btw I have no other choice than getting Unix under AIX as this is the Unix we have and I am not allowed to install GNU on it ;o( so I'm stuck with it Thanks again Tal ********************************************************************** This e-mail and any attachment may contain confidential and privileged material intended for the addressee only. If you are not the addressee, you are notified that no part of the e-mail or any attachment may be disclosed, copied or distributed, and that any other action related to this e-mail or attachment is strictly prohibited, and may be unlawful. If you have received this e-mail by error, please notify the sender immediately by return e-mail, and delete this message. Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its employees shall not be liable for the incorrect or incomplete transmission of this e-mail or any attachments, nor responsible for any delay in receipt. ********************************************************************** From marta.stojanovic@nrc.ca Thu Jun 7 07:00:00 2001 From: marta.stojanovic@nrc.ca (Marta Stojanovic) Date: Thu, 07 Jun 2001 07:00:00 -0000 Subject: operator overloading and C++ parser Message-ID: <3B1F892D.A952FE45@nrc.ca> Hi all ! I searched the mailing list, but I didn't find this problem posted (sorry for any duplicates). Here is the problem : When there is an operator overloading in C++ code the parser does not parse correctly the return types in following situations (in each of these situations the return type will be int instead of the real return type): - when the return type is a class type returned by value (if it's returned by reference, it parses it correctly) - when the return type is a template argument type - when the return type is a typedef. I won't bother you with too many examples, here is just one (instead of c4_Row there is int in the database) : C++ code : class c4_StringProp : public c4_Property { public: .... c4_Row operator[] (const char*) const; .... }; SN .md database entry : {c4_StringProp operator[] 000674.011 metakit-2.3.4-29/include/mk4.h} {674.41 0x4 {int} {const char *} {} {}} I tested it on metakit source code ( http://sourceforge.net/projects/metakit/ ). Kind regards, Marta. From mdejong@cygnus.com Thu Jun 7 11:51:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 07 Jun 2001 11:51:00 -0000 Subject: AIX again ;o) References: <1DE83D89D0CBD21187DE0000836C7EF301DBA37A@xe04001.ex.klm.nl> Message-ID: On Thu, 7 Jun 2001, Avital, T. - SPLXV wrote: > ********************************************************************** > This e-mail and any attachment may contain confidential and ... > ********************************************************************** You were asked not to post messages that included legal fiction like this. People are not going to want to help you if you don't play nice. Mo DeJong Red Hat Inc From mdejong@cygnus.com Thu Jun 7 11:58:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 07 Jun 2001 11:58:00 -0000 Subject: sourcenav/59 References: <3B1F376A.9631F851@faw.uni-ulm.de> Message-ID: On Thu, 7 Jun 2001, Ralf Corsepius wrote: > mdejong@sources.redhat.com wrote: > > > > Synopsis: parsers/cpp/* contains comments in a foreign language > > > > State-Changed-From-To: open->closed > > State-Changed-By: mdejong > > State-Changed-When: Wed Jun 6 19:54:42 2001 > > State-Changed-Why: > > This is not a bug report! Simple complaints should > > be directed to the mailing list. > What? > > > http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=59&database=sourcenav > Unreadable source-code is not supposed to be bugs? > > Sorry, but I do not share this opinion. IMO, it's a matter of > code-quality and in open source are part of the documentation. > > Ralf It is fine to get all worked up about purity, but we have to deal with the codebase the same as you do. Filling up the bug database with things that are not really functional bugs does not help anyone. If you are really bothered by the lack of english comments, then work on the problem and send in a patch. Mo DeJong Red Hat Inc From irox@redhat.com Thu Jun 7 13:16:00 2001 From: irox@redhat.com (Ian Roxborough) Date: Thu, 07 Jun 2001 13:16:00 -0000 Subject: AIX again ;o) References: <1DE83D89D0CBD21187DE0000836C7EF301DBA37A@xe04001.ex.klm.nl> Message-ID: <3B1FE102.A4CA1D0E@redhat.com> "Avital, T. - SPLXV" wrote: > > Hi again > > Well so I understand that SN was compiled in the previous versions (2 years > ago) is it possible to find those old version binaries, as I need it for a > very simple usage. It is needed for a special language which is mostly > simplified and has not much in it (as I will write the parser for it) I can > live without many features of the SN - so old version will not be a problem, > any one has it? These versions are long gone (SN wasn't open source at the time). > Btw I have no other choice than getting Unix under AIX as this is the Unix > we have and I am not allowed to install GNU on it ;o( so I'm stuck with it Your not going to be able to compile SN without gcc (well, not without a fair bit of work). If you can't install gcc, then your only hope is finding an AIX guy with gcc and the GNU tools installed. Then buy them beer in exchange for an AIX SN binary. ;-) Ian. From dennis@ipt.dtu.dk Fri Jun 8 03:49:00 2001 From: dennis@ipt.dtu.dk (Dennis Krøger) Date: Fri, 08 Jun 2001 03:49:00 -0000 Subject: [Dennis Krøger ] Re: AIXagain ;o) Message-ID: <991997229.5656.0.camel@dennis.kpd.ipt.dtu.dk> On 07 Jun 2001 11:51:48 -0700, Mo DeJong wrote: > On Thu, 7 Jun 2001, Avital, T. - SPLXV wrote: > > > ********************************************************************** > > This e-mail and any attachment may contain confidential and ... > > ********************************************************************** > > You were asked not to post messages that included legal fiction > like this. People are not going to want to help you if you > don't play nice. > > Mo DeJong > Red Hat Inc I think the it is his company's mailserver that automatically slaps the disclaimer onto the message... I've seen it before on this mailinglist, and I wrote to the sender and complained. At least in that case it was the company server... Nothing she could do anything about. Hate when they do that... Regards, Dennis Kr????ger From Tal.Avital@klm.com Fri Jun 8 04:13:00 2001 From: Tal.Avital@klm.com (Avital, T. - SPLXV) Date: Fri, 08 Jun 2001 04:13:00 -0000 Subject: AIX apology Message-ID: <1DE83D89D0CBD21187DE0000836C7EF301DBA6E1@xe04001.ex.klm.nl> It is done by my mail server and I cant do anything about it and I apology b4 the one who manage this list. And iw ill apology here b4 every1 as well - I cant do anything about it. I looked for it in my Outlook and nothing can b done to avoid it Sorry tal k Information Services -SPL/XV- Avital Tal, Application Developer Tel.: +31 (0)20-649 62 31 Fax: +31 (0)20-649 67 93 E-mail: Tal.Avital@klm.nl ********************************************************************** This e-mail and any attachment may contain confidential and privileged material intended for the addressee only. If you are not the addressee, you are notified that no part of the e-mail or any attachment may be disclosed, copied or distributed, and that any other action related to this e-mail or attachment is strictly prohibited, and may be unlawful. If you have received this e-mail by error, please notify the sender immediately by return e-mail, and delete this message. Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its employees shall not be liable for the incorrect or incomplete transmission of this e-mail or any attachments, nor responsible for any delay in receipt. ********************************************************************** From scherrey@innoverse.com Fri Jun 8 13:10:00 2001 From: scherrey@innoverse.com (Benjamin Scherrey) Date: Fri, 08 Jun 2001 13:10:00 -0000 Subject: Getting SN5 to run as normal user... Message-ID: <0106081605190L.11872@incognito.switchco.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I built/installed SN5 as the root user but now normal users can't run it without getting an error : "Error: invalid command name "sn_tcl_tk_init". Looks like a rights error but I can't tell which file is setup wrong. thanx & later, Ben Scherrey -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.8 iQA/AwUBOyEwAmj9nzX41wUgEQIN0QCfS8K5RgiCS/6+ZUfx9ITaRhYs17UAnRmq kDu9nKl2RPfCuzyV8FLO+Q/8 =RXIZ -----END PGP SIGNATURE----- From mdejong@cygnus.com Fri Jun 8 13:34:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Fri, 08 Jun 2001 13:34:00 -0000 Subject: Getting SN5 to run as normal user... References: <0106081605190L.11872@incognito.switchco.com> Message-ID: On Fri, 8 Jun 2001, Benjamin Scherrey wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I built/installed SN5 as the root user but now normal users can't run it > without getting an error : "Error: invalid command name "sn_tcl_tk_init". > Looks like a rights error but I can't tell which file is setup wrong. Try the tclIndex file, it should be world readable: % ls -la ~/project/install/snavigator/share/sourcenav/gui/tclIndex -rw-r--r-- 1 mo mo 56401 May 25 01:43 /home/mo/project/install/snavigator/share/sourcenav/gui/tclIndex Mo From scherrey@innoverse.com Fri Jun 8 15:04:00 2001 From: scherrey@innoverse.com (Benjamin Scherrey) Date: Fri, 08 Jun 2001 15:04:00 -0000 Subject: Getting SN5 to run as normal user... References: Message-ID: <0106081758120M.11872@incognito.switchco.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thanx much. Turned out the directories /usr/local/share/sourcenav/[gui|packages] did not have their permissions correctly set. Now its fixed and I seem to be up to the new 5.x SN! Thanx guys & great work! later, Ben Scherrey On Friday 08 June 2001 04:34 pm, Mo DeJong wrote: > On Fri, 8 Jun 2001, Benjamin Scherrey wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > I built/installed SN5 as the root user but now normal users can't run it > > without getting an error : "Error: invalid command name "sn_tcl_tk_init". > > Looks like a rights error but I can't tell which file is setup wrong. > > Try the tclIndex file, it should be world readable: > > % ls -la ~/project/install/snavigator/share/sourcenav/gui/tclIndex > -rw-r--r-- 1 mo mo 56401 May 25 01:43 > /home/mo/project/install/snavigator/share/sourcenav/gui/tclIndex > > Mo -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.8 iQA/AwUBOyFKd2j9nzX41wUgEQJY2gCfQg0XOtQTv/OXVGaCV7bhQIC3vVYAoO75 kgp97RQ/VIteQRCacF3pXaIB =3g/X -----END PGP SIGNATURE----- From scherrey@innoverse.com Fri Jun 8 15:22:00 2001 From: scherrey@innoverse.com (Benjamin Scherrey) Date: Fri, 08 Jun 2001 15:22:00 -0000 Subject: Can't build under 5.0 install/Linux. Message-ID: <0106081817350N.11872@incognito.switchco.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Oops - spoke too soon. In my project, when I bring up the build window, the Directory field entry is greyed out. When I try to run make I get a window saying "" The Directory "" cannot be created. "". I click OK and it tries to run make but its not in the right directory so it doesn't work. FWIW - I use my own configure/makefile setup which used to work just fine under 452. Any ideas? thanx & later, Ben Scherrey -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.8 iQA/AwUBOyFPAmj9nzX41wUgEQKmygCfYCRl1QcCcwgkRS8o/F76Pgzw9ZgAoI8W DpvuMhvmRUMM4lJUSgBHmPeg =QG9O -----END PGP SIGNATURE----- From parentck@netcourrier.com Mon Jun 11 01:22:00 2001 From: parentck@netcourrier.com (Jerome PARENT) Date: Mon, 11 Jun 2001 01:22:00 -0000 Subject: AIX again ;o) Message-ID: > Hi again Well so I understand that SN was compiled > in the previous versions (2 years ago) is it possible > to find those old version binaries, as I need it for a > very simple usage. Did you try to compile the previous version : SN 4.5.2 ? I compiled it on AIX 4.3.3 with xlC 3.6 a few months ago, and now I'm using SN every day and it works fine. To compile it, I had to install bison (because I had no yacc before). I also had to remove an option "-Wall" in one Makefile. but that's all. Jerome PARENT ----- La messagerie itin????rante sans abonnement NetCourrier ----- Web : www.netcourrier.com - Minitel : 3615 NETCOURRIER T????l????phone : 08 36 69 00 21 From mdejong@cygnus.com Tue Jun 12 14:05:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Tue, 12 Jun 2001 14:05:00 -0000 Subject: Acceptable Use section added to mail.html Message-ID: I just added an "Acceptable Use" section to the mailing list signup page. http://sources.redhat.com/sourcenav/mail.html Mo DeJong Red Hat Inc From pallas@cs.stanford.edu Wed Jun 13 09:37:00 2001 From: pallas@cs.stanford.edu (Joe Pallas) Date: Wed, 13 Jun 2001 09:37:00 -0000 Subject: Acceptable Use section added to mail.html References: Message-ID: <2748610000.992450189@olympus> Mo DeJong wrote: > I just added an "Acceptable Use" section to the mailing > list signup page. [which says in part: Fictional contract claims Some organizations require disclaimers along the lines of "This email may contain confidential information. By reading it you agree to sign over your first born child." Obviously, these claims are a legal fantasy. Posts including such claims are strictly forbidden. ] I don't understand how the prohibition on "fictional contract claims" fits with the open source philosophy. We've already established that the people whose messages contain these boilerplate notices usually have no control over them. It's safe to assume that their workplace policies are not going to be changed in response to this prohibition. So, the only effect this will have is preventing people who are interested in using or contributing to Source Navigator from doing so. How can this benefit the Source Navigator community? The alternative--to ignore any "legal fictions"--seems both more practical and more inclusive. joe From shens@IRO.UMontreal.CA Wed Jun 13 12:19:00 2001 From: shens@IRO.UMontreal.CA (Shiqiang Shen) Date: Wed, 13 Jun 2001 12:19:00 -0000 Subject: how to install source navigator Message-ID: <3B27BCA0.20659085@iro.umontreal.ca> Sir, I downloaded version 5.0 under linux but don't know how to install it. shen From mdejong@cygnus.com Wed Jun 13 12:56:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Wed, 13 Jun 2001 12:56:00 -0000 Subject: Acceptable Use section added to mail.html References: <2748610000.992450189@olympus> Message-ID: On Wed, 13 Jun 2001, Joe Pallas wrote: > Mo DeJong wrote: > > > I just added an "Acceptable Use" section to the mailing > > list signup page. > > [which says in part: > Fictional contract claims > > Some organizations require disclaimers along the lines of "This email may > contain confidential information. By reading it you agree to sign over your > first born child." Obviously, these claims are a legal fantasy. Posts > including such claims are strictly forbidden. > ] > > I don't understand how the prohibition on "fictional contract claims" fits > with the open source philosophy. The sourcenav mailing list is a public resource. If you don't want to make the information in your post available to the public, then don't post to the mailing list. > We've already established that the people whose messages contain these > boilerplate notices usually have no control over them. It's safe to assume > that their workplace policies are not going to be changed in response to > this prohibition. Then these people should seek an alternative method of posting to the mailing list. This same claim was made when the posting in HTML issue came up. Neither argument stands up to scrutiny. A community need some basic rules so that everyone can participate on equal footing. Mo DeJong Red Hat Inc From mdejong@cygnus.com Wed Jun 13 13:39:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Wed, 13 Jun 2001 13:39:00 -0000 Subject: how to install source navigator References: <3B27BCA0.20659085@iro.umontreal.ca> Message-ID: On Wed, 13 Jun 2001, Shiqiang Shen wrote: > Sir, > I downloaded version 5.0 under linux but don't know how to install it. > > shen Here is the INSTALL.TXT file that will appear in the next release. Could you try these instructions out and tell us if they helped? Mo DeJong Red Hat Inc ----------------------------- Binary Install: To install a binary release of Source-Navigator, extract the files from the archive and add the sourcenav-5.0.1/bin directory to your PATH. There is no need to run an installer. You can run Source-Navigator from the command line using the snavigator script. Windows users can also double-click on the snavigator.exe executable in the Windows Explorer. Generic Build Notes: These build/install instructions assume that you have already downloaded and extracted the files from the zip or tar file. We suggest building outside of the source directory. This way, all build related files for a specific architecture are stored outside of the source directory. This makes it easy to build multiple executables from a single source tree. We suggest building outside of the src directory, this might be a new concept for most users, but it is really quite simple once you get the hang of it. With a build dir, all build related files for a specific architecture are stored outside of the src directory, so you can build multiple executables from the same source tree. UNIX Build: To build under a UNIX system, simply create a build directory and run the configure script. The following commands assume the release is 5.0.1 and that the user wants to install into a non-default location (/usr/sourcenav). % mkdir snbuild ; cd snbuild % ../sourcenav-5.0.1/configure --prefix=/usr/sourcenav % make % make install Windows Build (VC++): Building under Windows is more tricky when compared to the UNIX build. Be sure to follow the build instructions exactly. Note that VC++ 6.0 is the only supported compiler at this time. Windows versions of Source-Navigator are created using the VC++ compiler and Cygwin. One needs to run the vcvars32.bat script to setup the needed env vars. Typically, this is done by starting command.com on Windows 95/98 or cmd.exe under NT, then run the vcvars32.bat script in the VC++ bin directory. After VC++ env vars are setup, start a bash shell by cd'ing to the Cygwin root directory and running cygwin.bat. In the bash shell, run the following commands. % export CC=cl % export CFLAGS="-Z7 -Od" You can now run the configure script in the normal way. Of course, there are a couple of things to take note of. First, the configure script must be run with a relative path (../sourcenav-5.0.1/configure). Second, the --prefix path must be passed as a fully qualified Windows style path containing forward slashes (like D:/Cygwin/usr/sourcenav). The following example shows how /usr/sourcenav mounted at D:/Cygwin/usr/sourcenav would be passed. % mkdir snbuild ; cd snbuild % ../sourcenav-5.0.1/configure --prefix=D:/Cygwin/usr/sourcenav % make % make install From maliha032@yahoo.com Thu Jun 14 03:19:00 2001 From: maliha032@yahoo.com (Maliha) Date: Thu, 14 Jun 2001 03:19:00 -0000 Subject: SN for Windows?? Message-ID: <20010614101856.86826.qmail@web13906.mail.yahoo.com> hi Is there a source nav that can run on windows? Do let me know. Regards Maliha __________________________________________________ Do You Yahoo!? Spot the hottest trends in music, movies, and more. http://buzz.yahoo.com/ From amelinte@ALIS.COM Thu Jun 14 11:04:00 2001 From: amelinte@ALIS.COM (Aurelian Melinte) Date: Thu, 14 Jun 2001 11:04:00 -0000 Subject: Suggestions Message-ID: <4.2.1.20010614140023.00aa9d00@192.168.60.239> Hello, I have been using Source Navigator (excellent tool!) for a while and I would have a few improvement ideas: a) line numbering in the editor window b) a menu item for the editor "go to line" b) possibility to hex edit (displaying ascii and eventually ebcdic) d) let the user do file differences between any files, not only between revisions (eventually integrate a tool like tkdiff in the menu) e) the view menu should permit multiple selections so that I can view, for example, both functions and variables Regards, A. From irox@hell.com Thu Jun 14 11:38:00 2001 From: irox@hell.com (irox@hell.com) Date: Thu, 14 Jun 2001 11:38:00 -0000 Subject: SN for Windows?? References: <20010614101856.86826.qmail@web13906.mail.yahoo.com> Message-ID: On Thu, 14 Jun 2001, Maliha wrote: > Is there a source nav that can run on windows? Do let > me know. Yes. Go here: http://sources.redhat.com/sourcenav/download.html Find a mirrow and download the latest (SN5.0) Windows binary. The Windows version is compiled from the same source as the *inx version. Ian. From irox@hell.com Thu Jun 14 11:41:00 2001 From: irox@hell.com (irox@hell.com) Date: Thu, 14 Jun 2001 11:41:00 -0000 Subject: how to install source navigator References: <3B27BCA0.20659085@iro.umontreal.ca> Message-ID: On Wed, 13 Jun 2001, Shiqiang Shen wrote: > Sir, > I downloaded version 5.0 under linux but don't know how to install it. Assuming that you have the binary. You should be able to run it from the directory you untar'd it into. If you are running a more off-beat or custom linux version then you may want to download and build the source (this will avoid any library version mismatches some people have complained about). Ian. From neeam@yahoo.com Fri Jun 15 10:47:00 2001 From: neeam@yahoo.com (Subrata Datta) Date: Fri, 15 Jun 2001 10:47:00 -0000 Subject: snav editor Message-ID: <20010615174720.63633.qmail@web11605.mail.yahoo.com> Hi I would like to get information on how get multiple editor windows (for side by side code analysis) using default snav editor( right click button is really great). It would be nice to have this feature. If this feature is not there currently pl. point me the relavant files/hints I could hack to get this working. regards, sd. __________________________________________________ Do You Yahoo!? Spot the hottest trends in music, movies, and more. http://buzz.yahoo.com/ From mdejong@cygnus.com Fri Jun 15 13:35:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Fri, 15 Jun 2001 13:35:00 -0000 Subject: two quesutions.. References: <20010606003716.5328.qmail@web11608.mail.yahoo.com> Message-ID: On Tue, 5 Jun 2001, Subrata Datta wrote: > 2. How to get mutiple editor screens so that I can view/edit > to source files side by side. >From the symbol browser: Select Menu File->Project Preferences Choose the Project tab In the Window area select Horizontal for the Split Windows item Hit the Ok button Open a new editor Select Menu Windows->Add View->Editor You should now have two editors side by side. This can also be done with the Ctrl-F5 shortcut. Mo DeJong Red Hat Inc From mdejong@cygnus.com Fri Jun 15 14:10:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Fri, 15 Jun 2001 14:10:00 -0000 Subject: Can't build under 5.0 install/Linux. References: <0106081817350N.11872@incognito.switchco.com> Message-ID: On Fri, 8 Jun 2001, Benjamin Scherrey wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Oops - spoke too soon. In my project, when I bring up the build window, the > Directory field entry is greyed out. When I try to run make I get a window > saying "" The Directory "" cannot be created. "". I click OK and it tries to > run make but its not in the right directory so it doesn't work. This seems to be a problem with the combo box widget. The first entry should be selected by default. I think it will work if you just bring up the combo and select by hand. Mo From neeam@yahoo.com Fri Jun 15 16:38:00 2001 From: neeam@yahoo.com (Subrata Datta) Date: Fri, 15 Jun 2001 16:38:00 -0000 Subject: two questions.. References: Message-ID: <20010615233828.60058.qmail@web11601.mail.yahoo.com> Thanks! This is not what I'm looking for. There should be a way to do two separate instances(windows) of editor such that once can be stack on another. Given some hints I'll try make it work that way.. sd --- Mo DeJong wrote: > On Tue, 5 Jun 2001, Subrata Datta wrote: > > > 2. How to get mutiple editor screens so that I can view/edit > > to source files side by side. > > From the symbol browser: > > Select Menu File->Project Preferences > Choose the Project tab > > In the Window area select Horizontal for the Split Windows item > Hit the Ok button > > Open a new editor > > Select Menu Windows->Add View->Editor > > You should now have two editors side by side. > > This can also be done with the Ctrl-F5 shortcut. > > Mo DeJong > Red Hat Inc ===== Subrata Datta ---------------- neeam@yahoo.com __________________________________________________ Do You Yahoo!? Spot the hottest trends in music, movies, and more. http://buzz.yahoo.com/ From marc@computer.org Sun Jun 17 14:48:00 2001 From: marc@computer.org (Marc Mosko) Date: Sun, 17 Jun 2001 14:48:00 -0000 Subject: Thank you thank you thank you! Message-ID: <3B2D25BD.BB9D2C2B@computer.org> I recently found snavigator and run it on my sparc. It's really easy to learn and use. I'm sure there's tons of powerful features I know nothing about, but it has made my life of C++ and Makefiles so much easier. Marc Mosko From amelinte@ALIS.COM Mon Jun 18 08:14:00 2001 From: amelinte@ALIS.COM (Aurelian Melinte) Date: Mon, 18 Jun 2001 08:14:00 -0000 Subject: can I add two or more buttons in the toolbar Message-ID: <4.2.1.20010618111756.00ac5660@192.168.60.239> hello, I just tried to add two buttons in the sourcenav's toolbar, by declaring two sn_rc_symbolbrowser procedures in rc.tcl (obviously wrong :)) hoping to end up with two buttons. Only the last one shows. Is there a way to add two or more Thanks, A. -- ame00(at@)altern(dot.)org ame01(at@)gmx(dot.)net From irox@hell.com Mon Jun 18 12:04:00 2001 From: irox@hell.com (irox@hell.com) Date: Mon, 18 Jun 2001 12:04:00 -0000 Subject: can I add two or more buttons in the toolbar References: <4.2.1.20010618111756.00ac5660@192.168.60.239> Message-ID: On Mon, 18 Jun 2001, Aurelian Melinte wrote: > hello, > > I just tried to add two buttons in the sourcenav's toolbar, by declaring > two sn_rc_symbolbrowser procedures in rc.tcl (obviously wrong :)) hoping to > end up with two buttons. Only the last one shows. declaring two procs with the same name deletes the first one. You need to put the code to add both buttons in the same sn_rc_symbolbrowser (or put them in seperate procs if you like and call them from sn_rc_symbolbrowser). Ian From amelinte@ALIS.COM Mon Jun 18 13:03:00 2001 From: amelinte@ALIS.COM (Aurelian Melinte) Date: Mon, 18 Jun 2001 13:03:00 -0000 Subject: can I add two or more buttons in the toolbar References: <4.2.1.20010618111756.00ac5660@192.168.60.239> Message-ID: <4.2.1.20010618160738.00aac470@alis-2> At 12:01 PM 6/18/01 -0700, irox@hell.com wrote: >On Mon, 18 Jun 2001, Aurelian Melinte wrote: > > > hello, > > > > I just tried to add two buttons in the sourcenav's toolbar, by declaring > > two sn_rc_symbolbrowser procedures in rc.tcl (obviously wrong :)) > hoping to > > end up with two buttons. Only the last one shows. > >declaring two procs with the same name deletes the first one. >You need to put the code to add both buttons in the same >sn_rc_symbolbrowser (or put them in seperate procs if you like >and call them from sn_rc_symbolbrowser). > >Ian Got things working fine! Thanks! A. From scherrey@innoverse.com Mon Jun 18 15:08:00 2001 From: scherrey@innoverse.com (Benjamin Scherrey) Date: Mon, 18 Jun 2001 15:08:00 -0000 Subject: Can't build under 5.0 install/Linux. References: Message-ID: <01061818040203.20987@incognito.switchco.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mo, Thanx, that did it. BTW - do I need to file a bug report on this or will it be taken care of? regards, Ben Scherrey On Friday 15 June 2001 05:10 pm, Mo DeJong wrote: > On Fri, 8 Jun 2001, Benjamin Scherrey wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Oops - spoke too soon. In my project, when I bring up the build window, > > the Directory field entry is greyed out. When I try to run make I get a > > window saying "" The Directory "" cannot be created. "". I click OK and > > it tries to run make but its not in the right directory so it doesn't > > work. > > This seems to be a problem with the combo box widget. The first entry > should be selected by default. I think it will > work if you just bring up the combo and select by > hand. > > Mo -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.8 iQA/AwUBOy5612j9nzX41wUgEQJJuwCg0j+b811xmskeGCvF8xJQtTOB+UUAoNbC HmZ0HhEqpHhvEEJlUbSjv/SB =feev -----END PGP SIGNATURE----- From mdejong@cygnus.com Mon Jun 18 23:11:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Mon, 18 Jun 2001 23:11:00 -0000 Subject: Can't build under 5.0 install/Linux. References: <01061818040203.20987@incognito.switchco.com> Message-ID: On Mon, 18 Jun 2001, Benjamin Scherrey wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Mo, > > Thanx, that did it. BTW - do I need to file a bug report > on this or will it be taken care of? > > regards, > > Ben Scherrey You should file a bug report. Mo From mdejong@cygnus.com Tue Jun 19 12:50:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Tue, 19 Jun 2001 12:50:00 -0000 Subject: Getting SN5 to run as normal user... References: <0106081758120M.11872@incognito.switchco.com> Message-ID: On Fri, 8 Jun 2001, Benjamin Scherrey wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Thanx much. Turned out the directories > /usr/local/share/sourcenav/[gui|packages] did not have their permissions > correctly set. Now its fixed and I seem to be up to the new 5.x SN! Thanx > guys & great work! > > later, > > Ben Scherrey Ben. I have tried this a couple of times under Linux (RH 6.2) and I can't reproduce the error. Perhaps it has something to do with the default umask or the mkinstalldirs dirs script. What system were you building on when you ran into the problem? Mo From cunitt@Catena.com Tue Jun 19 14:53:00 2001 From: cunitt@Catena.com (Christie Unitt) Date: Tue, 19 Jun 2001 14:53:00 -0000 Subject: Can't edit anything anymore in SNAV 5.0 Message-ID: <522FDAAFD532D511A0AB0002A51390EBF002F6@cat01s2.catena.com> Hi, I sent this as a bug report to support@cygnus.com. I'm not sure the best process for reporting this problem. I successfully installed Source Navigator 5.0 on my WinNT4 machine and was using it with no problems. I was experimenting with changing the colour preferences when I managed to save as default a blank value for the background text of the editor. Since that time I am now unable to open the editor on any file. I have tried deleting and re-installing the snav. I have also tried creating new projects. Please help. I have also tried to change the colour option using the Project Preferences from the Symbols window. Is there a registry entry or file which I can delete somewhere to get rid of this problem. I don't mind losing all preference info, I just want to be able to edit again! Thanks for your help. The text from the bug report follows. Cheers, Christie unknown color name "" (processing "-background" option) invoked from within "$itk_component(editor) configure -font $sn_options(def,edit-font) -fg $sn_options(def,edit-fg) -bg $sn_options(def,edit-bg) -selectforeground $sn_..." (object "::.multiwindow-4.nbook.nbframe.edit.paned.edit.editor" method "::Editor&::Update_Layout" body line 5) invoked from within "Update_Layout" while constructing object "::.multiwindow-4.nbook.nbframe.edit.paned.edit.editor" in ::Editor&::constructor (body line 102) invoked from within "Editor& $itk_component(editorpane).editor -symbols $itk_component(symbolcombo) -symbols_filter ${SymbolsFilter} -menu $itk_component(menu) -toolbar ""..." (while creating component "editor" for widget "::.multiwindow-4") (object "::.multiwindow-4" method "::itk::Archetype::itk_component" ) invoked from within "itk_component add editor { Editor& $itk_component(editorpane).editor -symbols $itk_component(symbolcombo) -symbols_filter ${SymbolsFilter} -menu ..." (object "::.multiwindow-4" method "::MultiWindow&::AddEditor" body line 18) invoked from within "AddEditor $itk_component(notebook) edit" while constructing object "::.multiwindow-4" in ::MultiWindow&::constructor (body line 38) invoked from within "MultiWindow& ${name} -symbolname ${file} -raise edit" (procedure "::Editor&::EditFile" body line 155) invoked from within "Editor&::EditFile ${symbol} ${file} ${line} ${search} ${state}" (procedure "sn_edit_file" line 7) invoked from within "sn_edit_file f ${file}" (procedure "edit_member" line 60) invoked from within "edit_member ${w}" (procedure "edit_symbol" line 3) invoked from within "edit_symbol .multisymbr-1.symbr.list.tree" (command bound to event) From corsepiu@faw.uni-ulm.de Tue Jun 19 14:56:00 2001 From: corsepiu@faw.uni-ulm.de (Ralf Corsepius) Date: Tue, 19 Jun 2001 14:56:00 -0000 Subject: Can't build under 5.0 install/Linux. References: Message-ID: <3B2FCA8D.93F92228@faw.uni-ulm.de> Mo DeJong wrote: > > On Mon, 18 Jun 2001, Benjamin Scherrey wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Mo, > > > > Thanx, that did it. BTW - do I need to file a bug report > > on this or will it be taken care of? > > > > regards, > > > > Ben Scherrey > > You should file a bug report. I think, this bug is identical to what I had filed as bug #57 Ralf From bciceron@rsn.hp.com Tue Jun 19 14:58:00 2001 From: bciceron@rsn.hp.com (bciceron@rsn.hp.com) Date: Tue, 19 Jun 2001 14:58:00 -0000 Subject: cvs checkout References: Message-ID: hello, i cannot find a way to check out a file from cvs if the object is not already added to the project , am i right ? if so this means i have to check out an entire module from cvs then create a project for snav (a GREAT product BTW) then add it . i was expecting to check out from cvs with snav then add... regards, ben From mdejong@cygnus.com Tue Jun 19 15:03:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Tue, 19 Jun 2001 15:03:00 -0000 Subject: Can't build under 5.0 install/Linux. References: <3B2FCA8D.93F92228@faw.uni-ulm.de> Message-ID: On Tue, 19 Jun 2001, Ralf Corsepius wrote: > Mo DeJong wrote: > > > > On Mon, 18 Jun 2001, Benjamin Scherrey wrote: > > > > > -----BEGIN PGP SIGNED MESSAGE----- > > > Hash: SHA1 > > > > > > Mo, > > > > > > Thanx, that did it. BTW - do I need to file a bug report > > > on this or will it be taken care of? > > > > > > regards, > > > > > > Ben Scherrey > > > > You should file a bug report. > I think, this bug is identical to what I had filed as bug #57 > > Ralf Bug 57 seems to be related to the need for a special parser for Makefiles. http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=57&database=sourcenav Was it some other bug number? Mo From khamis2@t-online.de Tue Jun 19 16:24:00 2001 From: khamis2@t-online.de (Khamis Abuelkomboz UUNET) Date: Tue, 19 Jun 2001 16:24:00 -0000 Subject: Visual Basic Parser & Auto-Highlighter Message-ID: <3B2FDF09.5000602@knuut.de> Hi All, I found the time to write a new parser for Source-Navigator, it's for visual basic, for more details please look at http://khamis.do-is.com/sn I saw some stuff about a new VB parser in SN5.0 source code, but it seems to be on the first steps and I wasn't sure, that this work will continue! Enjoy it! khamis From jschmalz@syskonnect.de Wed Jun 20 00:11:00 2001 From: jschmalz@syskonnect.de (Joachim Schmalz) Date: Wed, 20 Jun 2001 00:11:00 -0000 Subject: Built under SN 5.0 for Windows Message-ID: <01062009083301.00321@jschmalz-lin> Hello, i use SN under Linux and Windows. When i start built under the 5.0 SN Windows Version i only get the message ++End++. Where are the other comments from gcc and Errors and so on. I get these Informations in the Linux Version 4.5.2. In the moment i use a external makefile for GCC-Make. regards Joachim Schmalz jschmalz@syskonnect.de From helmut.herrmann@aeon.de Wed Jun 20 05:59:00 2001 From: helmut.herrmann@aeon.de (Helmut Herrmann) Date: Wed, 20 Jun 2001 05:59:00 -0000 Subject: Target order Message-ID: <000201c0f989$3c2705c0$f2029fc1@helmut> Hello, I am working on a project consisting of about 80 targets, 40 debug and release targets each. Is it possible to sort these targets in the Build Settings dialog? Currently, it is quite cumbersome to find a specific target. Thank you for any answer. Regards, Helmut Herrmann From irox@redhat.com Wed Jun 20 11:18:00 2001 From: irox@redhat.com (Ian Roxborough) Date: Wed, 20 Jun 2001 11:18:00 -0000 Subject: cvs checkout References: Message-ID: <3B30E826.D9C23C3A@redhat.com> bciceron@rsn.hp.com wrote: > > hello, > > i cannot find a way to check out a file from cvs if the object is not > already added to the project , am i right ? Kind of, we don't have a cvs repository yet. > if so this means i have to check out an entire module from cvs then create > a project for snav (a GREAT product BTW) then add it . > > i was expecting to check out from cvs with snav then add... We are working on it, however they are some tasks which we are currently working on, like upgrading Insight (and test tools, etc.) to run with the same version of Tcl/Tk Source Navigator uses, before we can add Source-Navigator to cvs. Source-Navigator should be in cvs some time over the next month or two. Ian. From bciceron@rsn.hp.com Wed Jun 20 11:37:00 2001 From: bciceron@rsn.hp.com (bciceron@rsn.hp.com) Date: Wed, 20 Jun 2001 11:37:00 -0000 Subject: cvs checkout References: <3B30E826.D9C23C3A@redhat.com> Message-ID: hi Ian and y'all, thx for you answer, let me ask you the same question for any project. snav allows us to use cvs as the source repo and look at cvs history or logs and also checkout but we cannot check out a project if it is not already part of it, can we ? so the btom line is in order to to a cvs history on a file , of an existing project , i have to manually check out by doing cvs co on the command line then go to snav to do the retrieve the history. is there a shortcut allowing me to do thewhole thing from snav ? thx, ben- On Wed, 20 Jun 2001, Ian Roxborough wrote: -- bciceron@rsn.hp.com wrote: -- > -- > hello, -- > -- > i cannot find a way to check out a file from cvs if the object is not -- > already added to the project , am i right ? -- -- Kind of, we don't have a cvs repository yet. -- -- > if so this means i have to check out an entire module from cvs then create -- > a project for snav (a GREAT product BTW) then add it . -- > -- > i was expecting to check out from cvs with snav then add... -- -- We are working on it, however they are some tasks which we -- are currently working on, like upgrading Insight (and test -- tools, etc.) to run with the same version of Tcl/Tk Source -- Navigator uses, before we can add Source-Navigator to cvs. -- -- Source-Navigator should be in cvs some time over the -- next month or two. -- -- Ian. -- Regards, ben- ---PIM Team Lead---Unix Web Dvlpmnt---ITApp Group---HP Rsn Tx---T497-4773 From irox@redhat.com Wed Jun 20 11:54:00 2001 From: irox@redhat.com (Ian Roxborough) Date: Wed, 20 Jun 2001 11:54:00 -0000 Subject: cvs checkout References: Message-ID: <3B30F091.C3E840BA@redhat.com> HEHe, ok I totally gave you the answer to a different question.... :-) "Can I check sounce-navigator out of cvs? no... d'uh." bciceron@rsn.hp.com wrote: > let me ask you the same question for any project. > snav allows us to use cvs as the source repo and look at cvs history or > logs and also checkout but we cannot check out a project if it is not > already part of it, can we ? Correct. > so the btom line is in order to to a cvs history on a file , of an > existing project , i have to manually check out by doing cvs co on the > command line then go to snav to do the retrieve the history. > is there a shortcut allowing me to do thewhole thing from snav ? Unfortunately not. Maybe future version will let you create SN project by browsing cvs reprositories and such, but for the time being there are just somethings that our cvs feature doesn't handle well. Ian. From corsepiu@faw.uni-ulm.de Wed Jun 20 14:14:00 2001 From: corsepiu@faw.uni-ulm.de (Ralf Corsepius) Date: Wed, 20 Jun 2001 14:14:00 -0000 Subject: Can't build under 5.0 install/Linux. References: Message-ID: <3B31120E.A8574B7@faw.uni-ulm.de> Mo DeJong wrote: > > On Tue, 19 Jun 2001, Ralf Corsepius wrote: > > > Mo DeJong wrote: > > > > > > On Mon, 18 Jun 2001, Benjamin Scherrey wrote: > > > > > > > -----BEGIN PGP SIGNED MESSAGE----- > > > > Hash: SHA1 > > > > > > > > Mo, > > > > > > > > Thanx, that did it. BTW - do I need to file a bug report > > > > on this or will it be taken care of? > > > > > > > > regards, > > > > > > > > Ben Scherrey > > > > > > You should file a bug report. > > I think, this bug is identical to what I had filed as bug #57 > > > > Ralf > > Bug 57 seems to be related to the need for a special parser > for Makefiles. > > http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=57&database=sourcenav > > Was it some other bug number? Sorry, my fault. I was referring to #56 Ralf From khamis2@t-online.de Wed Jun 20 14:16:00 2001 From: khamis2@t-online.de (Khamis Abuelkomboz) Date: Wed, 20 Jun 2001 14:16:00 -0000 Subject: Can't edit anything anymore in SNAV 5.0 References: <522FDAAFD532D511A0AB0002A51390EBF002F6@cat01s2.catena.com> Message-ID: <3B311296.1070302@t-online.de> You should delete the saved SN-prefrences file %PROFILE%/.sn/project.pre This will fix the problem, blank entries in the preferences for colors or fonts will cause this problem. Khamis Christie Unitt wrote: > Hi, > > I sent this as a bug report to support@cygnus.com. I'm not sure the best > process for reporting this problem. > > I successfully installed Source Navigator 5.0 on my WinNT4 machine and was > using it with no problems. I was experimenting with changing the colour > preferences when I managed to save as default a blank value for the > background text of the editor. Since that time I am now unable to open the > editor on any file. I have tried deleting and re-installing the snav. I have > also tried creating new projects. Please help. I have also tried to change > the colour option using the Project Preferences from the Symbols window. Is > there a registry entry or file which I can delete somewhere to get rid of > this problem. I don't mind losing all preference info, I just want to be > able to edit again! > > Thanks for your help. The text from the bug report follows. > > Cheers, > Christie > > unknown color name "" > (processing "-background" option) > invoked from within > "$itk_component(editor) configure -font $sn_options(def,edit-font) -fg > $sn_options(def,edit-fg) -bg $sn_options(def,edit-bg) -selectforeground > $sn_..." > (object "::.multiwindow-4.nbook.nbframe.edit.paned.edit.editor" method > "::Editor&::Update_Layout" body line 5) > invoked from within > "Update_Layout" > while constructing object > "::.multiwindow-4.nbook.nbframe.edit.paned.edit.editor" in > ::Editor&::constructor (body line 102) > invoked from within > "Editor& $itk_component(editorpane).editor -symbols > $itk_component(symbolcombo) -symbols_filter ${SymbolsFilter} -menu > $itk_component(menu) -toolbar ""..." > (while creating component "editor" for widget "::.multiwindow-4") > (object "::.multiwindow-4" method "::itk::Archetype::itk_component" ) > invoked from within > "itk_component add editor { > Editor& $itk_component(editorpane).editor -symbols > $itk_component(symbolcombo) -symbols_filter ${SymbolsFilter} -menu ..." > (object "::.multiwindow-4" method "::MultiWindow&::AddEditor" body line > 18) > invoked from within > "AddEditor $itk_component(notebook) edit" > while constructing object "::.multiwindow-4" in > ::MultiWindow&::constructor (body line 38) > invoked from within > "MultiWindow& ${name} -symbolname ${file} -raise edit" > (procedure "::Editor&::EditFile" body line 155) > invoked from within > "Editor&::EditFile ${symbol} ${file} ${line} ${search} ${state}" > (procedure "sn_edit_file" line 7) > invoked from within > "sn_edit_file f ${file}" > (procedure "edit_member" line 60) > invoked from within > "edit_member ${w}" > (procedure "edit_symbol" line 3) > invoked from within > "edit_symbol .multisymbr-1.symbr.list.tree" > (command bound to event) > > From David.Robinson@citrix.com.au Wed Jun 20 21:29:00 2001 From: David.Robinson@citrix.com.au (David Robinson (AU)) Date: Wed, 20 Jun 2001 21:29:00 -0000 Subject: Accessing the Source Navigator project database using PHP4 Message-ID: Folks Has anyone used PHP4 to access the Source Navigator database (.SNPRJ files)? I have tried the dbmopen() routines and dba_open(..., ..., "dbm") routines without success. 'Warning: no such handler: dbm in "dba.php" on line 26' The SN database is apparently based on Berkeley DB 1.85 (Is this called the DB1 format?). If you are able to access the project database using PHP4 I would be interested to hear the details. Regards David Robinson From dwilson2@cig.mot.com Thu Jun 21 09:10:00 2001 From: dwilson2@cig.mot.com (Dave Wilson {DWILSON2}) Date: Thu, 21 Jun 2001 09:10:00 -0000 Subject: Two SN Issues References: <01062009083301.00321@jschmalz-lin> Message-ID: I am using SN 5.0.0 in unix, perhaps you can help... First, is there a way for more than one person to work on a project at the same time? Second, I had a project open and SN was exited improperly. Now when I try to open the project I was working on SN complains that I already have the project open on a different machine. How can I open this project again? Thanks, ~Dave From mdejong@cygnus.com Thu Jun 21 12:12:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 21 Jun 2001 12:12:00 -0000 Subject: Two SN Issues References: Message-ID: On Thu, 21 Jun 2001, Dave Wilson {DWILSON2} wrote: > > I am using SN 5.0.0 in unix, perhaps you can help... > > First, is there a way for more than one person to work on a project at > the same time? No. Getting that working would require quite a bit of work on the database layer. > Second, I had a project open and SN was exited improperly. Now when I > try to open the project I was working on SN complains that I already > have the project open on a different machine. How can I open this > project again? That is currently broken in the 5.0 release. The fix is to add a lock file that can be removed manually, but we have not had time to implement that yet. Mo DeJong Red Hat Inc From mdejong@cygnus.com Thu Jun 21 14:01:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 21 Jun 2001 14:01:00 -0000 Subject: Target order References: <000201c0f989$3c2705c0$f2029fc1@helmut> Message-ID: On Wed, 20 Jun 2001, Helmut Herrmann wrote: > Hello, > > I am working on a project consisting of about 80 targets, 40 debug and > release targets each. Is it possible to sort these targets in the Build > Settings dialog? Currently, it is quite cumbersome to find a specific > target. Thank you for any answer. > > Regards, > Helmut Herrmann You would have to modify the code to do custom sorting. If you are interested in doing this, I suggest you start poking around in snavigator/gui/targetmgr.tcl. There is a block of code like so in the CreateDialog method: # Get a list of targets set targets [GetTargetsList] foreach target ${targets} { $itk_component(tmlist) insert end ${target} sn_log "IDE_DEBUG: target = <${target}>" } You could sort the list before adding it to the list widget at that point. Mo DeJong Red Hat Inc From Michael_Lombardo@Ademco.com Wed Jun 27 07:23:00 2001 From: Michael_Lombardo@Ademco.com (Michael_Lombardo@Ademco.com) Date: Wed, 27 Jun 2001 07:23:00 -0000 Subject: source navigator Message-ID: <2DF7C54A75BDD311B61700508B64231001448B62@NYHQEX1> Hello, I am lookng for build instructions for source navigator. Can you help? From jazzman@bayarea.net Wed Jun 27 09:09:00 2001 From: jazzman@bayarea.net (Syd Polk) Date: Wed, 27 Jun 2001 09:09:00 -0000 Subject: source navigator Message-ID: <200106271608.JAA37268@postman.bayarea.net> Michael_Lombardo@Ademco.com wrote: >Hello, > >I am lookng for build instructions for source navigator. Can you help? > Assuming you downloaded the source archive, there are build instructions in the file README.TXT. Syd Polk jazzman@bayarea.net http://www.bayarea.net/~jazzman "Let the music be your light." -- Dave Edwards, KUHF-FM, 1982 From rainer.kiehne@tu-clausthal.de Wed Jun 27 09:34:00 2001 From: rainer.kiehne@tu-clausthal.de (Rainer Kiehne) Date: Wed, 27 Jun 2001 09:34:00 -0000 Subject: source navigator References: <200106271608.JAA37268@postman.bayarea.net> Message-ID: <01062718374900.05830@garfield> On Wednesday 27 June 2001 18:08, Syd Polk wrote: > Michael_Lombardo@Ademco.com wrote: > >Hello, > > > >I am lookng for build instructions for source navigator. Can you help? > > Assuming you downloaded the source archive, there are build instructions > in the file README.TXT. > There are source archives which do not contain this file. Or at least not a README with installation instructions. You should look for that file on a ftp mirror. I found it in the same dir as the source tar.gz Rainer -- Rainer Kiehne Leibnizstrasse 22/Zi.96 38678 Clausthal-Zellerfeld rainer.kiehne@tu-clausthal.de From konyala@yahoo-inc.com Wed Jun 27 14:04:00 2001 From: konyala@yahoo-inc.com (Mohan Rk Konyala) Date: Wed, 27 Jun 2001 14:04:00 -0000 Subject: build error with SN5 Message-ID: Hi I am trying to build and install SN5 on FreeBSD4.3. I am getting the foloowing error for make after doing ./configure make all-recursive Making all in PORT "Makefile", line 258: Need an operator make: fatal errors encountered -- cannot continue *** Error code 1 Stop in /home/konyala/source/db. *** Error code 1 Stop in /home/konyala/source/db. *** Error code 1 Stop in /home/konyala/source. Can you please advice Thanks Mohan From irox@redhat.com Wed Jun 27 14:28:00 2001 From: irox@redhat.com (Ian Roxborough) Date: Wed, 27 Jun 2001 14:28:00 -0000 Subject: build error with SN5 References: Message-ID: <3B3A5000.E60E4DC9@redhat.com> Mohan Rk Konyala wrote: > > Hi > > I am trying to build and install SN5 on FreeBSD4.3. I am getting the > foloowing error for make after doing ./configure > > make all-recursive > Making all in PORT > "Makefile", line 258: Need an operator > make: fatal errors encountered -- cannot continue > *** Error code 1 Are you using GNU make? Using a different version of make (i.e. the default installed non-GNU make) seems to cause problems on non-linux platforms. I'm mainly thinking about Solaris, HPUX, etc.. but this could be a BSD problem as well. Ian. From konyala@yahoo-inc.com Wed Jun 27 15:46:00 2001 From: konyala@yahoo-inc.com (Mohan Rk Konyala) Date: Wed, 27 Jun 2001 15:46:00 -0000 Subject: build error with SN5 References: <3B3A5000.E60E4DC9@redhat.com> Message-ID: When I use GNU make I get the following error gmake[2]: Entering directory `/home/konyala/snbuild/tcl8.1/unix' gmake[2]: *** No rule to make target `libtcl81.a', needed by `all'. Stop. gmake[2]: Leaving directory `/home/konyala/snbuild/tcl8.1/unix' gmake[1]: *** [all] Error 2 gmake[1]: Leaving directory `/home/konyala/snbuild/tcl8.1' Can you please help? THanks Mohan On Wed, 27 Jun 2001, Ian Roxborough wrote: > Mohan Rk Konyala wrote: > > > > Hi > > > > I am trying to build and install SN5 on FreeBSD4.3. I am getting the > > foloowing error for make after doing ./configure > > > > make all-recursive > > Making all in PORT > > "Makefile", line 258: Need an operator > > make: fatal errors encountered -- cannot continue > > *** Error code 1 > > Are you using GNU make? > > Using a different version of make (i.e. the default installed > non-GNU make) seems to cause problems on non-linux platforms. > I'm mainly thinking about Solaris, HPUX, etc.. but this could > be a BSD problem as well. > > Ian. > > From mdejong@cygnus.com Thu Jun 28 16:08:00 2001 From: mdejong@cygnus.com (Mo DeJong) Date: Thu, 28 Jun 2001 16:08:00 -0000 Subject: source navigator References: <01062718374900.05830@garfield> Message-ID: On Wed, 27 Jun 2001, Rainer Kiehne wrote: > On Wednesday 27 June 2001 18:08, Syd Polk wrote: > > Michael_Lombardo@Ademco.com wrote: > > >Hello, > > > > > >I am lookng for build instructions for source navigator. Can you help? > > > > Assuming you downloaded the source archive, there are build instructions > > in the file README.TXT. > > > There are source archives which do not contain this file. Or at least not a > README with installation instructions. You should look for that file on a ftp > mirror. I found it in the same dir as the source tar.gz Sorry, we have not put up a release with that file in it. You will have to look at the mailing list archive. http://sources.redhat.com/ml/sourcenav/2001-q2/msg00225.html Mo DeJong Red Hat Inc From amelinte@ALIS.COM Fri Jun 29 07:02:00 2001 From: amelinte@ALIS.COM (Aurelian Melinte) Date: Fri, 29 Jun 2001 07:02:00 -0000 Subject: replace Message-ID: <4.2.1.20010629095734.00af2800@192.168.60.239> Hello, Is there a way to change the name of a class or variable in all the source files at once? What I mean is: If I want to change the name of a class from ClassA to NewClass, currently I grep through the files and then I edit all the findings , one by one. It there a better/faster way Thanks, A.