Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Is it possible to create a ProvideEditorExtensionAttribute for files that have no extension

$
0
0

Hi,

I have a VS 2010 VSIX vsPackage that includes a custom editor which works great for files that have an extension (as in FILENAME.MYEXT).  However, I now need to support files that don't have an extension (as in FILENAME).

Using:

  [ProvideEditorExtensionAttribute(typeof(MyEditorFactory), "", 255)]

results in a compile error.

Using:

  [ProvideEditorExtensionAttribute(typeof(MyEditorFactory), ".", 255)]

compiles, but my editor never gets invoked.

I did export the "." blank extension using the following but it didn't help.

   [Export]
    [FileExtension(".")]
    [ContentType(MyContentType)]
    internal static FileExtensionToContentTypeDefinition noFileExtensionToContentTypeDefinition = null;

How can I invoke my custom editor for files that do not have a filename extension in my vsPackage?

Thanks for your help,
Mark


Viewing all articles
Browse latest Browse all 4410

Trending Articles