Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion EditorExtensions/Classifications/CSS/Base64TaggerProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ public bool EnsureInitialized()
return _tree != null;
}

public event EventHandler<SnapshotSpanEventArgs> TagsChanged;
public event EventHandler<SnapshotSpanEventArgs> TagsChanged
{
add { }
remove { }
}

void BufferChanged(object sender, TextContentChangedEventArgs e)
{
Expand Down
1 change: 0 additions & 1 deletion EditorExtensions/Completion/CSS/CompletionListEntry.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using Microsoft.CSS.Editor;
using Microsoft.CSS.Editor;
using Microsoft.VisualStudio.Language.Intellisense;
using Microsoft.VisualStudio.Text;

Expand Down
14 changes: 14 additions & 0 deletions EditorExtensions/Margin/CoffeeScriptMargin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ public CoffeeScriptMargin()
// Used for project compilation
}

protected override bool CanCompileFileOnSave(string fullPath)
{
if (!WESettings.GetBoolean(WESettings.Keys.GenerateJsFileFromCoffeeScript))
return false;

if (MadsKristensen.EditorExtensions.WEIgnore.TestWEIgnore(fullPath, "compiler", "coffeescript"))
{
Logger.Log(String.Format(CultureInfo.CurrentCulture, "CoffeeScript: The file {0} is ignored by .weignore. Skipping..", Path.GetFileName(fullPath)));
return false;
}
else
return true;
}

public void CompileProject(EnvDTE.Project project)
{
if(project == null)
Expand Down
14 changes: 14 additions & 0 deletions EditorExtensions/Margin/LessMargin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ public LessMargin(string contentType, string source, bool showMargin, ITextDocum
: base(source, MarginName, contentType, showMargin, document)
{ }

protected override bool CanCompileFileOnSave(string fullPath)
{
if (!WESettings.GetBoolean(WESettings.Keys.GenerateCssFileFromLess))
return false;

if (MadsKristensen.EditorExtensions.WEIgnore.TestWEIgnore(fullPath, "compiler", "less"))
{
Logger.Log(String.Format(CultureInfo.CurrentCulture, "LESS: The file {0} is ignored by .weignore. Skipping..", Path.GetFileName(fullPath)));
return false;
}
else
return true;
}

protected override void StartCompiler(string source)
{
string fileName = GetCompiledFileName(Document.FilePath, ".css", UseCompiledFolder);// Document.FilePath.Replace(".less", ".css");
Expand Down
5 changes: 5 additions & 0 deletions EditorExtensions/Margin/MarginBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public MarginBase()
_dispatcher = Dispatcher.CurrentDispatcher;
}

protected abstract bool CanCompileFileOnSave(string path);

protected MarginBase(string source, string name, string contentType, bool showMargin, ITextDocument document)
{
Document = document;
Expand All @@ -51,6 +53,9 @@ protected virtual void Document_FileActionOccurred(object sender, TextDocumentFi
{
if (e.FileActionType == FileActionTypes.ContentSavedToDisk)
{
if (!CanCompileFileOnSave(e.FilePath))
return;

_dispatcher.BeginInvoke(new Action(() =>
{
_provider.Tasks.Clear();
Expand Down
5 changes: 5 additions & 0 deletions EditorExtensions/Margin/MarkdownMargin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ private void InitializeCompiler()
}
}

protected override bool CanCompileFileOnSave(string fullPath)
{
return true;
}

protected override void StartCompiler(string source)
{
InitializeCompiler();
Expand Down
5 changes: 5 additions & 0 deletions EditorExtensions/Margin/TypeScriptMargin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ public TypeScriptMargin(string contentType, string source, bool showMargin, ITex
SetupWatcher();
}

protected override bool CanCompileFileOnSave(string fullPath)
{
return true;
}

protected override void StartCompiler(string source)
{
if (_isFirstRun)
Expand Down
2 changes: 1 addition & 1 deletion EditorExtensions/Source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="5fb7364d-2e8c-44a4-95eb-2a382e30fec7" Version="3.7" Language="en-US" Publisher="Mads Kristensen" />
<Identity Id="5fb7364d-2e8c-44a4-95eb-2a382e30fec7" Version="3.9" Language="en-US" Publisher="Mads Kristensen" />
<DisplayName>Web Essentials 2012</DisplayName>
<Description xml:space="preserve">Adds many useful features to Visual Studio for web developers.</Description>
<MoreInfo>http://vswebessentials.com/</MoreInfo>
Expand Down