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
IDEToolCompilePackage = 'Package';
IDEToolCompileProject = 'Project';
IDEToolCompileIDE = 'IDE';
type
{ TIDEExternalToolData

View File

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

View File

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

View File

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