SourceEditor, fixed accidental removed method from SrcEditorInterface

git-svn-id: trunk@24235 -
This commit is contained in:
martin 2010-03-27 00:03:48 +00:00
parent bd6c06847e
commit 7b938aafdc
2 changed files with 14 additions and 1 deletions

View File

@ -864,6 +864,7 @@ type
deprecated; // deprecated in 0.9.29 March 2010
procedure GetDesignerUnit(ADesigner: TDesigner;
var ActiveSourceEditor: TSourceEditor; var ActiveUnitInfo: TUnitInfo); override;
function GetProjectFileForProjectEditor(AEditor: TSourceEditorInterface): TLazProjectFile; override;
function GetDesignerForProjectEditor(AEditor: TSourceEditorInterface;
LoadForm: boolean): TIDesigner; override;
function GetDesignerWithProjectFile(AFile: TLazProjectFile;
@ -11544,6 +11545,12 @@ begin
end;
end;
function TMainIDE.GetProjectFileForProjectEditor(AEditor: TSourceEditorInterface
): TLazProjectFile;
begin
Result := Project1.UnitWithEditorComponent(AEditor);
end;
function TMainIDE.GetDesignerForProjectEditor(AEditor: TSourceEditorInterface;
LoadForm: boolean): TIDesigner;
var

View File

@ -53,6 +53,7 @@ uses
SynPluginSyncronizedEditBase,
// Intf
SrcEditorIntf, MenuIntf, LazIDEIntf, PackageIntf, IDEHelpIntf, IDEImagesIntf,
ProjectIntf,
// IDE units
IDEDialogs, LazarusIDEStrConsts, IDECommands, EditorOptions,
WordCompletion, FindReplaceDialog, IDEProcs, IDEOptionDefs,
@ -386,6 +387,7 @@ type
procedure SetLines(const AValue: TStrings); override;
// context
function GetProjectFile: TLazProjectFile; override;
procedure UpdateProjectFile; override;
function GetDesigner(LoadForm: boolean): TIDesigner; override;
@ -3984,6 +3986,11 @@ begin
FEditor.Lines:=AValue;
end;
function TSourceEditor.GetProjectFile: TLazProjectFile;
begin
Result:=LazarusIDE.GetProjectFileForProjectEditor(Self);
end;
procedure TSourceEditor.UpdateProjectFile;
begin
if Assigned(Manager) and Assigned(Manager.OnEditorMoved)
@ -6300,7 +6307,6 @@ end;
Procedure TSourceNotebook.ReloadEditorOptions;
var
I: integer;
h: TLazSyntaxHighlighter;
Begin
for i := 0 to EditorCount-1 do
Editors[i].RefreshEditorSettings;