コード例 #1
0
ファイル: JavaEditorBase.cs プロジェクト: wjlei/vsminecraft
 public void Fire_EditorReplaced(JavaEditorBase newEditor)
 {
     if (EditorReplaced != null)
     {
         EditorReplaced(this, newEditor);
     }
 }
コード例 #2
0
ファイル: JavaMargin.cs プロジェクト: wjlei/vsminecraft
        void javaEditor_EditorReplaced(object sender, JavaEditorBase newEditor)
        {
            JavaEditor javaEditor = sender as JavaEditor;

            if (javaEditor != null)
            {
                javaEditor.OperationStarted   -= javaEditor_OperationStarted;
                javaEditor.OperationCompleted -= javaEditor_OperationCompleted;
            }
            (sender as JavaEditorBase).EditorReplaced -= javaEditor_EditorReplaced;

            JavaEditor newJavaEditor = newEditor as JavaEditor;

            if (newJavaEditor != null)
            {
                newJavaEditor.OperationStarted   += javaEditor_OperationStarted;
                newJavaEditor.OperationCompleted += javaEditor_OperationCompleted;
            }
            newEditor.EditorReplaced += javaEditor_EditorReplaced;

            if (newEditor is JavaUnconfiguredEditor)
            {
                if (Root != null)
                {
                    Root.Dispatcher.Invoke((Action) delegate()
                    {
                        if (!Helpers.VSHelpers.IsBuildInProgress())
                        {
                            Root.MessageBanner = "Java file is not part of an workspace. Intellisense is not available";
                        }
                        else
                        {
                            Root.MessageBanner = "Provisioning build needs to complete (Status.StillBuilding). Intellisense is not available";
                        }
                    });
                }
            }
            else
            {
                if (Root != null)
                {
                    Root.Dispatcher.Invoke((Action) delegate()
                    {
                        Root.MessageBanner = string.Empty;
                    });
                }
            }
        }
コード例 #3
0
        private void javaEditor_EditorReplaced(object sender, JavaEditorBase e)
        {
            var javaEditor = sender as JavaEditor;

            if (javaEditor != null)
            {
                javaEditor.OutlineResponseAvailable -= javaEditor_OutlineResponseAvailable;
            }
            (sender as JavaEditorBase).EditorReplaced -= javaEditor_EditorReplaced;

            var newJavaEditor = e as JavaEditor;

            if (newJavaEditor != null)
            {
                newJavaEditor.OutlineResponseAvailable += javaEditor_OutlineResponseAvailable;
            }
            e.EditorReplaced += javaEditor_EditorReplaced;
        }
コード例 #4
0
ファイル: JavaMargin.cs プロジェクト: XewTurquish/vsminecraft
        void javaEditor_EditorReplaced(object sender, JavaEditorBase newEditor)
        {
            JavaEditor javaEditor = sender as JavaEditor;
            if (javaEditor != null)
            {
                javaEditor.OperationStarted -= javaEditor_OperationStarted;
                javaEditor.OperationCompleted -= javaEditor_OperationCompleted;
            }            
            (sender as JavaEditorBase).EditorReplaced -= javaEditor_EditorReplaced;

            JavaEditor newJavaEditor = newEditor as JavaEditor;
            if (newJavaEditor != null)
            {
                newJavaEditor.OperationStarted += javaEditor_OperationStarted;
                newJavaEditor.OperationCompleted += javaEditor_OperationCompleted;
            }
            newEditor.EditorReplaced += javaEditor_EditorReplaced;

            if (newEditor is JavaUnconfiguredEditor)
            {
                if (Root != null)
                {
                    Root.Dispatcher.Invoke((Action)delegate()
                    {
                        if (!Helpers.VSHelpers.IsBuildInProgress())
                            Root.MessageBanner = "Java file is not part of an workspace. Intellisense is not available";
                        else
                            Root.MessageBanner = "Provisioning build needs to complete (Status.StillBuilding). Intellisense is not available";
                    });
                }
            }
            else
            {
                if (Root != null)
                {
                    Root.Dispatcher.Invoke((Action)delegate()
                    {
                        Root.MessageBanner = string.Empty;
                    });
                }
            }
        }
コード例 #5
0
 public void Fire_EditorReplaced(JavaEditorBase newEditor)
 {
     if (EditorReplaced != null)
         EditorReplaced(this, newEditor);
 }