Exemplo n.º 1
0
        //////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Initialize the thread for NAnt process.
        /// </summary>
        /// <param name="targetNode">The target to run.</param>
        //////////////////////////////////////////////////////////////////////////

        public void StartTarget()
        {
            if (!m_NAntProcess.IsWorking)
            {
                m_NAntProcess.Filename   = m_Filename;
                m_NAntProcess.TargetNode = m_CurrentNode;

                // Sets focus to console
                VisualStudioUtils.ShowWindow(m_ApplicationObject, "Output");

                m_NAntProcess.Start();
            }
        }
Exemplo n.º 2
0
        //////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Select the line of NAntNode in the VisualStudio editor.
        /// </summary>
        /// <param name="nantNode">The node</param>
        //////////////////////////////////////////////////////////////////////////

        public void SelectNodeLine()
        {
            // First load the file into VisualStudio
            VisualStudioUtils.ShowFile(m_ApplicationObject, m_Filename);

            // Refocus AddIn (lost while opening the file)
            VisualStudioUtils.ShowWindow(m_ApplicationObject, "NAntAddin");

            // Display the node's line within the file
            VisualStudioUtils.ShowLine(m_ApplicationObject, m_Filename, m_CurrentNode.LineNumber, false);

            // Finally display the document
            VisualStudioUtils.ShowDocument(m_ApplicationObject, m_Filename);
        }