public override bool CheckIfShouldLoad(UIDETextEditor textEditor)
 {
     if (UIDEEditor.current == null) return false;
     if (Application.platform == RuntimePlatform.OSXEditor) {
         return false;
     }
     if (textEditor.extension.ToLower() == ".cs") {
         if (UIDEEditor.current.generalSettings.GetUseRealtimeErrorHighlighting()) {
             return true;
         }
     }
     return false;
 }
예제 #2
0
        public void GoToFileAndLine(string fileName, int line, int column)
        {
            UIDETextEditor te = editor.editorWindow.OpenOrFocusEditorFromFile(fileName);

            if (te != null)
            {
                int lineOffset = (int)((editor.actualTextAreaRect.height / editor.charSize.y) * 0.5f);
                te.ScrollToLine(line, lineOffset);
                te.cursor.posY = line;
                te.cursor.posX = column;
            }
            hasGotoRequest = false;
        }
예제 #3
0
 public override bool CheckIfShouldLoad(UIDETextEditor textEditor)
 {
     if (UIDEEditor.current == null)
     {
         return(false);
     }
     if (Application.platform == RuntimePlatform.OSXEditor)
     {
         return(false);
     }
     if (textEditor.extension.ToLower() == ".cs")
     {
         if (UIDEEditor.current.generalSettings.GetUseRealtimeErrorHighlighting())
         {
             return(true);
         }
     }
     return(false);
 }
예제 #4
0
        public void GoToDeclaration(System.Object[] posObj)
        {
            if (posObj.Length != 1)
            {
                return;
            }
            if (posObj[0].GetType() != typeof(Vector2))
            {
                return;
            }
            Vector2        pos  = (Vector2)posObj[0];
            int            line = (int)pos.y;
            UIDETextEditor te   = editor;

            if (te != null)
            {
                int lineOffset = (int)((editor.actualTextAreaRect.height / editor.charSize.y) * 0.5f);
                te.ScrollToLine(line, lineOffset);
                te.cursor.posY = line;
                te.cursor.posX = (int)pos.x;
            }
        }
 public override bool CheckIfShouldLoad(UIDETextEditor textEditor)
 {
     return HasFileType(textEditor.extension);
 }
예제 #6
0
 public override bool CheckIfShouldLoad(UIDETextEditor textEditor)
 {
     return(true);
 }
 public override bool CheckIfShouldLoad(UIDETextEditor textEditor)
 {
     return(HasFileType(textEditor.extension));
 }
예제 #8
0
 public override bool CheckIfShouldLoad(UIDETextEditor textEditor)
 {
     return true;
 }