Esempio n. 1
0
        private void GetLineInformation(IVsTextView pView, int iNewLine, int iLine, int iCol)
        {
            String       str = "";
            IVsTextLines lines;

            // Text of Line
            if (VSConstants.S_OK == pView.GetBuffer(out lines))
            {
                // http://ankhsvn.open.collab.net/ds/viewMessage.do?dsForumId=580&viewType=browseAll&dsMessageId=349875
                var data       = new LINEDATA[1];
                var markerData = new MARKERDATA[1];
                if (VSConstants.S_OK == lines.GetLineData(iNewLine, data, markerData))
                {
                    str = Marshal.PtrToStringUni(data[0].pszText, data[0].iLength);

                    // Clean up memory...needed?
                    lines.ReleaseLineData(data);
                    lines.ReleaseMarkerData(markerData);

                    //object ppTextPoint;
                    //lines.CreateTextPoint(iNewLine, data[0].iLength, out ppTextPoint);
                    //var textPoint = ppTextPoint as EnvDTE.TextPoint;

                    // See if we can get entity
                    // ... but only if supported extension.
                    // COM craptatic code will potentially bomb if doing something like javascript, etc.
                    //entity = GetOrCreateCodeEntityFromActivePoint(path, doc);
                }
            }
        }
Esempio n. 2
0
        private String GetLineContent(IVsTextLines lines, int lineNumber)
        {
            String str        = "";
            var    data       = new LINEDATA[1];
            var    markerData = new MARKERDATA[1];

            if (VSConstants.S_OK == lines.GetLineData(lineNumber, data, markerData))
            {
                str = Marshal.PtrToStringUni(data[0].pszText, data[0].iLength);

                // Clean up memory...needed?
                lines.ReleaseLineData(data);
                lines.ReleaseMarkerData(markerData);
            }
            return(str);
        }
Esempio n. 3
0
 public int ReleaseMarkerData(MARKERDATA[] pMarkerData)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Esempio n. 4
0
 public int GetMarkerData(int iTopLine, int iBottomLine, MARKERDATA[] pMarkerData)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Esempio n. 5
0
 public int GetMarkerData(int iTopLine, int iBottomLine, MARKERDATA[] pMarkerData) {
     return VSConstants.S_OK;
 }
Esempio n. 6
0
        private void GetLineInformation(IVsTextView pView, int iNewLine, int iLine, int iCol)
        {
            String str = "";
            IVsTextLines lines;

            // Text of Line
            if (VSConstants.S_OK == pView.GetBuffer(out lines))
            {
                // http://ankhsvn.open.collab.net/ds/viewMessage.do?dsForumId=580&viewType=browseAll&dsMessageId=349875
                var data = new LINEDATA[1];
                var markerData = new MARKERDATA[1];
                if (VSConstants.S_OK == lines.GetLineData(iNewLine, data, markerData))
                {
                    str = Marshal.PtrToStringUni(data[0].pszText, data[0].iLength);

                    // Clean up memory...needed?
                    lines.ReleaseLineData(data);
                    lines.ReleaseMarkerData(markerData);

                    //object ppTextPoint;
                    //lines.CreateTextPoint(iNewLine, data[0].iLength, out ppTextPoint);
                    //var textPoint = ppTextPoint as EnvDTE.TextPoint;

                    // See if we can get entity
                    // ... but only if supported extension.
                    // COM craptatic code will potentially bomb if doing something like javascript, etc.
                    //entity = GetOrCreateCodeEntityFromActivePoint(path, doc);
                }
            }
        }
Esempio n. 7
0
 int IVsTextLines.GetLineData(int iLine, LINEDATA[] pLineData, MARKERDATA[] pMarkerData)
 {
     return VSConstants.E_NOTIMPL;
 }
Esempio n. 8
0
 int IVsTextLines.GetMarkerData(int iTopLine, int iBottomLine, MARKERDATA[] pMarkerData)
 {
     return VSConstants.E_NOTIMPL;
 }
 public int GetLineDataEx(uint dwFlags, int iLine, int iStartIndex, int iEndIndex, LINEDATAEX[] pLineData, MARKERDATA[] pMarkerData) {
     throw new NotImplementedException();
 }
 public int GetLineData(int iLine, LINEDATA[] pLineData, MARKERDATA[] pMarkerData) {
     throw new NotImplementedException();
 }
 public int ReleaseMarkerData(MARKERDATA[] pMarkerData) {
     throw new NotImplementedException();
 }
 public int ReleaseMarkerData(MARKERDATA[] pMarkerData)
 {
     return _textBuffer.ReleaseMarkerData(pMarkerData);
 }
 public int GetMarkerData(int iTopLine, int iBottomLine, MARKERDATA[] pMarkerData)
 {
     return _textBuffer.GetMarkerData(iTopLine, iBottomLine, pMarkerData);
 }
 public int GetLineDataEx(uint dwFlags, int iLine, int iStartIndex, int iEndIndex, LINEDATAEX[] pLineData, MARKERDATA[] pMarkerData)
 {
     return _textBuffer.GetLineDataEx(dwFlags, iLine, iStartIndex, iEndIndex, pLineData, pMarkerData);
 }
 public int GetLineData(int iLine, LINEDATA[] pLineData, MARKERDATA[] pMarkerData)
 {
     return _textBuffer.GetLineData(iLine, pLineData, pMarkerData);
 }
Esempio n. 16
0
 public int GetLineData(int iLine, LINEDATA[] pLineData, MARKERDATA[] pMarkerData)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Esempio n. 17
0
 public int GetLineDataEx(uint dwFlags, int iLine, int iStartIndex, int iEndIndex, LINEDATAEX[] pLineData, MARKERDATA[] pMarkerData)
 {
     throw new Exception("The method or operation is not implemented.");
 }
 public int GetMarkerData(int iTopLine, int iBottomLine, MARKERDATA[] pMarkerData) {
     throw new NotImplementedException();
 }
Esempio n. 19
0
 int IVsTextLines.ReleaseMarkerData(MARKERDATA[] pMarkerData)
 {
     return VSConstants.E_NOTIMPL;
 }
Esempio n. 20
0
 public int ReleaseMarkerData(MARKERDATA[] pMarkerData) {
     return VSConstants.S_OK;
 }
Esempio n. 21
0
 int IVsTextLines.GetLineDataEx(uint dwFlags,
             int iLine,
             int iStartIndex,
             int iEndIndex,
             LINEDATAEX[] pLineData,
             MARKERDATA[] pMarkerData
     )
 {
     return VSConstants.E_NOTIMPL;
 }
Esempio n. 22
0
 public int GetLineData(int iLine, LINEDATA[] pLineData, MARKERDATA[] pMarkerData) {
     return VSConstants.S_OK;
 }
Esempio n. 23
0
 public int GetLineDataEx(uint dwFlags, int iLine, int iStartIndex, int iEndIndex, LINEDATAEX[] pLineData, MARKERDATA[] pMarkerData) {
     return VSConstants.S_OK;
 }
Esempio n. 24
0
        private String GetLineContent(IVsTextLines lines, int lineNumber)
        {
            String str = "";
            var data = new LINEDATA[1];
            var markerData = new MARKERDATA[1];
            if (VSConstants.S_OK == lines.GetLineData(lineNumber, data, markerData))
            {
                str = Marshal.PtrToStringUni(data[0].pszText, data[0].iLength);

                // Clean up memory...needed?
                lines.ReleaseLineData(data);
                lines.ReleaseMarkerData(markerData);
            }
            return str;
        }