mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 12:39:29 +02:00
IDE: IDE internal: moved modified to about ide
git-svn-id: trunk@34691 -
This commit is contained in:
parent
cf3e60b2ce
commit
f668a6c4ef
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -4272,8 +4272,6 @@ ide/idehelpmanager.pas svneol=native#text/pascal
|
||||
ide/ideinfodlg.lfm svneol=native#text/plain
|
||||
ide/ideinfodlg.pas svneol=native#text/plain
|
||||
ide/ideminilibc.pas svneol=native#text/plain
|
||||
ide/idemodifiedinfo.lfm svneol=native#text/plain
|
||||
ide/idemodifiedinfo.pas svneol=native#text/plain
|
||||
ide/ideoptiondefs.pas svneol=native#text/pascal
|
||||
ide/ideoptionsdlg.lfm svneol=native#text/plain
|
||||
ide/ideoptionsdlg.pas svneol=native#text/pascal
|
||||
|
@ -1,24 +1,55 @@
|
||||
object IDEInfoDialog: TIDEInfoDialog
|
||||
Left = 269
|
||||
Height = 330
|
||||
Height = 397
|
||||
Top = 294
|
||||
Width = 644
|
||||
Width = 735
|
||||
Caption = 'IDEInfoDialog'
|
||||
ClientHeight = 330
|
||||
ClientWidth = 644
|
||||
ClientHeight = 397
|
||||
ClientWidth = 735
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '0.9.31'
|
||||
object Memo1: TMemo
|
||||
object PageControl1: TPageControl
|
||||
Left = 0
|
||||
Height = 330
|
||||
Height = 397
|
||||
Top = 0
|
||||
Width = 644
|
||||
Width = 735
|
||||
ActivePage = ModifiedTabSheet
|
||||
Align = alClient
|
||||
Lines.Strings = (
|
||||
'Memo1'
|
||||
)
|
||||
ReadOnly = True
|
||||
ScrollBars = ssAutoBoth
|
||||
TabIndex = 1
|
||||
TabOrder = 0
|
||||
object GeneralTabSheet: TTabSheet
|
||||
Caption = 'General'
|
||||
ClientHeight = 361
|
||||
ClientWidth = 727
|
||||
object GeneralMemo: TMemo
|
||||
Left = 0
|
||||
Height = 361
|
||||
Top = 0
|
||||
Width = 727
|
||||
Align = alClient
|
||||
Lines.Strings = (
|
||||
'Memo1'
|
||||
)
|
||||
ReadOnly = True
|
||||
ScrollBars = ssAutoBoth
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object ModifiedTabSheet: TTabSheet
|
||||
Caption = 'Modified'
|
||||
ClientHeight = 361
|
||||
ClientWidth = 727
|
||||
object ModifiedMemo: TMemo
|
||||
Left = 0
|
||||
Height = 361
|
||||
Top = 0
|
||||
Width = 727
|
||||
Align = alClient
|
||||
Lines.Strings = (
|
||||
'ModifiedMemo'
|
||||
)
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -31,22 +31,31 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
DefineTemplates, EnvironmentOpts, AboutFrm, LazConf, LazarusIDEStrConsts;
|
||||
ComCtrls, DefineTemplates, EnvironmentOpts, AboutFrm, LazConf,
|
||||
LazarusIDEStrConsts, Project, SourceEditor;
|
||||
|
||||
type
|
||||
|
||||
{ TIDEInfoDialog }
|
||||
|
||||
TIDEInfoDialog = class(TForm)
|
||||
Memo1: TMemo;
|
||||
GeneralMemo: TMemo;
|
||||
ModifiedMemo: TMemo;
|
||||
PageControl1: TPageControl;
|
||||
GeneralTabSheet: TTabSheet;
|
||||
ModifiedTabSheet: TTabSheet;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
// general
|
||||
procedure GatherIDEVersion(sl: TStrings);
|
||||
procedure GatherParameters(sl: TStrings);
|
||||
procedure GatherEnvironmentVars(sl: TStrings);
|
||||
procedure GatherGlobalOptions(sl: TStrings);
|
||||
// modified
|
||||
procedure GatherModifiedProject(AProject: TProject; sl: TStrings);
|
||||
public
|
||||
procedure UpdateMemo;
|
||||
procedure UpdateGeneralMemo;
|
||||
procedure UpdateModifiedMemo;
|
||||
end;
|
||||
|
||||
var
|
||||
@ -77,7 +86,8 @@ procedure TIDEInfoDialog.FormCreate(Sender: TObject);
|
||||
begin
|
||||
Caption:=lisIDEInfoInformationAboutTheIDE;
|
||||
|
||||
UpdateMemo;
|
||||
UpdateGeneralMemo;
|
||||
UpdateModifiedMemo;
|
||||
end;
|
||||
|
||||
procedure TIDEInfoDialog.GatherIDEVersion(sl: TStrings);
|
||||
@ -130,7 +140,53 @@ begin
|
||||
sl.Add('');
|
||||
end;
|
||||
|
||||
procedure TIDEInfoDialog.UpdateMemo;
|
||||
procedure TIDEInfoDialog.GatherModifiedProject(AProject: TProject; sl: TStrings);
|
||||
var
|
||||
aFile: TUnitInfo;
|
||||
HeaderWritten: Boolean;
|
||||
s: String;
|
||||
begin
|
||||
// summary
|
||||
if AProject.Modified then
|
||||
sl.Add('Project.Modified');
|
||||
if AProject.SessionModified then
|
||||
sl.Add('Project.SessionModified');
|
||||
if Project1.SomethingModified(true,false) then
|
||||
sl.Add('Project.SomethingModified Data');
|
||||
if Project1.SomethingModified(false,true) then
|
||||
sl.Add('Project.SomethingModified Session');
|
||||
if SourceEditorManager.SomethingModified(false) then
|
||||
sl.Add('SourceEditorManager.SomethingModified');
|
||||
if AProject.BuildModes.IsModified(false) then
|
||||
sl.Add('Project.BuildModes.IsModified data');
|
||||
if AProject.BuildModes.IsModified(true) then
|
||||
sl.Add('Project.BuildModes.IsModified session');
|
||||
|
||||
// details
|
||||
HeaderWritten:=false;
|
||||
aFile:=AProject.FirstPartOfProject;
|
||||
while aFile<>nil do begin
|
||||
if aFile.Modified or aFile.SessionModified
|
||||
or ((aFile.Source<>nil) and aFile.Source.Modified)
|
||||
then begin
|
||||
if not HeaderWritten then begin
|
||||
sl.Add('');
|
||||
sl.Add('Project units:');
|
||||
s:=aFile.GetShortFilename(true);
|
||||
if aFile.Modified then
|
||||
s:=s+' Modified';
|
||||
if aFile.SessionModified then
|
||||
s:=s+' SessionModified';
|
||||
if (aFile.Source<>nil) and (aFile.Source.Modified) then
|
||||
s:=s+' Source.Modified';
|
||||
sl.Add(s);
|
||||
end;
|
||||
end;
|
||||
aFile:=aFile.NextPartOfProject;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TIDEInfoDialog.UpdateGeneralMemo;
|
||||
var
|
||||
sl: TStringList;
|
||||
begin
|
||||
@ -140,7 +196,20 @@ begin
|
||||
GatherGlobalOptions(sl);
|
||||
GatherParameters(sl);
|
||||
GatherEnvironmentVars(sl);
|
||||
Memo1.Lines.Assign(sl);
|
||||
GeneralMemo.Lines.Assign(sl);
|
||||
finally
|
||||
sl.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TIDEInfoDialog.UpdateModifiedMemo;
|
||||
var
|
||||
sl: TStringList;
|
||||
begin
|
||||
sl:=TStringList.Create;
|
||||
try
|
||||
GatherModifiedProject(Project1,sl);
|
||||
ModifiedMemo.Lines.Assign(sl);
|
||||
finally
|
||||
sl.Free;
|
||||
end;
|
||||
|
@ -1,41 +0,0 @@
|
||||
object IDEModifiedInfoDialog: TIDEModifiedInfoDialog
|
||||
Left = 275
|
||||
Height = 450
|
||||
Top = 250
|
||||
Width = 704
|
||||
Caption = 'IDEModifiedInfoDialog'
|
||||
ClientHeight = 450
|
||||
ClientWidth = 704
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '0.9.31'
|
||||
object PageControl1: TPageControl
|
||||
Left = 0
|
||||
Height = 450
|
||||
Top = 0
|
||||
Width = 704
|
||||
ActivePage = ProjectTabSheet
|
||||
Align = alClient
|
||||
TabIndex = 0
|
||||
TabOrder = 0
|
||||
object ProjectTabSheet: TTabSheet
|
||||
Caption = 'Project'
|
||||
ClientHeight = 414
|
||||
ClientWidth = 696
|
||||
object ProjectMemo: TMemo
|
||||
Left = 0
|
||||
Height = 414
|
||||
Top = 0
|
||||
Width = 696
|
||||
Align = alClient
|
||||
Lines.Strings = (
|
||||
'ValuesMemo'
|
||||
''
|
||||
)
|
||||
ReadOnly = True
|
||||
ScrollBars = ssAutoBoth
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -1,141 +0,0 @@
|
||||
{
|
||||
***************************************************************************
|
||||
* *
|
||||
* This source is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This code is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* General Public License for more details. *
|
||||
* *
|
||||
* A copy of the GNU General Public License is available on the World *
|
||||
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
||||
* obtain it by writing to the Free Software Foundation, *
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
Author: Mattias Gaertner
|
||||
|
||||
Abstract:
|
||||
IDE dialog showing stats what is modified.
|
||||
}
|
||||
unit IDEModifiedInfo;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLProc, FileUtil, Forms, Controls, Graphics, Dialogs,
|
||||
StdCtrls, ComCtrls, Project, SourceEditor;
|
||||
|
||||
type
|
||||
|
||||
{ TIDEModifiedInfoDialog }
|
||||
|
||||
TIDEModifiedInfoDialog = class(TForm)
|
||||
ProjectMemo: TMemo;
|
||||
PageControl1: TPageControl;
|
||||
ProjectTabSheet: TTabSheet;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
procedure UpdateProjectMemo;
|
||||
procedure GatherProject(AProject: TProject; sl: TStrings);
|
||||
public
|
||||
end;
|
||||
|
||||
function ShowIDEModifiedInfo: TModalResult;
|
||||
|
||||
implementation
|
||||
|
||||
function ShowIDEModifiedInfo: TModalResult;
|
||||
var
|
||||
Dlg: TIDEModifiedInfoDialog;
|
||||
begin
|
||||
Dlg:=TIDEModifiedInfoDialog.Create(nil);
|
||||
try
|
||||
Result:=Dlg.ShowModal;
|
||||
finally
|
||||
Dlg.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TIDEModifiedInfoDialog }
|
||||
|
||||
procedure TIDEModifiedInfoDialog.FormCreate(Sender: TObject);
|
||||
begin
|
||||
Caption:='Modified items in IDE';
|
||||
|
||||
UpdateProjectMemo;
|
||||
PageControl1.PageIndex:=0;
|
||||
end;
|
||||
|
||||
procedure TIDEModifiedInfoDialog.UpdateProjectMemo;
|
||||
var
|
||||
sl: TStringList;
|
||||
begin
|
||||
sl:=TStringList.Create;
|
||||
try
|
||||
GatherProject(Project1,sl);
|
||||
|
||||
ProjectMemo.Lines.Assign(sl);
|
||||
finally
|
||||
sl.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TIDEModifiedInfoDialog.GatherProject(AProject: TProject; sl: TStrings
|
||||
);
|
||||
var
|
||||
aFile: TUnitInfo;
|
||||
HeaderWritten: Boolean;
|
||||
s: String;
|
||||
begin
|
||||
// summary
|
||||
if AProject.Modified then
|
||||
sl.Add('Project.Modified');
|
||||
if AProject.SessionModified then
|
||||
sl.Add('Project.SessionModified');
|
||||
if Project1.SomethingModified(true,false) then
|
||||
sl.Add('Project.SomethingModified Data');
|
||||
if Project1.SomethingModified(false,true) then
|
||||
sl.Add('Project.SomethingModified Session');
|
||||
if SourceEditorManager.SomethingModified(false) then
|
||||
sl.Add('SourceEditorManager.SomethingModified');
|
||||
if AProject.BuildModes.IsModified(false) then
|
||||
sl.Add('Project.BuildModes.IsModified data');
|
||||
if AProject.BuildModes.IsModified(true) then
|
||||
sl.Add('Project.BuildModes.IsModified session');
|
||||
|
||||
// details
|
||||
HeaderWritten:=false;
|
||||
aFile:=AProject.FirstPartOfProject;
|
||||
while aFile<>nil do begin
|
||||
if aFile.Modified or aFile.SessionModified
|
||||
or ((aFile.Source<>nil) and aFile.Source.Modified)
|
||||
then begin
|
||||
if not HeaderWritten then begin
|
||||
sl.Add('');
|
||||
sl.Add('Project units:');
|
||||
s:=aFile.GetShortFilename(true);
|
||||
if aFile.Modified then
|
||||
s:=s+' Modified';
|
||||
if aFile.SessionModified then
|
||||
s:=s+' SessionModified';
|
||||
if (aFile.Source<>nil) and (aFile.Source.Modified) then
|
||||
s:=s+' Source.Modified';
|
||||
sl.Add(s);
|
||||
end;
|
||||
end;
|
||||
aFile:=aFile.NextPartOfProject;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -145,7 +145,7 @@ uses
|
||||
OutputFilter, JumpHistoryView, ManageExamples,
|
||||
BuildLazDialog, BuildProfileManager, BuildManager, CheckCompOptsForNewUnitDlg,
|
||||
MiscOptions, InputHistory, UnitDependencies, ClipBoardHistory,
|
||||
IDEFPCInfo, IDEInfoDlg, IDEModifiedInfo, ProcessList, InitialSetupDlgs,
|
||||
IDEFPCInfo, IDEInfoDlg, ProcessList, InitialSetupDlgs,
|
||||
NewDialog, MakeResStrDlg, DialogProcs, FindReplaceDialog, FindInFilesDlg,
|
||||
CodeExplorer, BuildFileDlg, ProcedureList, ExtractProcDlg,
|
||||
FindRenameIdentifier, AbstractsMethodsDlg, EmptyMethodsDlg, UnusedUnitsDlg,
|
||||
@ -260,7 +260,6 @@ type
|
||||
procedure mnuViewIDESpeedButtonsClicked(Sender: TObject);
|
||||
procedure mnuViewFPCInfoClicked(Sender: TObject);
|
||||
procedure mnuViewIDEInfoClicked(Sender: TObject);
|
||||
procedure mnuViewIDEModifiedInfoClicked(Sender: TObject);
|
||||
|
||||
// source menu
|
||||
procedure mnuSourceClicked(Sender: TObject);
|
||||
@ -2527,7 +2526,6 @@ begin
|
||||
|
||||
itmViewFPCInfo.OnClick:=@mnuViewFPCInfoClicked;
|
||||
itmViewIDEInfo.OnClick:=@mnuViewIDEInfoClicked;
|
||||
itmViewIDEModifiedInfo.OnClick:=@mnuViewIDEModifiedInfoClicked;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -2725,11 +2723,6 @@ begin
|
||||
ShowIDEInfo;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.mnuViewIDEModifiedInfoClicked(Sender: TObject);
|
||||
begin
|
||||
ShowIDEModifiedInfo;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.SetDesigning(AComponent: TComponent; Value: Boolean);
|
||||
begin
|
||||
SetComponentDesignMode(AComponent, Value);
|
||||
|
@ -197,7 +197,6 @@ type
|
||||
itmViewPackageLinks: TIDEMenuCommand;
|
||||
itmViewFPCInfo: TIDEMenuCommand;
|
||||
itmViewIDEInfo: TIDEMenuCommand;
|
||||
itmViewIDEModifiedInfo: TIDEMenuCommand;
|
||||
|
||||
// source menu
|
||||
//mnuSource: TIDEMenuSection;
|
||||
|
@ -538,7 +538,6 @@ begin
|
||||
CreateMenuItem(itmViewIDEInternalsWindows, itmViewPackageLinks, 'itmViewPackageLinks', lisMenuPackageLinks);
|
||||
CreateMenuItem(itmViewIDEInternalsWindows, itmViewFPCInfo, 'itmViewFPCInfo', lisMenuAboutFPC);
|
||||
CreateMenuItem(itmViewIDEInternalsWindows, itmViewIDEInfo, 'itmViewIDEInfo', lisAboutIDE);
|
||||
CreateMenuItem(itmViewIDEInternalsWindows, itmViewIDEModifiedInfo, 'itmViewIDEModifiedInfo', lisAboutModifiedItemsInTheIDE);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user