Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/language/interfaces/ilanguagesupport.h
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Line(s) | 107 | /**Should return the local range within the given url that belongs to the | |||
---|---|---|---|---|---|
108 | *special language-object that contains @p position , or (QUrl(), KTextEditor::Range:invalid()) */ | 108 | *special language-object that contains @p position , or (QUrl(), KTextEditor::Range:invalid()) */ | ||
109 | virtual KTextEditor::Range specialLanguageObjectRange(const QUrl& url, const KTextEditor::Cursor& position); | 109 | virtual KTextEditor::Range specialLanguageObjectRange(const QUrl& url, const KTextEditor::Cursor& position); | ||
110 | 110 | | |||
111 | /**Should return the source-range and source-document that the | 111 | /**Should return the source-range and source-document that the | ||
112 | *special language-object that contains @p position refers to, or KTextEditor::Range:invalid(). */ | 112 | *special language-object that contains @p position refers to, or KTextEditor::Range:invalid(). */ | ||
113 | virtual QPair<QUrl, KTextEditor::Cursor> specialLanguageObjectJumpCursor(const QUrl& url, const KTextEditor::Cursor& position); | 113 | virtual QPair<QUrl, KTextEditor::Cursor> specialLanguageObjectJumpCursor(const QUrl& url, const KTextEditor::Cursor& position); | ||
114 | 114 | | |||
115 | /**Should return a navigation-widget for the | 115 | /**Should return a navigation-widget for the | ||
116 | *special language-object that contains @p position refers, or 0. | 116 | *special language-object that contains @p position refers to as well as the range the object takes there, | ||
117 | *or nullptr and an invalid range. | ||||
117 | *If you setProperty("DoNotCloseOnCursorMove", true) on the widget returned, | 118 | *If you setProperty("DoNotCloseOnCursorMove", true) on the widget returned, | ||
118 | *then the widget will not close when the cursor moves in the document, which | 119 | *then the widget will not close when the cursor moves in the document, which | ||
119 | *enables you to change the document contents from the widget without immediately closing the widget.*/ | 120 | *enables you to change the document contents from the widget without immediately closing the widget.*/ | ||
120 | virtual QWidget* specialLanguageObjectNavigationWidget(const QUrl& url, const KTextEditor::Cursor& position); | 121 | virtual QPair<QWidget*, KTextEditor::Range> specialLanguageObjectNavigationWidget(const QUrl& url, const KTextEditor::Cursor& position); | ||
121 | 122 | | |||
122 | /**Should return a tiny piece of code which makes it possible for KDevelop to derive the indentation | 123 | /**Should return a tiny piece of code which makes it possible for KDevelop to derive the indentation | ||
123 | *settings from an automatic source formatter. Example for C++: "class C{\n class D {\n void c() {\n int m;\n }\n }\n};\n" | 124 | *settings from an automatic source formatter. Example for C++: "class C{\n class D {\n void c() {\n int m;\n }\n }\n};\n" | ||
124 | *The sample must be completely unindented (no line must start with leading whitespace), | 125 | *The sample must be completely unindented (no line must start with leading whitespace), | ||
125 | *and it must contain at least 4 indentation levels! | 126 | *and it must contain at least 4 indentation levels! | ||
126 | *The default implementation returns an empty string.*/ | 127 | *The default implementation returns an empty string.*/ | ||
127 | virtual QString indentationSample() const; | 128 | virtual QString indentationSample() const; | ||
128 | 129 | | |||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |