Author Topic: Command for Project Refresh?  (Read 3204 times)

evanratt

  • Senior Community Member
  • Posts: 300
  • Hero Points: 23
Command for Project Refresh?
« on: March 02, 2010, 07:20:59 PM »
I have my project set up using wildcards for the files, which makes it very convenient to retag the project. I open the Projects toolbar, right click on the .vpw or .vpj file, and select Refresh, and any new files that have been added since I last tagged are added to the project, and everything is retagged. Being a keyboard junkie, I would love to be able to bind this function to a key, or at least enter it on the Slick command line. But I can't figure out what command this is actually calling; the most likely suspect is 'projecttbRefresh', but if I enter that on the command line, I get a message "Command is disabled for this object". Anyone know what the command I'm looking for is?

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Command for Project Refresh?
« Reply #1 on: March 02, 2010, 09:28:15 PM »
Here's one way. (I couldn't find an existing method that wasn't reliant on the project toolwindow tree or the tag form being the active window)

#include "slick.sh"
#import "tagform.e"

_command void retag_current_workspace()
{
    if(_workspace_filename :!= '') {
        _project_update_files_retag(true);
    } else {
        message("No workspace open");
    }
}

evanratt

  • Senior Community Member
  • Posts: 300
  • Hero Points: 23
Re: Command for Project Refresh?
« Reply #2 on: March 02, 2010, 10:42:37 PM »
Awesome! Thanks a lot! Works a treat :)