Exemplo n.º 1
0
    //Method used to Highlight/Unhighlight single class by name, depending on bool value of argument
    public void HighlightClass(string className, bool isToBeHighlighted)
    {
        GameObject            node = classDiagram.FindNode(className);
        BackgroundHighlighter bh   = null;

        if (node != null)
        {
            bh = node.GetComponent <BackgroundHighlighter>();
        }
        else
        {
            Debug.Log("Node " + className + " not found");
        }
        if (bh != null)
        {
            if (isToBeHighlighted)
            {
                bh.HighlightBackground();
                //Debug.Log("Filip, classa: " + className); //Filip
            }
            else
            {
                bh.UnhighlightBackground();
            }
        }
        else
        {
            Debug.Log("Highligher component not found");
        }
    }
Exemplo n.º 2
0
    //Method used to Highlight/Unhighlight single class by name, depending on bool value of argument
    public void HighlightClass(string className, bool isToBeHighlighted)
    {
        GameObject            node = classDiagram.FindNode(className);
        BackgroundHighlighter bh   = null;

        if (node != null)
        {
            bh = node.GetComponent <BackgroundHighlighter>();
        }
        else
        {
            Debug.Log("Node " + className + " not found");
        }
        if (bh != null)
        {
            if (isToBeHighlighted)
            {
                bh.HighlightBackground();
                // ScriptParser.Instance.HighlightClass(my_index, script);
            }
            else
            {
                bh.UnhighlightBackground();
                // script.text = originalText;
            }
        }
        else
        {
            Debug.Log("Highligher component not found");
        }
    }