mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 12:19:16 +02:00
cody: find overloads: adjust columns, double click autosize column, nicer distances, resourcestrings
git-svn-id: trunk@50004 -
This commit is contained in:
parent
580b22f36e
commit
4639bc83bf
@ -162,7 +162,7 @@ object CodyFindOverloadsWindow: TCodyFindOverloadsWindow
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnColRowExchanged = ResultsStringGridColRowExchanged
|
OnColRowExchanged = ResultsStringGridColRowExchanged
|
||||||
OnCompareCells = ResultsStringGridCompareCells
|
OnCompareCells = ResultsStringGridCompareCells
|
||||||
OnDblClick = ResultsStringGridDblClick
|
OnMouseDown = ResultsStringGridMouseDown
|
||||||
ColWidths = (
|
ColWidths = (
|
||||||
182
|
182
|
||||||
100
|
100
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
-show line number
|
-show line number
|
||||||
-param compatibility
|
-param compatibility
|
||||||
-last visited
|
-last visited
|
||||||
-filter by ancestor
|
|
||||||
-hint: show file name + param list
|
-hint: show file name + param list
|
||||||
}
|
}
|
||||||
unit CodyFindOverloads;
|
unit CodyFindOverloads;
|
||||||
@ -138,7 +137,8 @@ type
|
|||||||
IsColumn: Boolean; sIndex, tIndex: Integer);
|
IsColumn: Boolean; sIndex, tIndex: Integer);
|
||||||
procedure ResultsStringGridCompareCells(Sender: TObject; ACol, ARow, BCol,
|
procedure ResultsStringGridCompareCells(Sender: TObject; ACol, ARow, BCol,
|
||||||
BRow: Integer; var Result: integer);
|
BRow: Integer; var Result: integer);
|
||||||
procedure ResultsStringGridDblClick(Sender: TObject);
|
procedure ResultsStringGridMouseDown(Sender: TObject; {%H-}Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
procedure Timer1Timer(Sender: TObject);
|
procedure Timer1Timer(Sender: TObject);
|
||||||
private
|
private
|
||||||
FFilterAncestor: string;
|
FFilterAncestor: string;
|
||||||
@ -335,9 +335,16 @@ begin
|
|||||||
debugln(['TCodyFindOverloadsWindow.ResultsStringGridCompareCells invalid ACol=',ACol,' ARow=',ARow,' BCol=',BCol,' BRow=',BRow]);
|
debugln(['TCodyFindOverloadsWindow.ResultsStringGridCompareCells invalid ACol=',ACol,' ARow=',ARow,' BCol=',BCol,' BRow=',BRow]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCodyFindOverloadsWindow.ResultsStringGridDblClick(Sender: TObject);
|
procedure TCodyFindOverloadsWindow.ResultsStringGridMouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
var
|
||||||
|
Col, Row: Longint;
|
||||||
begin
|
begin
|
||||||
JumpToIdentifier;
|
Col:=0;
|
||||||
|
Row:=0;
|
||||||
|
ResultsStringGrid.MouseToCell(X,Y,Col,Row);
|
||||||
|
if (Row>0) and (ssDouble in Shift) then
|
||||||
|
JumpToIdentifier;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCodyFindOverloadsWindow.Timer1Timer(Sender: TObject);
|
procedure TCodyFindOverloadsWindow.Timer1Timer(Sender: TObject);
|
||||||
@ -348,7 +355,7 @@ begin
|
|||||||
Cnt:=0;
|
Cnt:=0;
|
||||||
if FUsesGraph.FilesTree<>nil then
|
if FUsesGraph.FilesTree<>nil then
|
||||||
Cnt:=FUsesGraph.FilesTree.Count;
|
Cnt:=FUsesGraph.FilesTree.Count;
|
||||||
ResultsGroupBox.Caption:=Format('Scanning: %s units ...', [IntToStr(Cnt)]);
|
ResultsGroupBox.Caption:=Format(crsScanningSUnits, [IntToStr(Cnt)]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCodyFindOverloadsWindow.SetIdleConnected(AValue: boolean);
|
procedure TCodyFindOverloadsWindow.SetIdleConnected(AValue: boolean);
|
||||||
@ -678,11 +685,11 @@ var
|
|||||||
Edge:=TCFOEdge(AVLNode.Data);
|
Edge:=TCFOEdge(AVLNode.Data);
|
||||||
NewDistance:=GraphNode.Distance;
|
NewDistance:=GraphNode.Distance;
|
||||||
case Edge.Typ of
|
case Edge.Typ of
|
||||||
cfoetReachable: NewDistance+=100000;// not related
|
cfoetReachable: NewDistance+=50000;// not related
|
||||||
cfoetMethodOf: ; // methods within one class are close
|
cfoetMethodOf: ; // methods within one class are close
|
||||||
cfoetDescendantOf:
|
cfoetDescendantOf:
|
||||||
if GraphNode=Edge.FromNode then
|
if GraphNode=Edge.FromNode then
|
||||||
NewDistance+=10 // going to the ancestors
|
NewDistance+=100 // going to the ancestors
|
||||||
else
|
else
|
||||||
NewDistance+=1; // going to the descendants
|
NewDistance+=1; // going to the descendants
|
||||||
end;
|
end;
|
||||||
@ -813,8 +820,7 @@ begin
|
|||||||
Grid.EndUpdate(true);
|
Grid.EndUpdate(true);
|
||||||
|
|
||||||
Grid.HandleNeeded;
|
Grid.HandleNeeded;
|
||||||
|
Grid.AutoAdjustColumns;
|
||||||
// ToDo: resize columns
|
|
||||||
|
|
||||||
JumpToButton.Enabled:=Grid.Row>0;
|
JumpToButton.Enabled:=Grid.Row>0;
|
||||||
end;
|
end;
|
||||||
|
@ -268,6 +268,7 @@ resourcestring
|
|||||||
crsIncompatible = 'incompatible';
|
crsIncompatible = 'incompatible';
|
||||||
crsCodyFindOverloads = 'Cody - Find Overloads';
|
crsCodyFindOverloads = 'Cody - Find Overloads';
|
||||||
crsOnlyMethods = 'Only methods';
|
crsOnlyMethods = 'Only methods';
|
||||||
|
crsScanningSUnits = 'Scanning: %s units ...';
|
||||||
crsOnlyDescendantsOf = 'Only descendants of %s';
|
crsOnlyDescendantsOf = 'Only descendants of %s';
|
||||||
crsOnlyNonMethods = 'Only non methods';
|
crsOnlyNonMethods = 'Only non methods';
|
||||||
crsAny = 'Any';
|
crsAny = 'Any';
|
||||||
|
@ -646,6 +646,10 @@ msgstr "Speichere Wörterbuch jetzt"
|
|||||||
msgid "Save to file %s"
|
msgid "Save to file %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: codystrconsts.crsscanningsunits
|
||||||
|
msgid "Scanning: %s units ..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: codystrconsts.crssearching
|
#: codystrconsts.crssearching
|
||||||
msgid "searching ..."
|
msgid "searching ..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -647,6 +647,10 @@ msgstr "Enregistrer le dictionnaire tout de suite"
|
|||||||
msgid "Save to file %s"
|
msgid "Save to file %s"
|
||||||
msgstr "Enregistrer dans le fichier %s"
|
msgstr "Enregistrer dans le fichier %s"
|
||||||
|
|
||||||
|
#: codystrconsts.crsscanningsunits
|
||||||
|
msgid "Scanning: %s units ..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: codystrconsts.crssearching
|
#: codystrconsts.crssearching
|
||||||
msgid "searching ..."
|
msgid "searching ..."
|
||||||
msgstr "recherche en cours..."
|
msgstr "recherche en cours..."
|
||||||
|
@ -647,6 +647,10 @@ msgstr "Szótár mentése most"
|
|||||||
msgid "Save to file %s"
|
msgid "Save to file %s"
|
||||||
msgstr "Mentés fájlba: %s"
|
msgstr "Mentés fájlba: %s"
|
||||||
|
|
||||||
|
#: codystrconsts.crsscanningsunits
|
||||||
|
msgid "Scanning: %s units ..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: codystrconsts.crssearching
|
#: codystrconsts.crssearching
|
||||||
msgid "searching ..."
|
msgid "searching ..."
|
||||||
msgstr "keresés ..."
|
msgstr "keresés ..."
|
||||||
|
@ -648,6 +648,10 @@ msgstr "Salvare il dizionario ora"
|
|||||||
msgid "Save to file %s"
|
msgid "Save to file %s"
|
||||||
msgstr "Salvare nel file %s"
|
msgstr "Salvare nel file %s"
|
||||||
|
|
||||||
|
#: codystrconsts.crsscanningsunits
|
||||||
|
msgid "Scanning: %s units ..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: codystrconsts.crssearching
|
#: codystrconsts.crssearching
|
||||||
msgid "searching ..."
|
msgid "searching ..."
|
||||||
msgstr "Ricerca in corso..."
|
msgstr "Ricerca in corso..."
|
||||||
|
@ -647,6 +647,10 @@ msgstr "Žodyną įrašyti dabar"
|
|||||||
msgid "Save to file %s"
|
msgid "Save to file %s"
|
||||||
msgstr "Įrašyti į failą „%s“"
|
msgstr "Įrašyti į failą „%s“"
|
||||||
|
|
||||||
|
#: codystrconsts.crsscanningsunits
|
||||||
|
msgid "Scanning: %s units ..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: codystrconsts.crssearching
|
#: codystrconsts.crssearching
|
||||||
msgid "searching ..."
|
msgid "searching ..."
|
||||||
msgstr "ieškoma…"
|
msgstr "ieškoma…"
|
||||||
|
@ -637,6 +637,10 @@ msgstr ""
|
|||||||
msgid "Save to file %s"
|
msgid "Save to file %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: codystrconsts.crsscanningsunits
|
||||||
|
msgid "Scanning: %s units ..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: codystrconsts.crssearching
|
#: codystrconsts.crssearching
|
||||||
msgid "searching ..."
|
msgid "searching ..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -657,6 +657,10 @@ msgstr "Salvar dicionário agora"
|
|||||||
msgid "Save to file %s"
|
msgid "Save to file %s"
|
||||||
msgstr "Salvar para o arquivo %s"
|
msgstr "Salvar para o arquivo %s"
|
||||||
|
|
||||||
|
#: codystrconsts.crsscanningsunits
|
||||||
|
msgid "Scanning: %s units ..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: codystrconsts.crssearching
|
#: codystrconsts.crssearching
|
||||||
msgid "searching ..."
|
msgid "searching ..."
|
||||||
msgstr "localizando ..."
|
msgstr "localizando ..."
|
||||||
|
@ -658,6 +658,10 @@ msgstr "Сохранить словарь сейчас"
|
|||||||
msgid "Save to file %s"
|
msgid "Save to file %s"
|
||||||
msgstr "Сохранить в файл %s"
|
msgstr "Сохранить в файл %s"
|
||||||
|
|
||||||
|
#: codystrconsts.crsscanningsunits
|
||||||
|
msgid "Scanning: %s units ..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: codystrconsts.crssearching
|
#: codystrconsts.crssearching
|
||||||
msgid "searching ..."
|
msgid "searching ..."
|
||||||
msgstr "поиск ..."
|
msgstr "поиск ..."
|
||||||
|
@ -659,6 +659,10 @@ msgstr ""
|
|||||||
msgid "Save to file %s"
|
msgid "Save to file %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: codystrconsts.crsscanningsunits
|
||||||
|
msgid "Scanning: %s units ..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: codystrconsts.crssearching
|
#: codystrconsts.crssearching
|
||||||
msgid "searching ..."
|
msgid "searching ..."
|
||||||
msgstr "пошук ..."
|
msgstr "пошук ..."
|
||||||
|
Loading…
Reference in New Issue
Block a user