Example #1
0
        public static NodeTabSaver TryCreate(IFileTreeNodeDecompiler fileTreeNodeDecompiler, IFileTab tab, IMessageBoxManager messageBoxManager)
        {
            if (tab.IsAsyncExecInProgress)
            {
                return(null);
            }
            var uiContext = tab.UIContext as IDocumentViewer;

            if (uiContext == null)
            {
                return(null);
            }
            var decompiler = (tab.Content as IDecompilerTabContent)?.Decompiler;

            if (decompiler == null)
            {
                return(null);
            }
            var nodes = tab.Content.Nodes.ToArray();

            if (nodes.Length == 0)
            {
                return(null);
            }
            return(new NodeTabSaver(messageBoxManager, tab, fileTreeNodeDecompiler, decompiler, uiContext, nodes));
        }
		DecompileFileTabContentFactory(IFileManager fileManager, IFileTreeNodeDecompiler fileTreeNodeDecompiler, ILanguageManager languageManager, IDecompilationCache decompilationCache, IMethodAnnotations methodAnnotations) {
			this.fileManager = fileManager;
			this.fileTreeNodeDecompiler = fileTreeNodeDecompiler;
			this.languageManager = languageManager;
			this.decompilationCache = decompilationCache;
			this.methodAnnotations = methodAnnotations;
		}
Example #3
0
        public static NodeTabSaver TryCreate(IFileTreeNodeDecompiler fileTreeNodeDecompiler, IFileTab tab, IMessageBoxManager messageBoxManager)
        {
            if (tab.IsAsyncExecInProgress)
            {
                return(null);
            }
            var uiContext = tab.UIContext as ITextEditorUIContext;

            if (uiContext == null)
            {
                return(null);
            }
            var langContent = tab.Content as ILanguageTabContent;
            var lang        = langContent == null ? null : langContent.Language;

            if (lang == null)
            {
                return(null);
            }
            var nodes = tab.Content.Nodes.ToArray();

            if (nodes.Length == 0)
            {
                return(null);
            }
            return(new NodeTabSaver(messageBoxManager, tab, fileTreeNodeDecompiler, lang, uiContext, nodes));
        }
 DecompileFileTabContentFactory(IFileManager fileManager, IFileTreeNodeDecompiler fileTreeNodeDecompiler, ILanguageManager languageManager, IDecompilationCache decompilationCache, IMethodAnnotations methodAnnotations)
 {
     this.fileManager            = fileManager;
     this.fileTreeNodeDecompiler = fileTreeNodeDecompiler;
     this.languageManager        = languageManager;
     this.decompilationCache     = decompilationCache;
     this.methodAnnotations      = methodAnnotations;
 }
Example #5
0
 NodeTabSaver(IMessageBoxManager messageBoxManager, IFileTab tab, IFileTreeNodeDecompiler fileTreeNodeDecompiler, IDecompiler decompiler, IDocumentViewer documentViewer, IFileTreeNodeData[] nodes)
 {
     this.messageBoxManager = messageBoxManager;
     this.tab = tab;
     this.fileTreeNodeDecompiler = fileTreeNodeDecompiler;
     this.decompiler             = decompiler;
     this.documentViewer         = documentViewer;
     this.nodes = nodes;
 }
Example #6
0
 NodeTabSaver(IMessageBoxManager messageBoxManager, IFileTab tab, IFileTreeNodeDecompiler fileTreeNodeDecompiler, ILanguage language, ITextEditorUIContext uiContext, IFileTreeNodeData[] nodes)
 {
     this.messageBoxManager = messageBoxManager;
     this.tab = tab;
     this.fileTreeNodeDecompiler = fileTreeNodeDecompiler;
     this.language = language;
     this.uiContext = uiContext;
     this.nodes = nodes;
 }
Example #7
0
 NodeTabSaver(IMessageBoxManager messageBoxManager, IFileTab tab, IFileTreeNodeDecompiler fileTreeNodeDecompiler, ILanguage language, ITextEditorUIContext uiContext, IFileTreeNodeData[] nodes)
 {
     this.messageBoxManager = messageBoxManager;
     this.tab = tab;
     this.fileTreeNodeDecompiler = fileTreeNodeDecompiler;
     this.language  = language;
     this.uiContext = uiContext;
     this.nodes     = nodes;
 }
Example #8
0
 DecompileFileTabContentFactory(IFileManager fileManager, IFileTreeNodeDecompiler fileTreeNodeDecompiler, ILanguageManager languageManager, IDecompilationCache decompilationCache, IMethodAnnotations methodAnnotations, IContentTypeRegistryService contentTypeRegistryService, [ImportMany] IEnumerable <Lazy <IDocumentViewerCustomDataProvider, IDocumentViewerCustomDataProviderMetadata> > documentViewerCustomDataProviders)
 {
     this.FileManager                       = fileManager;
     this.FileTreeNodeDecompiler            = fileTreeNodeDecompiler;
     this.LanguageManager                   = languageManager;
     this.DecompilationCache                = decompilationCache;
     this.MethodAnnotations                 = methodAnnotations;
     this.ContentTypeRegistryService        = contentTypeRegistryService;
     this.DocumentViewerCustomDataProviders = documentViewerCustomDataProviders.OrderBy(a => a.Metadata.Order).ToArray();
 }
Example #9
0
 NodeTabSaverProvider(IFileTreeNodeDecompiler fileTreeNodeDecompiler, IMessageBoxManager messageBoxManager)
 {
     this.fileTreeNodeDecompiler = fileTreeNodeDecompiler;
     this.messageBoxManager      = messageBoxManager;
 }
Example #10
0
 public static NodeTabSaver TryCreate(IFileTreeNodeDecompiler fileTreeNodeDecompiler, IFileTab tab, IMessageBoxManager messageBoxManager)
 {
     if (tab.IsAsyncExecInProgress)
         return null;
     var uiContext = tab.UIContext as ITextEditorUIContext;
     if (uiContext == null)
         return null;
     var langContent = tab.Content as ILanguageTabContent;
     var lang = langContent == null ? null : langContent.Language;
     if (lang == null)
         return null;
     var nodes = tab.Content.Nodes.ToArray();
     if (nodes.Length == 0)
         return null;
     return new NodeTabSaver(messageBoxManager, tab, fileTreeNodeDecompiler, lang, uiContext, nodes);
 }
Example #11
0
 NodeTabSaverCreator(IFileTreeNodeDecompiler fileTreeNodeDecompiler, IMessageBoxManager messageBoxManager)
 {
     this.fileTreeNodeDecompiler = fileTreeNodeDecompiler;
     this.messageBoxManager = messageBoxManager;
 }