Home Download Buy Blog Forum Support

Current project name through API

Current project name through API

Postby jbjornson on Tue Aug 09, 2011 8:01 am

Is there a way to get the name of the current project via the API? I'm writing a plugin where I want to store information separately based on project...
jbjornson
 
Posts: 345
Joined: Tue Oct 27, 2009 4:25 pm
Location: Zurich, Switzerland

Re: Current project name through API

Postby alexrussell on Tue Aug 09, 2011 9:13 am

Actually there kinda is. Jon posted this the other day (saying it's currently undocumented but he plans to bring a proper project API out so it probably won't change) but I can't remember it right now. Something like view().getProject().getFilename() or whatever seems the most logical there (haven't done any plugin programming myself so I may be way out with my guess of view().getBlahBlah()).

I can't find it searching the forum right now but I'm sure I saw it the other day!
alexrussell
 
Posts: 74
Joined: Fri Jul 15, 2011 9:06 am

Re: Current project name through API

Postby jbjornson on Tue Aug 09, 2011 11:26 am

There is a setting value "workspace_name" in "Session.sublime_session", but I'm not sure how to access it.

Otherwise I wasn't able to find any undocumented methods that allow access the project...
jbjornson
 
Posts: 345
Joined: Tue Oct 27, 2009 4:25 pm
Location: Zurich, Switzerland


Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 17 guests