From dce2a00f90b337efa3a1dd0451fb2855f7d7cbc3 Mon Sep 17 00:00:00 2001 From: mattias Date: Sun, 5 Feb 2012 14:22:35 +0000 Subject: [PATCH] IDE: fixed GetPossibleOwnersOfUnit finding units in project directory git-svn-id: trunk@35160 - --- .../codetools/ide/codyidentifiersdlg.pas | 5 - ide/helpfpcmessages.lfm | 120 +++++++++++++----- ide/helpfpcmessages.pas | 41 +++++- ide/idehelpmanager.pas | 12 +- ide/lazarusidestrconsts.pas | 1 + ide/msgview.pp | 63 ++++----- ideintf/macrointf.pas | 4 +- packager/pkgmanager.pas | 11 +- 8 files changed, 179 insertions(+), 78 deletions(-) diff --git a/components/codetools/ide/codyidentifiersdlg.pas b/components/codetools/ide/codyidentifiersdlg.pas index ce20e3d321..be964db8ca 100644 --- a/components/codetools/ide/codyidentifiersdlg.pas +++ b/components/codetools/ide/codyidentifiersdlg.pas @@ -922,7 +922,6 @@ var // it's a unit without package if FLastHideOtherProjects then begin // check if unit is in unit path of current owner - debugln(['AddItems AAA1 CurUnitPath="',CurUnitPath,'" Dir=',ExtractFilePath(Item.DUnit.Filename)]); if CurUnitPath='' then continue; Dir:=ExtractFilePath(Item.DUnit.Filename); if (Dir<>'') @@ -1482,18 +1481,14 @@ begin CurOwner:=nil; CurUnitPath:=''; if CurMainFilename='' then exit; - debugln(['TCodyIdentifiersDlg.UpdateCurOwnerOfUnit CurMainFilename=',CurMainFilename]); GetBest(PackageEditingInterface.GetOwnersOfUnit(CurMainFilename)); if CurOwner=nil then GetBest(PackageEditingInterface.GetPossibleOwnersOfUnit(CurMainFilename, [piosfExcludeOwned,piosfIncludeSourceDirectories])); - debugln(['TCodyIdentifiersDlg.UpdateCurOwnerOfUnit CurOwner=',DbgSName(CurOwner)]); if CurOwner<>nil then begin CompOpts:=GetCurOwnerCompilerOptions; - debugln(['TCodyIdentifiersDlg.UpdateCurOwnerOfUnit CompOpts=',DbgSName(CompOpts)]); if CompOpts<>nil then CurUnitPath:=CompOpts.GetUnitPath(false); - debugln(['TCodyIdentifiersDlg.UpdateCurOwnerOfUnit CurUnitPath="',CurUnitPath,'"']); end; end; diff --git a/ide/helpfpcmessages.lfm b/ide/helpfpcmessages.lfm index cc06763986..3d7cc7a3e8 100644 --- a/ide/helpfpcmessages.lfm +++ b/ide/helpfpcmessages.lfm @@ -1,30 +1,30 @@ object EditIDEMsgHelpDialog: TEditIDEMsgHelpDialog Left = 330 - Height = 460 + Height = 522 Top = 280 - Width = 622 + Width = 649 Caption = 'EditIDEMsgHelpDialog' - ClientHeight = 460 - ClientWidth = 622 + ClientHeight = 522 + ClientWidth = 649 OnCreate = FormCreate Position = poScreenCenter LCLVersion = '0.9.31' object CurMsgGroupBox: TGroupBox Left = 6 Height = 105 - Top = 6 - Width = 610 + Top = 94 + Width = 637 Align = alTop BorderSpacing.Around = 6 Caption = 'CurMsgGroupBox' ClientHeight = 89 - ClientWidth = 606 + ClientWidth = 633 TabOrder = 0 object CurMsgMemo: TMemo Left = 0 Height = 89 Top = 0 - Width = 606 + Width = 633 Align = alClient Lines.Strings = ( 'CurMsgMemo' @@ -37,8 +37,8 @@ object EditIDEMsgHelpDialog: TEditIDEMsgHelpDialog object ButtonPanel1: TButtonPanel Left = 6 Height = 42 - Top = 412 - Width = 610 + Top = 474 + Width = 637 OKButton.Name = 'OKButton' OKButton.DefaultCaption = True HelpButton.Name = 'HelpButton' @@ -52,18 +52,18 @@ object EditIDEMsgHelpDialog: TEditIDEMsgHelpDialog end object AllGroupBox: TGroupBox Left = 6 - Height = 289 - Top = 117 + Height = 263 + Top = 205 Width = 277 Align = alLeft BorderSpacing.Around = 6 Caption = 'AllGroupBox' - ClientHeight = 273 + ClientHeight = 247 ClientWidth = 273 TabOrder = 2 object URLsListBox: TListBox Left = 0 - Height = 247 + Height = 221 Top = 0 Width = 273 Align = alClient @@ -75,7 +75,7 @@ object EditIDEMsgHelpDialog: TEditIDEMsgHelpDialog object AddButton: TButton Left = 0 Height = 26 - Top = 247 + Top = 221 Width = 273 Align = alBottom AutoSize = True @@ -85,14 +85,14 @@ object EditIDEMsgHelpDialog: TEditIDEMsgHelpDialog end object CurGroupBox: TGroupBox Left = 300 - Height = 289 - Top = 117 - Width = 316 + Height = 263 + Top = 205 + Width = 343 Align = alClient BorderSpacing.Around = 6 Caption = 'CurGroupBox' - ClientHeight = 273 - ClientWidth = 312 + ClientHeight = 247 + ClientWidth = 339 TabOrder = 3 object DeleteButton: TButton AnchorSideLeft.Control = CurGroupBox @@ -128,7 +128,7 @@ object EditIDEMsgHelpDialog: TEditIDEMsgHelpDialog Left = 76 Height = 24 Top = 6 - Width = 230 + Width = 257 Anchors = [akTop, akLeft, akRight] BorderSpacing.Around = 6 TabOrder = 1 @@ -143,7 +143,7 @@ object EditIDEMsgHelpDialog: TEditIDEMsgHelpDialog Left = 6 Height = 15 Top = 126 - Width = 300 + Width = 327 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 6 BorderSpacing.Top = 6 @@ -161,7 +161,7 @@ object EditIDEMsgHelpDialog: TEditIDEMsgHelpDialog Left = 6 Height = 24 Top = 141 - Width = 300 + Width = 327 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 6 BorderSpacing.Right = 6 @@ -178,7 +178,7 @@ object EditIDEMsgHelpDialog: TEditIDEMsgHelpDialog Left = 6 Height = 15 Top = 36 - Width = 300 + Width = 327 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 6 BorderSpacing.Top = 6 @@ -196,7 +196,7 @@ object EditIDEMsgHelpDialog: TEditIDEMsgHelpDialog Left = 6 Height = 24 Top = 51 - Width = 300 + Width = 327 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 6 BorderSpacing.Right = 6 @@ -213,7 +213,7 @@ object EditIDEMsgHelpDialog: TEditIDEMsgHelpDialog Left = 6 Height = 15 Top = 81 - Width = 300 + Width = 327 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 6 BorderSpacing.Top = 6 @@ -231,7 +231,7 @@ object EditIDEMsgHelpDialog: TEditIDEMsgHelpDialog Left = 6 Height = 24 Top = 96 - Width = 300 + Width = 327 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 6 BorderSpacing.Right = 6 @@ -242,8 +242,70 @@ object EditIDEMsgHelpDialog: TEditIDEMsgHelpDialog end object Splitter1: TSplitter Left = 289 - Height = 289 - Top = 117 + Height = 263 + Top = 205 Width = 5 end + object GlobalOptionsGroupBox: TGroupBox + Left = 6 + Height = 82 + Top = 6 + Width = 637 + Align = alTop + AutoSize = True + BorderSpacing.Around = 6 + Caption = 'GlobalOptionsGroupBox' + ClientHeight = 66 + ClientWidth = 633 + TabOrder = 5 + object FPCMsgFileLabel: TLabel + AnchorSideLeft.Control = GlobalOptionsGroupBox + AnchorSideTop.Control = FPCMsgFileEdit + AnchorSideTop.Side = asrCenter + Left = 6 + Height = 15 + Top = 11 + Width = 92 + BorderSpacing.Left = 6 + Caption = 'FPCMsgFileLabel' + ParentColor = False + end + object FPCMsgFileEdit: TEdit + AnchorSideLeft.Control = FPCMsgFileLabel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = GlobalOptionsGroupBox + Left = 104 + Height = 24 + Top = 6 + Width = 283 + BorderSpacing.Around = 6 + TabOrder = 0 + Text = 'FPCMsgFileEdit' + end + object AdditionsFileLabel: TLabel + AnchorSideLeft.Control = GlobalOptionsGroupBox + AnchorSideTop.Control = AdditionsFileEdit + AnchorSideTop.Side = asrCenter + Left = 6 + Height = 15 + Top = 41 + Width = 100 + BorderSpacing.Around = 6 + Caption = 'AdditionsFileLabel' + ParentColor = False + end + object AdditionsFileEdit: TEdit + AnchorSideLeft.Control = AdditionsFileLabel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = FPCMsgFileEdit + AnchorSideTop.Side = asrBottom + Left = 112 + Height = 24 + Top = 36 + Width = 280 + BorderSpacing.Around = 6 + TabOrder = 1 + Text = 'AdditionsFileEdit' + end + end end diff --git a/ide/helpfpcmessages.pas b/ide/helpfpcmessages.pas index 0b9ca60261..036e10182f 100644 --- a/ide/helpfpcmessages.pas +++ b/ide/helpfpcmessages.pas @@ -62,7 +62,8 @@ type private fAdditions: TMessageHelpAdditions; FAdditionsChangeStep: integer; - FAdditionsFilename: string; + FAdditionsFile: string; + FDefaultAdditionsFile: string; FFPCTranslationFile: string; FDefaultNode: THelpNode; FFoundComment: string; @@ -71,7 +72,7 @@ type FMsgFileChangeStep: integer; FMsgFilename: string; function GetAdditions(Index: integer): TMessageHelpAddition; - procedure SetAdditionsFilename(AValue: string); + procedure SetAdditionsFile(AValue: string); procedure SetFPCTranslationFile(const AValue: string); procedure SetFoundComment(const AValue: string); procedure SetLastMessage(const AValue: string); @@ -89,15 +90,20 @@ type property DefaultNode: THelpNode read FDefaultNode; property LastMessage: string read FLastMessage write SetLastMessage; property FoundComment: string read FFoundComment write SetFoundComment; + + // the FPC message file function GetMsgFile: TFPCMsgFile; property MsgFile: TFPCMsgFile read FMsgFile; property MsgFilename: string read FMsgFilename; property MsgFileChangeStep: integer read FMsgFileChangeStep; + + // additional help for messages (they add an URL to the FPC comments) function AdditionsCount: integer; property Additions[Index: integer]: TMessageHelpAddition read GetAdditions; - property AdditionsFilename: string read FAdditionsFilename write SetAdditionsFilename; property AdditionsChangeStep: integer read FAdditionsChangeStep; + property DefaultAdditionsFile: string read FDefaultAdditionsFile; published + property AdditionsFile: string read FAdditionsFile write SetAdditionsFile; property FPCTranslationFile: string read FFPCTranslationFile write SetFPCTranslationFile; end; @@ -106,11 +112,16 @@ type TEditIDEMsgHelpDialog = class(TForm) AddButton: TButton; + AdditionsFileEdit: TEdit; + AdditionsFileLabel: TLabel; ButtonPanel1: TButtonPanel; CurGroupBox: TGroupBox; CurMsgGroupBox: TGroupBox; CurMsgMemo: TMemo; DeleteButton: TButton; + FPCMsgFileEdit: TEdit; + FPCMsgFileLabel: TLabel; + GlobalOptionsGroupBox: TGroupBox; NameEdit: TEdit; NameLabel: TLabel; OnlyFPCMsgIDsLabel: TLabel; @@ -126,12 +137,26 @@ type public end; +function ShowMessageHelpEditor: TModalResult; + procedure CreateFPCMessagesHelpDB; function AddFPCMessageHelpItem(const Title, URL, RegularExpression: string ): THelpDBIRegExprMessage; implementation +function ShowMessageHelpEditor: TModalResult; +var + Editor: TEditIDEMsgHelpDialog; +begin + Editor:=TEditIDEMsgHelpDialog.Create(nil); + try + Result:=Editor.ShowModal; + finally + Editor.Free; + end; +end; + procedure CreateFPCMessagesHelpDB; var FPCHelp: TFPCMessagesHelpDatabase; @@ -207,10 +232,10 @@ begin Result:=fAdditions[Index]; end; -procedure TFPCMessagesHelpDatabase.SetAdditionsFilename(AValue: string); +procedure TFPCMessagesHelpDatabase.SetAdditionsFile(AValue: string); begin - if FAdditionsFilename=AValue then Exit; - FAdditionsFilename:=AValue; + if FAdditionsFile=AValue then Exit; + FAdditionsFile:=AValue; FAdditionsChangeStep:=CTInvalidChangeStamp; end; @@ -223,8 +248,10 @@ end; constructor TFPCMessagesHelpDatabase.Create(TheOwner: TComponent); begin inherited Create(TheOwner); + FDefaultAdditionsFile:='$(LazarusDir)/docs/additionalmsghelp.xml'; fAdditions:=TMessageHelpAdditions.Create; FAdditionsChangeStep:=CTInvalidChangeStamp; + FAdditionsFile:=DefaultAdditionsFile; FMsgFileChangeStep:=CTInvalidChangeStamp; FDefaultNode:=THelpNode.CreateURL(Self,'FPC messages: Appendix', 'http://lazarus-ccr.sourceforge.net/fpcdoc/user/userap3.html#x81-168000C'); @@ -281,12 +308,14 @@ procedure TFPCMessagesHelpDatabase.Load(Storage: TConfigStorage); begin inherited Load(Storage); FPCTranslationFile:=Storage.GetValue('FPCTranslationFile/Value',''); + AdditionsFile:=Storage.GetValue('Additions/Filename',DefaultAdditionsFile); end; procedure TFPCMessagesHelpDatabase.Save(Storage: TConfigStorage); begin inherited Save(Storage); Storage.SetDeleteValue('FPCTranslationFile/Value',FPCTranslationFile,''); + Storage.SetDeleteValue('Additions/Filename',AdditionsFile,DefaultAdditionsFile); end; function TFPCMessagesHelpDatabase.GetMsgFile: TFPCMsgFile; diff --git a/ide/idehelpmanager.pas b/ide/idehelpmanager.pas index ca6cffd4d8..8e197f44a6 100644 --- a/ide/idehelpmanager.pas +++ b/ide/idehelpmanager.pas @@ -168,11 +168,14 @@ type { TIDEHelpManager } TIDEHelpManager = class(TBaseHelpManager) - procedure mnuSearchInFPDocFilesClick(Sender: TObject); // help menu of the IDE menu bar procedure mnuHelpAboutLazarusClicked(Sender: TObject); procedure mnuHelpOnlineHelpClicked(Sender: TObject); procedure mnuHelpReportBugClicked(Sender: TObject); + // fpdoc + procedure mnuSearchInFPDocFilesClick(Sender: TObject); + // messages + procedure mnuEditMessageHelpClick(Sender: TObject); private FFCLHelpDBPath: THelpBaseURLObject; FMainHelpDB: THelpDatabase; @@ -1115,6 +1118,11 @@ begin ShowFPDocFileSearch; end; +procedure TIDEHelpManager.mnuEditMessageHelpClick(Sender: TObject); +begin + +end; + procedure TIDEHelpManager.mnuHelpAboutLazarusClicked(Sender: TObject); begin ShowAboutForm; @@ -1301,6 +1309,8 @@ begin {$IFDEF EnableFPDocSearch} itmSearchInFPDocFiles.OnClick:=@mnuSearchInFPDocFilesClick; {$ENDIF} + + end; end; diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index dfa84fbb8e..56bc00c16d 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -284,6 +284,7 @@ resourcestring lisExpandAll = 'Expand All (*)'; lisCollapseAll = 'Collapse All (/)'; lisSaveAllMessagesToFile = 'Save All Messages to File'; + lisEditHelp = 'Edit help'; lisMenuViewSearchResults = 'Search Results'; lisMenuViewAnchorEditor = 'Anchor Editor'; lisMenuViewTabOrder = 'Tab Order'; diff --git a/ide/msgview.pp b/ide/msgview.pp index a895da74b7..21915d2599 100644 --- a/ide/msgview.pp +++ b/ide/msgview.pp @@ -93,6 +93,7 @@ type procedure CopyAllMenuItemClick(Sender: TObject); procedure CopyAllAndHiddenMenuItemClick(Sender: TObject); procedure CopyMenuItemClick(Sender: TObject); + procedure EditHelpMenuItemClick(Sender: TObject); procedure FormDeactivate(Sender: TObject); procedure HelpMenuItemClick(Sender: TObject); procedure ClearMenuItemClick(Sender: TObject); @@ -193,13 +194,14 @@ type var MessagesView: TMessagesView = nil; - MsgQuickFixIDEMenuSection: TIDEMenuSection; - MsgClearIDEMenuCommand: TIDEMenuCommand; - MsgCopyIDEMenuCommand: TIDEMenuCommand; - MsgCopyAllIDEMenuCommand: TIDEMenuCommand; - MsgCopyAllAndHiddenIDEMenuCommand: TIDEMenuCommand; - MsgHelpIDEMenuCommand: TIDEMenuCommand; - MsgSaveAllToFileIDEMenuCommand: TIDEMenuCommand; + MsgQuickFixMenuSection: TIDEMenuSection; + MsgClearMenuItem: TIDEMenuCommand; + MsgCopyMenuItem: TIDEMenuCommand; + MsgCopyAllMenuItem: TIDEMenuCommand; + MsgCopyAllAndHiddenMenuItem: TIDEMenuCommand; + MsgHelpMenuItem: TIDEMenuCommand; + MsgEditHelpMenuItem: TIDEMenuCommand; + MsgSaveAllToFileMenuItem: TIDEMenuCommand; const MessagesMenuRootName = 'Messages'; @@ -262,21 +264,16 @@ var begin MessagesMenuRoot := RegisterIDEMenuRoot(MessagesMenuRootName); Path := MessagesMenuRoot.Name; - MsgQuickFixIDEMenuSection := RegisterIDEMenuSection(Path, 'Quick Fix'); - MsgClearIDEMenuCommand := - RegisterIDEMenuCommand(Path, 'Clear', lisUIDClear); - MsgCopyIDEMenuCommand := RegisterIDEMenuCommand(Path, 'Copy selected', - lisCopySelectedMessagesToClipboard); - MsgCopyAllIDEMenuCommand := RegisterIDEMenuCommand(Path, 'Copy all', - lisCopyAllShownMessagesToClipboard); - MsgCopyAllAndHiddenIDEMenuCommand := RegisterIDEMenuCommand(Path, - 'Copy all, including hidden messages', - lisCopyAllShownAndHiddenMessagesToClipboard); - MsgHelpIDEMenuCommand := RegisterIDEMenuCommand(Path, 'Help', - lisPckEditHelp); - MsgSaveAllToFileIDEMenuCommand := - RegisterIDEMenuCommand(Path, 'Copy selected', - lisSaveAllMessagesToFile); + MsgQuickFixMenuSection := RegisterIDEMenuSection(Path, 'Quick Fix'); + MsgClearMenuItem := RegisterIDEMenuCommand(Path, 'Clear', lisUIDClear); + MsgCopyMenuItem := RegisterIDEMenuCommand(Path, 'Copy selected',lisCopySelectedMessagesToClipboard); + MsgCopyAllMenuItem := RegisterIDEMenuCommand(Path, 'Copy all',lisCopyAllShownMessagesToClipboard); + MsgCopyAllAndHiddenMenuItem := RegisterIDEMenuCommand(Path, + 'Copy all, including hidden messages',lisCopyAllShownAndHiddenMessagesToClipboard); + MsgHelpMenuItem := RegisterIDEMenuCommand(Path, 'Help for message',lisPckEditHelp); + MsgEditHelpMenuItem := RegisterIDEMenuCommand(Path, 'Edit help for messages',lisEditHelp); + MsgSaveAllToFileMenuItem := + RegisterIDEMenuCommand(Path, 'Copy selected',lisSaveAllMessagesToFile); end; function MessageLinesAsText(ListOfTLazMessageLine: TFPList): string; @@ -343,12 +340,13 @@ begin MessagesMenuRoot.MenuItem := MainPopupMenu.Items; //MainPopupMenu.Items.WriteDebugReport('TMessagesView.Create '); - MsgHelpIDEMenuCommand.OnClick := @HelpMenuItemClick; - MsgClearIDEMenuCommand.OnClick := @ClearMenuItemClick; - MsgCopyIDEMenuCommand.OnClick := @CopyMenuItemClick; - MsgCopyAllIDEMenuCommand.OnClick := @CopyAllMenuItemClick; - MsgCopyAllAndHiddenIDEMenuCommand.OnClick := @CopyAllAndHiddenMenuItemClick; - MsgSaveAllToFileIDEMenuCommand.OnClick := @SaveAllToFileMenuItemClick; + MsgHelpMenuItem.OnClick := @HelpMenuItemClick; + MsgEditHelpMenuItem.OnClick:=@EditHelpMenuItemClick; + MsgClearMenuItem.OnClick := @ClearMenuItemClick; + MsgCopyMenuItem.OnClick := @CopyMenuItemClick; + MsgCopyAllMenuItem.OnClick := @CopyAllMenuItemClick; + MsgCopyAllAndHiddenMenuItem.OnClick := @CopyAllAndHiddenMenuItemClick; + MsgSaveAllToFileMenuItem.OnClick := @SaveAllToFileMenuItemClick; FMarklings:=TMessageViewMarklings.Create(Self); SourceEditorManagerIntf.RegisterMarklingProducer(FMarklings); @@ -944,6 +942,11 @@ begin Clipboard.AsText := GetSelectedMessagesAsText; end; +procedure TMessagesView.EditHelpMenuItemClick(Sender: TObject); +begin + // ShowMessageHelpEditor; +end; + procedure TMessagesView.FormDeactivate(Sender: TObject); begin FLastSelectedIndex:=-1; @@ -979,7 +982,7 @@ var QuickFixItem: TIDEMsgQuickFixItem; Msg: TLazMessageLine; begin - MsgQuickFixIDEMenuSection.Clear; + MsgQuickFixMenuSection.Clear; Msg:=GetMessageLine; FQuickFixItems.Clear; if Msg<>nil then begin @@ -993,7 +996,7 @@ begin end; for i:=0 to FQuickFixItems.Count-1 do begin QuickFixItem:=TIDEMsgQuickFixItem(FQuickFixItems[i]); - RegisterIDEMenuCommand(MsgQuickFixIDEMenuSection, + RegisterIDEMenuCommand(MsgQuickFixMenuSection, QuickFixItem.Name, QuickFixItem.Caption, @OnQuickFixClick); diff --git a/ideintf/macrointf.pas b/ideintf/macrointf.pas index 46e1c14248..8e5fbc7259 100644 --- a/ideintf/macrointf.pas +++ b/ideintf/macrointf.pas @@ -21,7 +21,7 @@ unit MacroIntf; interface uses - Classes, SysUtils, FileUtil; + Classes, SysUtils, LazFileUtils; type { TIDEMacros - macros for paths and compiler settings } @@ -133,7 +133,7 @@ begin BaseDir:=BaseDirectory; if not SubstituteMacros(BaseDir) then exit(false); Result:=SubstituteMacros(SearchPath); - SearchPath:=FileUtil.CreateAbsoluteSearchPath(SearchPath,BaseDir); + SearchPath:=MinimizeSearchPath(LazFileUtils.CreateAbsoluteSearchPath(SearchPath,BaseDir)); end; end. diff --git a/packager/pkgmanager.pas b/packager/pkgmanager.pas index 26e6a2f567..e3a2933d18 100644 --- a/packager/pkgmanager.pas +++ b/packager/pkgmanager.pas @@ -3131,11 +3131,12 @@ var and (BaseDir<>'') then begin // search in project source directories ProjectDirs:=AProject.LazCompilerOptions.OtherUnitFiles+';.'; - if not IDEMacros.CreateAbsoluteSearchPath(ProjectDirs,BaseDir) then exit; - if FindPathInSearchPath(PChar(SrcDir),length(SrcDir), - PChar(ProjectDirs),length(ProjectDirs))<>nil - then - Add:=true; + if IDEMacros.CreateAbsoluteSearchPath(ProjectDirs,BaseDir) then begin + if FindPathInSearchPath(PChar(SrcDir),length(SrcDir), + PChar(ProjectDirs),length(ProjectDirs))<>nil + then + Add:=true; + end; end; if Add then