fix build after caretPos refactoring

This commit is contained in:
Vadim Lopatin 2015-04-02 12:09:18 +03:00
parent 06294ae9eb
commit 63e17534b3
3 changed files with 5 additions and 16 deletions

View File

@ -58,11 +58,11 @@ extern (C) int UIAppMain(string[] args) {
// create window
Window window = Platform.instance.createWindow("Dlang IDE", null, WindowFlag.Resizable, 700, 470);
// set window icon
window.windowIcon = drawableCache.getImage("dlangui-logo1");
IDEFrame frame = new IDEFrame(window);
// create some widget to show in window
window.windowIcon = drawableCache.getImage("dlangui-logo1");
// open home screen tab
frame.showHomeScreen();

View File

@ -120,7 +120,7 @@ class DSourceEdit : SourceEdit {
void insertCompletion(dstring completionText) {
TextRange range;
TextPosition p = getCaretPosition;
TextPosition p = caretPos;
range.start = range.end = p;
dstring lineText = content.line(p.line);
dchar prevChar = p.pos > 0 ? lineText[p.pos - 1] : 0;
@ -204,15 +204,4 @@ class DSourceEdit : SourceEdit {
Log.d("Showing popup at ", textPosToClient(_caretPos).left, " ", textPosToClient(_caretPos).top);
}
TextPosition getCaretPosition() {
return _caretPos;
}
/// change caret position and ensure it is visible
void setCaretPos(int line, int column)
{
_caretPos = TextPosition(line,column);
invalidate();
ensureCaretVisible();
}
}

View File

@ -617,11 +617,11 @@ class IDEFrame : AppFrame {
return true;
case IDEActions.GoToDefinition:
Log.d("Trying to go to definition.");
currentEditor.editorTool.goToDefinition(currentEditor(), currentEditor.getCaretPosition());
currentEditor.editorTool.goToDefinition(currentEditor(), currentEditor.caretPos);
return true;
case IDEActions.GetCompletionSuggestions:
Log.d("Getting auto completion suggestions.");
auto results = currentEditor.editorTool.getCompletions(currentEditor, currentEditor.getCaretPosition);
auto results = currentEditor.editorTool.getCompletions(currentEditor, currentEditor.caretPos);
currentEditor.showCompletionPopup(results);
return true;
case IDEActions.EditPreferences: