Author Topic: What is the correct way to refresh files and retag them?  (Read 7694 times)

greggman

  • Senior Community Member
  • Posts: 277
  • Hero Points: 14
What is the correct way to refresh files and retag them?
« on: April 17, 2013, 11:01:47 pm »
I have a project with a lot of files. I have the files added using recursive wild cards *.cpp, etc..

Question #1: What's the proper way to refresh the files supplied in the Open dialog?

I tried Project->Project Properties, Files tab, select all, Refresh

This seems to do absolutely nothing.

Quiting Slickedit and re-starting it finally worked. I'd like to know what the correct way to do it is without having to restart slickedit

Question #2: How do I retag correctly?

After doing the refresh from Question #1 I picked Project->Retag Workspace and clicked okay in the Rebuild Tag File dialog. Slickedit went off and tagged 80k files. I then went to a class, pressed Ctrl-H (push-tag), the select symbol dialog appeared. I picked the one I was interested in and was told "Path not found" WTF?! :-(

I just refreshed and retagged, there should be no stale references.

So again, how do I do this "correctly" in slickedit so I get current and correct files and tags?

Gilvin

  • Community Member
  • Posts: 86
  • Hero Points: 1
Re: What is the correct way to refresh files and retag them?
« Reply #1 on: April 18, 2013, 07:34:08 am »
I use workspace-retag command, but not sure if it's the correct one.

kchalmer

  • Community Member
  • Posts: 37
  • Hero Points: 3
Re: What is the correct way to refresh files and retag them?
« Reply #2 on: June 11, 2013, 03:16:13 pm »
For question #1: Project menu -> Refresh works for me.  Hopefully it'll help with #2 as well?  If not, maybe Tools -> Tag Files, select your workspace tag file, then "Rebuild Tag File..." will be a bit more comprehensive?

    -Ken

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: What is the correct way to refresh files and retag them?
« Reply #3 on: June 12, 2013, 04:51:36 pm »
Another possibility -- Could the stale paths be coming from a different tag file, i.e. not the workspace tag file?

Anyway, here's how to do a full clean rebuild of the tag file:

1. exit SE
2. delete vtg file
3. start SE
4. rebuild tag file

I have to do that periodically.  There seems to be some kind of long standing issue where tag files either accumulate stale references or get corrupted, I don't know what's happening.  I assume the reason it still exists is because it's difficult (as in unknown how) to reproduce on demand and therefore difficult to find a root cause and fix.  If there were a public tool to analyze the health of a vtg file (and report details and statistics, beyond just a Boolean "ok/bad") it would be much easier to help the SE team track these things down (and to accurately characterize them).

It doesn't seem to be a significant pain point for me, though, so as far as I can tell it seems reasonable for it to be middle-to-low in the priority queue.

storkinsj

  • Community Member
  • Posts: 11
  • Hero Points: 3
Re: What is the correct way to refresh files and retag them?
« Reply #4 on: May 15, 2020, 04:45:06 am »
Oddly, this is also a problem in much later versions- I am using Mac Slickedit pro 2017.

The tag file I have for my project has a fixed set of files it created when I added the tree. Once it's been created, there is no way to "add tree" "add files" or even remove the tag file from the workspace/project. Having to go behind Slickedit and delete the tag file is a really big UI flaw IMHO.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2959
  • Hero Points: 440
Re: What is the correct way to refresh files and retag them?
« Reply #5 on: May 15, 2020, 03:38:15 pm »
chrisant's suggestion to delete the tag file is valid, but it really should be a last resort.  You should never actually need to do that unless you have somehow marked the tag file as read-only, or there is another (maybe zombie) editor holding a lock on the tag file.

Project > Retag Workspace... should do what you want.

    [    ] Retag modified files only
    [ X ] Generate references
    [ X ] Retag files in background when possible

Unchecking "Retag modified files only" rebuilds the workspace tag file from scratch.

Note, that if you select to retag the files in the background, the tag file will not be ready immediately.  If you truly want to force it to rebuild from scratch and be ready right away, uncheck the background option.