Author Topic: Symbols from previous workspaces?  (Read 3857 times)

aleung

  • Community Member
  • Posts: 9
  • Hero Points: 0
Symbols from previous workspaces?
« on: September 08, 2010, 04:40:43 pm »
Hi All,

I'm running SlickEdit 15.0.1.3 with the latest hotfixes on Ubuntu 10.04 and each time I do a references on a function, it'll list the same file twice in the "Select Symbol" window that pops up. e.g. Performing a references on the function, "func" in file1.h, "Select Symbol" pops up with the following:

Select Symbol
Name    File
func    /workbox//src/target//file1.h
func    /workbox/src/target/file1.h

Note: the same file is displayed twice, one with a couple of double forward slashes ("//") and one with only single forward slashes ("/").

It looks like SlickEdit is perhaps caching a previous working directory somewhere, because if I create an entirely new workspace, say in "/firmware/src/target" and I do a references on the same function, I still get the /workbox//src/target//file1.h in the "Select Symbol" window.

Select Symbol
Name    File
func    /workbox//src/target//file1.h
func    /firmware/src/target/file1.h

Looking at the workspace tag file, it only contains the /firmware/src/* files (i.e. /workbox/src/* not listed). Why am I getting the option to use symbols from a previous workspace?

Thanks in advance.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2938
  • Hero Points: 438
Re: Symbols from previous workspaces?
« Reply #1 on: September 08, 2010, 05:50:42 pm »
Are these canononical directories or symbollic links?

Is the previous workspace named the same as the new workspace?  What are the project files named?  The name should not matter, even if they are the same, but I just want to know.  Could you send the workspace and project files (.vpw and .vpj)?

What other tag files do you have for C/C++ and ANSI-C?  Tools > Tag Files...

aleung

  • Community Member
  • Posts: 9
  • Hero Points: 0
Re: Symbols from previous workspaces?
« Reply #2 on: September 08, 2010, 07:02:46 pm »
Dennis,

Thanks for your reply. I think you've led me to the answer, but just to answer your questions:

Quote
Are these canononical directories or symbollic links?
/workbox is a symbolic link
/firmware is not a link

Quote
Is the previous workspace named the same as the new workspace?
The workspaces and projects have different names.

Quote
What other tag files do you have for C/C++ and ANSI-C?  Tools > Tag Files...
I found the following tag file:
"C" Compiler Configuration Tag Files
/home/alex/.slickedit/15.0.1/tagfiles/GCC-4.4-i486-linux-gnu.vtg

Looks like this is the culprit. It contains the /workbox/src/* files. I didn't even bother looking at this originally because of the name. Why would this GCC tag file take files from my previous projects? I deleted the tag file, rebuilt the workspace tag file and things seem to be working now. Thanks!

aleung

  • Community Member
  • Posts: 9
  • Hero Points: 0
Re: Symbols from previous workspaces?
« Reply #3 on: September 09, 2010, 01:32:56 am »
I spoke too soon. The duplicate files (one with double fwd slash and one with single fwd slash) for "Select Symbol" when performing references is back. I removed the GCC vtg file completely and am only using one tag file: the Workspace Tag File. And in that tag file, for all the files currently open, there are two listed: one with double fwd slashes and one with single. The rest of the files in the project (that aren't open) are only listed once, with double fwd slashes. Is this the cause of the duplicate files when "Select Symbol" pops up for <Ctrl+/> ? Or is this normal?

Tools --> Tag Files --> Workspace Tag File:
# files not currently open, double fwd slashes
/workbox//src/target//file1.c
/workbox//src/target//file1.h
/workbox//src/target//file2.c
/workbox//src/target//file2.h
/workbox//src/target//file3.c
/workbox//src/target//file3.h

# files currently open are listed again, but with single fwd slashes
/workbox/src/target/file1.c
/workbox/src/target/file1.h

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Symbols from previous workspaces?
« Reply #4 on: September 09, 2010, 02:32:41 am »
Try opening the VPJ file and making sure the file paths inside do not have duplicate slashes.

Also I recall an issue in the past about duplicate slashes, because if a certain path setting in the project ended with a trailing slash then when SE generated file paths via concatenation the resulting file path would have duplicate slashes.  I tried several combinations of keywords in the forum Search but couldn't find the topic.  Perhaps someone else will remember it.

aleung

  • Community Member
  • Posts: 9
  • Hero Points: 0
Re: Symbols from previous workspaces?
« Reply #5 on: September 12, 2010, 04:15:53 pm »
chrisant,

Thanks for your reply. I think you're on to something. While my .vpj did not have any double slashes, as I mentioned previously, my Workspace Tag File did have double slashes. I believe the cause is the way I launch SlickEdit -- an alias that references a couple of environment variables:

SHARE_HOME=/workbox/
BR_SRC=$SHARE_HOME/src/target/
alias br='/opt/slickedit/bin/vs +new $BR_SRC/br.vpw &'

The alias "br" will expand to /workbox//src/target//br.vpw. When I launch via the "br" alias, my Workspace Tag file contains files with double fwd slashes. Then, each time I open a file, that file *without double slashes* is added to the Workspace Tag File, creating the duplicate symbols when I do references.

I removed the trailing slashes from my environment variables, re-launched SlickEdit and rebuilt tag files and everything looks good. Hopefully that fixes it for good this time! Thanks again for everyone's help.