mirror of https://gitlab.com/basile.b/dexed.git
editor, allow action 'jump to definition' to work on the doc loaded in the split view
This commit is contained in:
parent
f40804ed85
commit
85448a52f5
|
@ -69,6 +69,7 @@ type
|
||||||
function getCurrentPage: TCEPage;
|
function getCurrentPage: TCEPage;
|
||||||
function getPageCount: integer;
|
function getPageCount: integer;
|
||||||
function getPage(index: integer): TCEPage;
|
function getPage(index: integer): TCEPage;
|
||||||
|
function getSplitPage: TCEPage;
|
||||||
|
|
||||||
procedure changedNotify;
|
procedure changedNotify;
|
||||||
procedure updateButtonsState;
|
procedure updateButtonsState;
|
||||||
|
@ -83,6 +84,7 @@ type
|
||||||
procedure movePageRight;
|
procedure movePageRight;
|
||||||
procedure movePageLeft;
|
procedure movePageLeft;
|
||||||
|
|
||||||
|
property splitPage: TCEPage read getSplitPage;
|
||||||
property currentPage: TCEPage read getCurrentPage write setCurrentPage;
|
property currentPage: TCEPage read getCurrentPage write setCurrentPage;
|
||||||
property pageIndex: integer read fPageIndex write setPageIndex;
|
property pageIndex: integer read fPageIndex write setPageIndex;
|
||||||
property pageCount: integer read getPageCount;
|
property pageCount: integer read getPageCount;
|
||||||
|
@ -373,6 +375,14 @@ begin
|
||||||
exit(TCEPage(fPages.Items[index]));
|
exit(TCEPage(fPages.Items[index]));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCEPageControl.getSplitPage: TCEPage;
|
||||||
|
begin
|
||||||
|
if fSplittedPageIndex = -1 then
|
||||||
|
exit(nil)
|
||||||
|
else
|
||||||
|
exit(getPage(fSplittedPageIndex));
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEPageControl.movePageRight;
|
procedure TCEPageControl.movePageRight;
|
||||||
begin
|
begin
|
||||||
if fPageIndex = fPages.Count-1 then
|
if fPageIndex = fPages.Count-1 then
|
||||||
|
|
|
@ -199,6 +199,8 @@ begin
|
||||||
exit('ICEMultiDocHandler');
|
exit('ICEMultiDocHandler');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
//TODO-cfeature: jump to definition, don't open/select tab if origin is in right split view
|
||||||
|
|
||||||
function TCEEditorWidget.documentCount: Integer;
|
function TCEEditorWidget.documentCount: Integer;
|
||||||
begin
|
begin
|
||||||
exit(PageControl.PageCount);
|
exit(PageControl.PageCount);
|
||||||
|
@ -347,6 +349,7 @@ end;
|
||||||
|
|
||||||
procedure TCEEditorWidget.getSymbolLoc;
|
procedure TCEEditorWidget.getSymbolLoc;
|
||||||
var
|
var
|
||||||
|
page: TCEPage;
|
||||||
srcpos, i, sum, linelen: Integer;
|
srcpos, i, sum, linelen: Integer;
|
||||||
fname: string;
|
fname: string;
|
||||||
len: byte;
|
len: byte;
|
||||||
|
@ -354,8 +357,16 @@ begin
|
||||||
if not DcdWrapper.available then exit;
|
if not DcdWrapper.available then exit;
|
||||||
//
|
//
|
||||||
DcdWrapper.getDeclFromCursor(fname, srcpos);
|
DcdWrapper.getDeclFromCursor(fname, srcpos);
|
||||||
if fname <> fDoc.fileName then if fileExists(fname) then
|
if (fname <> fDoc.fileName) and fileExists(fname) then
|
||||||
openDocument(fname);
|
begin
|
||||||
|
page := pageControl.splitPage;
|
||||||
|
if assigned(page) then
|
||||||
|
begin
|
||||||
|
fDoc := TCESynMemo(page.Controls[0]);
|
||||||
|
if fDoc.fileName <> fname then
|
||||||
|
openDocument(fname);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
if srcpos <> -1 then
|
if srcpos <> -1 then
|
||||||
begin
|
begin
|
||||||
sum := 0;
|
sum := 0;
|
||||||
|
|
|
@ -3,3 +3,4 @@
|
||||||
- project config widget, base/overridden config specifications. Note about pre/post build proc as their options cant be overridden.
|
- project config widget, base/overridden config specifications. Note about pre/post build proc as their options cant be overridden.
|
||||||
- project config widget, base/overridden config. screenshot for widget view 'All categories'.
|
- project config widget, base/overridden config. screenshot for widget view 'All categories'.
|
||||||
- applications options (MRU & reload last stuff).
|
- applications options (MRU & reload last stuff).
|
||||||
|
- editor, toolbar description, split view description + screenshot.
|
Loading…
Reference in New Issue