You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to write an extension to open automatically the CSS file related to a LESS or SASS file in a new vertical tab group. It should create a new tab group if there is not any or use it if there is an existing tab group.
void DoIt()
{
var dte2 = ((IServiceProvider)package).GetService(typeof(SDTE)) as EnvDTE80.DTE2;
var currentActiveWindow = dte2.ActiveWindow;
if (!IsItALessOrSassFile())
return;
var item = dte2.Solution.FindProjectItem(GetTheCssFileNameOfTheCurrentFile());
item = item ?? throw new Exception();
if (item.IsOpen)
return;
var window = item.Open();
// I could not find any property or method to force the window to be opened in a new tab group.
window.Activate();
window.Document.ReadOnly = true;
currentActiveWindow.Activate();
}
I mean the result should be somthing like this.
The text was updated successfully, but these errors were encountered:
I want to write an extension to open automatically the
CSS
file related to aLESS
orSASS
file in a new vertical tab group. It should create a new tab group if there is not any or use it if there is an existing tab group.I mean the result should be somthing like this.
The text was updated successfully, but these errors were encountered: