lazdatadict: fixed compilation

git-svn-id: trunk@45132 -
This commit is contained in:
mattias 2014-05-21 11:06:50 +00:00
parent 5049a0d73d
commit 865f8fbc22
3 changed files with 37 additions and 3 deletions

View File

@ -55,7 +55,12 @@ Var
implementation implementation
uses inifiles,BaseIDEIntf,idemsgintf; uses
inifiles, IDEMsgIntf,
{$IFDEF EnableNewExtTools}
IDEExternToolIntf,
{$ENDIF}
BaseIDEIntf;
Const Const
// Do not localize // Do not localize
@ -176,7 +181,11 @@ end;
procedure TIDEDataDictionary.DDProgress(Sender : TObject; Const Msg : String); procedure TIDEDataDictionary.DDProgress(Sender : TObject; Const Msg : String);
begin begin
{$IFDEF EnableNewExtTools}
IDEMessagesWindow.AddCustomMessage(mluImportant,SLoadingDataDict+Msg);
{$ELSE}
IDEMessagesWindow.AddMsg(SLoadingDataDict+Msg,'',2); IDEMessagesWindow.AddMsg(SLoadingDataDict+Msg,'',2);
{$ENDIF}
end; end;
procedure TIDEDataDictionary.SetFileName(const AValue: String); procedure TIDEDataDictionary.SetFileName(const AValue: String);
@ -273,13 +282,20 @@ procedure TIDEDataDictionary.Load;
begin begin
If (FFileName<>'') and Active then If (FFileName<>'') and Active then
begin begin
{$IFDEF EnableNewExtTools}
IDEMessagesWindow.AddCustomMessage(mluImportant,SLoadingDataDict+SFromfile+FFileName);
{$ELSE}
IDEMessagesWindow.BeginBlock(False); IDEMessagesWindow.BeginBlock(False);
Try Try
IDEMessagesWindow.AddMsg(SLoadingDataDict+SFromfile+FFileName,'',2); IDEMessagesWindow.AddMsg(SLoadingDataDict+SFromfile+FFileName,'',2);
{$ENDIF}
FDataDict.LoadFromFile(UTF8ToSys(FFileName)); FDataDict.LoadFromFile(UTF8ToSys(FFileName));
{$IFDEF EnableNewExtTools}
{$ELSE}
Finally Finally
IDEMessagesWindow.EndBlock; IDEMessagesWindow.EndBlock;
end; end;
{$ENDIF}
end; end;
end; end;

View File

@ -73,7 +73,12 @@ implementation
{$R reglazdatadict.res} {$R reglazdatadict.res}
uses forms, dialogs, controls, idemsgintf, ldd_consts; uses forms, dialogs, controls,
IDEMsgIntf,
{$IFDEF EnableNewExtTools}
IDEExternToolIntf,
{$ENDIF}
ldd_consts;
@ -274,12 +279,18 @@ begin
ASelection:=TPersistentSelectionList.Create; ASelection:=TPersistentSelectionList.Create;
try try
GlobalDesignHook.GetSelection(ASelection); GlobalDesignHook.GetSelection(ASelection);
{$IFNDEF EnableNewExtTools}
IDEMessagesWindow.BeginBlock(True); IDEMessagesWindow.BeginBlock(True);
{$ENDIF}
For I:=0 to ASelection.Count-1 do For I:=0 to ASelection.Count-1 do
if (ASelection[i] is TDataset) then if (ASelection[i] is TDataset) then
begin begin
DS:=TDataset(ASelection[i]); DS:=TDataset(ASelection[i]);
{$IFDEF EnableNewExtTools}
IDEMessagesWindow.AddCustomMessage(mluImportant,Format(SApplyingDDToDataset,[DS.Name]));
{$ELSE}
IDEMessagesWindow.AddMsg(Format(SApplyingDDToDataset,[DS.Name]),'',i+1); IDEMessagesWindow.AddMsg(Format(SApplyingDDToDataset,[DS.Name]),'',i+1);
{$ENDIF}
IDEDataDictionary.Dictionary.ApplyToDataset(DS,@ApplyDDToField); IDEDataDictionary.Dictionary.ApplyToDataset(DS,@ApplyDDToField);
end; end;
finally finally
@ -293,10 +304,18 @@ begin
If (FD<>Nil) then If (FD<>Nil) then
begin begin
If VerboseApply then If VerboseApply then
{$IFDEF EnableNewExtTools}
IDEMessagesWindow.AddCustomMessage(mluImportant,Format(SApplyingDDToField,[F.FieldName]));
{$ELSE}
IDEMessagesWindow.AddMsg(Format(SApplyingDDToField,[F.FieldName]),'',-1) IDEMessagesWindow.AddMsg(Format(SApplyingDDToField,[F.FieldName]),'',-1)
{$ENDIF}
end end
else else
{$IFDEF EnableNewExtTools}
IDEMessagesWindow.AddCustomMessage(mluImportant,Format(SWarningNoDDForField,[F.FieldName]));
{$ELSE}
IDEMessagesWindow.AddMsg(Format(SWarningNoDDForField,[F.FieldName]),'',-1); IDEMessagesWindow.AddMsg(Format(SWarningNoDDForField,[F.FieldName]),'',-1);
{$ENDIF}
end; end;
Procedure TIDEDataDictCommandHandler.DesignSQL(Sender : TObject); Procedure TIDEDataDictCommandHandler.DesignSQL(Sender : TObject);

View File

@ -7750,7 +7750,6 @@ begin
if ProfInd<>-1 then begin if ProfInd<>-1 then begin
// Set current profile temporarily, used by the codetools functions. // Set current profile temporarily, used by the codetools functions.
BuildLazProfiles.CurrentIndex:=ProfInd; BuildLazProfiles.CurrentIndex:=ProfInd;
// does not show message: IDEMessagesWindow.AddMsg('Building: '+BuildLazProfiles.Current.Name,'',-1);
LazSrcTemplate:= LazSrcTemplate:=
CodeToolBoss.DefineTree.FindDefineTemplateByName(StdDefTemplLazarusSources,true); CodeToolBoss.DefineTree.FindDefineTemplateByName(StdDefTemplLazarusSources,true);
if Assigned(LazSrcTemplate) then begin if Assigned(LazSrcTemplate) then begin