mirror of https://gitlab.com/basile.b/dexed.git
dcd, perfs, declare imports in group
This commit is contained in:
parent
154025b143
commit
5f8cb1a679
|
@ -52,6 +52,7 @@ type
|
||||||
constructor create(aOwner: TComponent); override;
|
constructor create(aOwner: TComponent); override;
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
//
|
//
|
||||||
|
procedure addImportFolders(const folders: TStrings);
|
||||||
procedure addImportFolder(const aFolder: string);
|
procedure addImportFolder(const aFolder: string);
|
||||||
procedure getComplAtCursor(aList: TStrings);
|
procedure getComplAtCursor(aList: TStrings);
|
||||||
procedure getCallTip(out tips: string);
|
procedure getCallTip(out tips: string);
|
||||||
|
@ -155,7 +156,7 @@ begin
|
||||||
if fold.dirExists and (folds.IndexOf(fold) = -1) then
|
if fold.dirExists and (folds.IndexOf(fold) = -1) then
|
||||||
folds.Add(fold);
|
folds.Add(fold);
|
||||||
end;
|
end;
|
||||||
for fold in folds do addImportFolder(fold);
|
addImportFolders(folds);
|
||||||
finally
|
finally
|
||||||
folds.Free;
|
folds.Free;
|
||||||
end;
|
end;
|
||||||
|
@ -255,6 +256,28 @@ begin
|
||||||
waitClient;
|
waitClient;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEDcdWrapper.addImportFolders(const folders: TStrings);
|
||||||
|
var
|
||||||
|
imp: string;
|
||||||
|
begin
|
||||||
|
if not fAvailable then exit;
|
||||||
|
if not fServerListening then exit;
|
||||||
|
//
|
||||||
|
fClient.Parameters.Clear;
|
||||||
|
for imp in folders do
|
||||||
|
begin
|
||||||
|
if fImportCache.IndexOf(imp) <> -1 then
|
||||||
|
continue;
|
||||||
|
fImportCache.Add(imp);
|
||||||
|
fClient.Parameters.Add('-I' + imp);
|
||||||
|
end;
|
||||||
|
if fClient.Parameters.Count <> 0 then
|
||||||
|
begin
|
||||||
|
fClient.Execute;
|
||||||
|
waitClient;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEDcdWrapper.getCallTip(out tips: string);
|
procedure TCEDcdWrapper.getCallTip(out tips: string);
|
||||||
begin
|
begin
|
||||||
if not fAvailable then exit;
|
if not fAvailable then exit;
|
||||||
|
|
|
@ -140,14 +140,21 @@ end;
|
||||||
procedure TLibraryManager.updateDCD;
|
procedure TLibraryManager.updateDCD;
|
||||||
var
|
var
|
||||||
itm: TLibraryItem;
|
itm: TLibraryItem;
|
||||||
|
str: TStringList;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
if not DcdWrapper.available then exit;
|
if not DcdWrapper.available then exit;
|
||||||
// note: new items are directly handled but removed ones still in cache until server restarts.
|
// note: new items are directly handled but removed ones still in cache until server restarts.
|
||||||
|
str := TStringList.Create;
|
||||||
|
try
|
||||||
for i := 0 to fCol.Count-1 do
|
for i := 0 to fCol.Count-1 do
|
||||||
begin
|
begin
|
||||||
itm := TLibraryItem(fCol.Items[i]);
|
itm := TLibraryItem(fCol.Items[i]);
|
||||||
DcdWrapper.addImportFolder(itm.libSourcePath);
|
str.Add(itm.libSourcePath);
|
||||||
|
end;
|
||||||
|
DcdWrapper.addImportFolders(str);
|
||||||
|
finally
|
||||||
|
str.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
@ -315,9 +315,9 @@ _DCD_ also has a native configuration system. Refer to the official [_Readme_](h
|
||||||
- <kbd>.</kbd> invokes the completion if the editor option _autoDotDelay_ is greater than 0.
|
- <kbd>.</kbd> invokes the completion if the editor option _autoDotDelay_ is greater than 0.
|
||||||
- <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>UP</kbd>: Jumps to the declaration of the symbol located at the cursor. The default shortcut can be modified.
|
- <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>UP</kbd>: Jumps to the declaration of the symbol located at the cursor. The default shortcut can be modified.
|
||||||
- <kbd>CTRL</kbd> + <kbd>LEFT MOUSE BUTTON</kbd>: ditto.
|
- <kbd>CTRL</kbd> + <kbd>LEFT MOUSE BUTTON</kbd>: ditto.
|
||||||
- <kbd>(</kbd>: Gets the function call tips.
|
- <kbd>(</kbd>: Gets the function call tips. When functions calls are nested, call tips are stacked and separated by a group of hyphen.
|
||||||
- <kbd>)</kbd>: Closes the call tips window.
|
- <kbd>)</kbd>: If the call tips are displayed then decreases by one the stack of call tips.
|
||||||
- <kbd>ESC</kbd>: ditto.
|
- <kbd>ESC</kbd>: Closes the call tips window, whatever is the level of the stack.
|
||||||
|
|
||||||
Documentation comments associated to a symbol are displayed when hovering the symbol with the mouse.
|
Documentation comments associated to a symbol are displayed when hovering the symbol with the mouse.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue