IDE: external tool data when compiling IDE, improving message cant find unit for IDE

git-svn-id: trunk@47658 -
This commit is contained in:
mattias 2015-02-09 17:02:00 +00:00
parent 3ff9f8fb4f
commit 57a40ca9a7
4 changed files with 8 additions and 1 deletions

View File

@ -35,6 +35,7 @@ const
const const
IDEToolCompilePackage = 'Package'; IDEToolCompilePackage = 'Package';
IDEToolCompileProject = 'Project'; IDEToolCompileProject = 'Project';
IDEToolCompileIDE = 'IDE';
type type
{ TIDEExternalToolData { TIDEExternalToolData

View File

@ -385,6 +385,9 @@ var
Tool:=ExternalToolList.Add(CurTitle); Tool:=ExternalToolList.Add(CurTitle);
Tool.Reference(Self,ClassName); Tool.Reference(Self,ClassName);
try try
Tool.Data:=TIDEExternalToolData.Create(IDEToolCompileIDE,'lazarus',
AppendPathDelim(EnvironmentOptions.GetParsedLazarusDirectory)+'lazarus.pp');
Tool.FreeData:=true;
Tool.Process.Executable:=Executable; Tool.Process.Executable:=Executable;
Tool.AddParsers(SubToolFPC); Tool.AddParsers(SubToolFPC);
Tool.AddParsers(SubToolMake); Tool.AddParsers(SubToolMake);

View File

@ -316,7 +316,8 @@ begin
CompOpts:=TIDEPackage(IDETool).LazCompilerOptions; CompOpts:=TIDEPackage(IDETool).LazCompilerOptions;
if CompOpts.MessageFlags[Msg.MsgID]=cfvHide then exit; if CompOpts.MessageFlags[Msg.MsgID]=cfvHide then exit;
s:=Format(lisHideWithPackageOptionVm, [IntToStr(Msg.MsgID)]); s:=Format(lisHideWithPackageOptionVm, [IntToStr(Msg.MsgID)]);
end; end else
continue;
Fixes.AddMenuItem(Self,Msg,s); Fixes.AddMenuItem(Self,Msg,s);
end; end;
inherited CreateMenuItems(Fixes); inherited CreateMenuItems(Fixes);

View File

@ -1386,6 +1386,8 @@ begin
Result:=LazarusIDE.ActiveProject; Result:=LazarusIDE.ActiveProject;
end else if ToolData.Kind=IDEToolCompilePackage then begin end else if ToolData.Kind=IDEToolCompilePackage then begin
Result:=PackageEditingInterface.FindPackageWithName(ToolData.ModuleName); Result:=PackageEditingInterface.FindPackageWithName(ToolData.ModuleName);
end else if ToolData.Kind=IDEToolCompileIDE then begin
Result:=LazarusIDE;
end; end;
end; end;