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); } } }
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); }
public int ReleaseMarkerData(MARKERDATA[] pMarkerData) { throw new Exception("The method or operation is not implemented."); }
public int GetMarkerData(int iTopLine, int iBottomLine, MARKERDATA[] pMarkerData) { throw new Exception("The method or operation is not implemented."); }
public int GetMarkerData(int iTopLine, int iBottomLine, MARKERDATA[] pMarkerData) { return VSConstants.S_OK; }
int IVsTextLines.GetLineData(int iLine, LINEDATA[] pLineData, MARKERDATA[] pMarkerData) { return VSConstants.E_NOTIMPL; }
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); }
public int GetLineData(int iLine, LINEDATA[] pLineData, MARKERDATA[] pMarkerData) { throw new Exception("The method or operation is not implemented."); }
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(); }
int IVsTextLines.ReleaseMarkerData(MARKERDATA[] pMarkerData) { return VSConstants.E_NOTIMPL; }
public int ReleaseMarkerData(MARKERDATA[] pMarkerData) { return VSConstants.S_OK; }
int IVsTextLines.GetLineDataEx(uint dwFlags, int iLine, int iStartIndex, int iEndIndex, LINEDATAEX[] pLineData, MARKERDATA[] pMarkerData ) { return VSConstants.E_NOTIMPL; }
public int GetLineData(int iLine, LINEDATA[] pLineData, MARKERDATA[] pMarkerData) { return VSConstants.S_OK; }
public int GetLineDataEx(uint dwFlags, int iLine, int iStartIndex, int iEndIndex, LINEDATAEX[] pLineData, MARKERDATA[] pMarkerData) { return VSConstants.S_OK; }
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; }