2014-07-26 07:12:56 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
2014-08-12 13:33:13 +00:00
|
|
|
|
using RainmeterStudio.Core;
|
2014-09-12 10:26:52 +00:00
|
|
|
|
using RainmeterStudio.Core.Editor;
|
2014-08-12 13:33:13 +00:00
|
|
|
|
using RainmeterStudio.Core.Model;
|
2014-07-26 07:12:56 +00:00
|
|
|
|
|
2014-08-12 13:33:13 +00:00
|
|
|
|
namespace RainmeterStudio.TextEditorPlugin
|
2014-07-26 07:12:56 +00:00
|
|
|
|
{
|
2014-08-12 13:33:13 +00:00
|
|
|
|
[PluginExport]
|
2014-07-29 20:35:59 +00:00
|
|
|
|
public class TextEditorFactory : IDocumentEditorFactory
|
2014-07-26 07:12:56 +00:00
|
|
|
|
{
|
|
|
|
|
public IDocumentEditor CreateEditor(IDocument document)
|
|
|
|
|
{
|
2014-07-29 20:35:59 +00:00
|
|
|
|
return new TextEditor((TextDocument)document);
|
2014-07-26 07:12:56 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-07-29 20:35:59 +00:00
|
|
|
|
public bool CanEdit(Type type)
|
2014-07-26 07:12:56 +00:00
|
|
|
|
{
|
2014-07-29 20:35:59 +00:00
|
|
|
|
return type.Equals(typeof(TextDocument));
|
2014-07-26 07:12:56 +00:00
|
|
|
|
}
|
2014-07-29 20:35:59 +00:00
|
|
|
|
}
|
2014-07-26 07:12:56 +00:00
|
|
|
|
}
|