Ejemplo n.º 1
0
    //Method used to Highlight/Unhighlight single method by name, depending on bool value of argument
    public void HighlightMethod(string className, string methodName, bool isToBeHighlighted)
    {
        GameObject      node = classDiagram.FindNode(className);
        TextHighlighter th   = null;

        if (node != null)
        {
            th = node.GetComponent <TextHighlighter>();
        }
        else
        {
            Debug.Log("Node " + className + " not found");
        }
        if (th != null)
        {
            if (isToBeHighlighted)
            {
                th.HighlightLine(methodName);
                //Debug.Log("Filip, metoda: " + methodName); //Filip
            }
            else
            {
                th.UnHighlightLine(methodName);
            }
        }
        else
        {
            Debug.Log("TextHighligher component not found");
        }
    }
Ejemplo n.º 2
0
    //Method used to Highlight/Unhighlight single method by name, depending on bool value of argument
    public void HighlightMethod(string className, string methodName, bool isToBeHighlighted)
    {
        if (isToBeHighlighted)
        {
            MenuManager.Instance.fillDebugWindow(className + "_" + methodName + "()");
        }



        GameObject      node = classDiagram.FindNode(className);
        TextHighlighter th   = null;

        if (node != null)
        {
            th = node.GetComponent <TextHighlighter>();
        }
        else
        {
            Debug.Log("Node " + className + " not found");
        }
        if (th != null)
        {
            if (isToBeHighlighted)
            {
                th.HighlightLine(methodName);
                //ScriptParser.Instance.HighlightMethod(my_index, script);
            }
            else
            {
                th.UnHighlightLine(methodName);
                //script.text = originalText;
            }
        }
        else
        {
            Debug.Log("TextHighligher component not found");
        }
    }