@@ -43,29 +43,40 @@ PythonEditorIntegrator::~PythonEditorIntegrator()
4343{
4444}
4545
46- Cursor PythonEditorIntegrator::findPosition ( Ast* node , Edge edge ) const
46+ ParseSession* PythonEditorIntegrator::parseSession () const
47+ {
48+ return m_session;
49+ }
50+
51+ void PythonEditorIntegrator::setParseSession (ParseSession* session)
52+ {
53+ m_session = session;
54+ }
55+
56+
57+ CursorInRevision PythonEditorIntegrator::findPosition ( Ast* node , Edge edge ) const
4758{
4859 if ( edge == BackEdge )
4960 {
5061 // Apparently KTE expects a range to go until _after_ the last character that should be included
5162 // however the parser calculates endCol as the index _before_ the last included character, so adjust here
52- return Cursor ( node->endLine , node->endCol +1 );
63+ return CursorInRevision ( node->endLine , node->endCol +1 );
5364 }else
5465 {
55- return Cursor ( node->startLine , node->startCol );
66+ return CursorInRevision ( node->startLine , node->startCol );
5667 }
5768}
5869
59- Range PythonEditorIntegrator::findRange ( Ast * node, RangeEdge edge )
70+ RangeInRevision PythonEditorIntegrator::findRange ( Ast * node, RangeEdge edge )
6071{
6172 Q_UNUSED ( edge );
6273 kDebug () << " Finding Range ==================" ;
63- return Range ( findPosition ( node, FrontEdge ), findPosition ( node, BackEdge ) );
74+ return RangeInRevision ( findPosition ( node, FrontEdge ), findPosition ( node, BackEdge ) );
6475}
6576
66- Range PythonEditorIntegrator::findRange ( Ast* from, Ast* to )
77+ RangeInRevision PythonEditorIntegrator::findRange ( Ast* from, Ast* to )
6778{
68- return Range ( findPosition ( from, FrontEdge ), findPosition ( to, BackEdge ) );
79+ return RangeInRevision ( findPosition ( from, FrontEdge ), findPosition ( to, BackEdge ) );
6980}
7081
7182}
0 commit comments