mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 19:00:27 +02:00
IDE: Cleanup.
git-svn-id: trunk@49280 -
This commit is contained in:
parent
51d721b429
commit
71a92380d4
@ -19,7 +19,7 @@ unit AdvLed;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
LCLIntf, LCLType,LResources,Classes, Types, ExtCtrls, Controls, Graphics;
|
LCLType, Classes, ExtCtrls, Controls, Graphics;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ unit indcyClasses;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
LCLIntf, LCLType, Classes, Forms, Graphics, Math, Controls, ExtCtrls, SysUtils,
|
LCLIntf, Classes, Graphics, Controls, SysUtils,
|
||||||
indcyTypes, indcyGraphics;
|
indcyTypes, indcyGraphics;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
@ -36,8 +36,7 @@ uses
|
|||||||
CodeToolManager,
|
CodeToolManager,
|
||||||
CodyStrConsts, CodyUtils, CodyCtrls, CodyOpts,
|
CodyStrConsts, CodyUtils, CodyCtrls, CodyOpts,
|
||||||
PPUListDlg, AddAssignMethodDlg, AddWithBlockDlg,
|
PPUListDlg, AddAssignMethodDlg, AddWithBlockDlg,
|
||||||
CodyNodeInfoDlg, CodyFrm, DeclareVarDlg, CodyCopyDeclaration,
|
CodyNodeInfoDlg, CodyFrm, DeclareVarDlg, CodyIdentifiersDlg, CodyMiscOptsFrame;
|
||||||
CodyIdentifiersDlg, CodyMiscOptsFrame;
|
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
|
|
||||||
|
@ -164,7 +164,6 @@ procedure TCDDrawerWinCE.DrawCheckBoxSquare(ADest: TCanvas; ADestPos: TPoint;
|
|||||||
ASize: TSize; AState: TCDControlState; AStateEx: TCDControlStateEx);
|
ASize: TSize; AState: TCDControlState; AStateEx: TCDControlStateEx);
|
||||||
var
|
var
|
||||||
lHalf, lSquareHalf, lSquareHeight: Integer;
|
lHalf, lSquareHalf, lSquareHeight: Integer;
|
||||||
lColor: TColor;
|
|
||||||
begin
|
begin
|
||||||
lHalf := ASize.cy div 2;
|
lHalf := ASize.cy div 2;
|
||||||
lSquareHalf := GetMeasures(TCDCHECKBOX_SQUARE_HALF_HEIGHT);
|
lSquareHalf := GetMeasures(TCDCHECKBOX_SQUARE_HALF_HEIGHT);
|
||||||
|
@ -430,8 +430,6 @@ procedure TCDPageControlEditor.ExecuteVerb(Index: integer);
|
|||||||
var
|
var
|
||||||
NewPage: TCDTabSheet;
|
NewPage: TCDTabSheet;
|
||||||
Hook: TPropertyEditorHook;
|
Hook: TPropertyEditorHook;
|
||||||
PageComponent: TPersistent;
|
|
||||||
OldPage: longint;
|
|
||||||
lPageName: String;
|
lPageName: String;
|
||||||
begin
|
begin
|
||||||
if not GetHook(Hook) then exit;
|
if not GetHook(Hook) then exit;
|
||||||
|
@ -81,7 +81,7 @@ Type
|
|||||||
private
|
private
|
||||||
FFormDescr: TCustomFormDescr;
|
FFormDescr: TCustomFormDescr;
|
||||||
Public
|
Public
|
||||||
Constructor Create(ADescr : TCustomFormDescr);
|
Constructor Create(ADescr : TCustomFormDescr); overload;
|
||||||
Property FormDescr : TCustomFormDescr Read FFormDescr;
|
Property FormDescr : TCustomFormDescr Read FFormDescr;
|
||||||
Function GetLocalizedName : String; override;
|
Function GetLocalizedName : String; override;
|
||||||
Function GetLocalizedDescription : String; override;
|
Function GetLocalizedDescription : String; override;
|
||||||
|
@ -18,7 +18,7 @@ unit MaskPropEdit;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, MaskUtils, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, Forms, Controls, Graphics, Dialogs,
|
||||||
StdCtrls, Buttons, ExtCtrls, FileUtil, MaskEdit, LazIDEIntf,
|
StdCtrls, Buttons, ExtCtrls, FileUtil, MaskEdit, LazIDEIntf,
|
||||||
PropEdits, ComponentEditors, ObjInspStrConsts, ButtonPanel;
|
PropEdits, ComponentEditors, ObjInspStrConsts, ButtonPanel;
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ function SafeToRemoveBeginEnd(const pcNode: TParseTreeNode): Boolean;
|
|||||||
const
|
const
|
||||||
{ if there is an if stament with no else case immediately hereunder,
|
{ if there is an if stament with no else case immediately hereunder,
|
||||||
should find it by this depth }
|
should find it by this depth }
|
||||||
IMMEDIATE_IF_DEPTH = 4;
|
//IMMEDIATE_IF_DEPTH = 4;
|
||||||
MAX_IF_CLIMB = 5;
|
MAX_IF_CLIMB = 5;
|
||||||
var
|
var
|
||||||
lcParent: TParseTreeNode;
|
lcParent: TParseTreeNode;
|
||||||
|
@ -68,7 +68,7 @@ uses
|
|||||||
{ jcf }
|
{ jcf }
|
||||||
JcfSettings, jcfuiconsts,
|
JcfSettings, jcfuiconsts,
|
||||||
{ local }
|
{ local }
|
||||||
Capitalisation, SettingsTypes, SetAsm;
|
SettingsTypes, SetAsm;
|
||||||
|
|
||||||
procedure TfAsm.FrameResize(Sender:TObject);
|
procedure TfAsm.FrameResize(Sender:TObject);
|
||||||
begin
|
begin
|
||||||
|
@ -31,8 +31,7 @@ interface
|
|||||||
{ preprocessor symbols }
|
{ preprocessor symbols }
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, Controls, Forms, StdCtrls,
|
Classes, StdCtrls, IDEOptionsIntf;
|
||||||
IDEOptionsIntf;
|
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -61,7 +60,7 @@ implementation
|
|||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
JcfHelp, JcfSettings, jcfuiconsts;
|
JcfSettings, jcfuiconsts;
|
||||||
|
|
||||||
constructor TfPreProcessor.Create(AOwner: TComponent);
|
constructor TfPreProcessor.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
|
@ -61,7 +61,7 @@ type
|
|||||||
fUnitsToFixCase: TStringToStringTree;// Like rename but done for every target.
|
fUnitsToFixCase: TStringToStringTree;// Like rename but done for every target.
|
||||||
fUnitsToComment: TStringList; // List of units to be commented.
|
fUnitsToComment: TStringList; // List of units to be commented.
|
||||||
fMissingUnits: TStringList; // Units not found in search path.
|
fMissingUnits: TStringList; // Units not found in search path.
|
||||||
function FindMissingUnits(AUnitUpdater: TStringMapUpdater): boolean;
|
function FindMissingUnits: boolean;
|
||||||
procedure ToBeRenamedOrRemoved(AOldName, ANewName: string);
|
procedure ToBeRenamedOrRemoved(AOldName, ANewName: string);
|
||||||
procedure FindReplacement(AUnitUpdater: TStringMapUpdater;
|
procedure FindReplacement(AUnitUpdater: TStringMapUpdater;
|
||||||
AMapToEdit: TStringToStringTree);
|
AMapToEdit: TStringToStringTree);
|
||||||
@ -210,7 +210,7 @@ begin
|
|||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TUsedUnits.FindMissingUnits(AUnitUpdater: TStringMapUpdater): boolean;
|
function TUsedUnits.FindMissingUnits: boolean;
|
||||||
var
|
var
|
||||||
UsesNode: TCodeTreeNode;
|
UsesNode: TCodeTreeNode;
|
||||||
InAtom, UnitNameAtom: TAtomPosition;
|
InAtom, UnitNameAtom: TAtomPosition;
|
||||||
@ -595,8 +595,8 @@ begin
|
|||||||
if fCTLink.Settings.UnitsReplaceMode=rlInteractive then
|
if fCTLink.Settings.UnitsReplaceMode=rlInteractive then
|
||||||
MapToEdit:=TStringToStringTree.Create(false);
|
MapToEdit:=TStringToStringTree.Create(false);
|
||||||
fCTLink.CodeTool.BuildTree(lsrEnd);
|
fCTLink.CodeTool.BuildTree(lsrEnd);
|
||||||
if not (fMainUsedUnits.FindMissingUnits(UnitUpdater) and
|
if not (fMainUsedUnits.FindMissingUnits and
|
||||||
fImplUsedUnits.FindMissingUnits(UnitUpdater)) then
|
fImplUsedUnits.FindMissingUnits) then
|
||||||
exit(mrCancel);
|
exit(mrCancel);
|
||||||
|
|
||||||
// Find replacements for missing units from settings.
|
// Find replacements for missing units from settings.
|
||||||
|
@ -104,7 +104,7 @@ type
|
|||||||
protected
|
protected
|
||||||
function ColSizeGetter(AColId: Integer; var ASize: Integer): Boolean;
|
function ColSizeGetter(AColId: Integer; var ASize: Integer): Boolean;
|
||||||
procedure ColSizeSetter(AColId: Integer; ASize: Integer);
|
procedure ColSizeSetter(AColId: Integer; ASize: Integer);
|
||||||
procedure InternalExecute(const AExpression: ansistring; ARepeatCount: Integer = -1);
|
procedure InternalExecute(const AExpression: ansistring);
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -790,7 +790,7 @@ begin
|
|||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEInspectDlg.InternalExecute(const AExpression: ansistring; ARepeatCount: Integer);
|
procedure TIDEInspectDlg.InternalExecute(const AExpression: ansistring);
|
||||||
begin
|
begin
|
||||||
if FHistoryIndex >= FHistory.Count then
|
if FHistoryIndex >= FHistory.Count then
|
||||||
FHistoryIndex := FHistory.Count - 1;
|
FHistoryIndex := FHistory.Count - 1;
|
||||||
|
@ -208,7 +208,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function IsCodeTemplateOk(ASynAutoComplete: TSynEditAutoComplete;
|
function IsCodeTemplateOk(ASynAutoComplete: TSynEditAutoComplete;
|
||||||
const AToken, AComment: string; AIndex: integer): boolean;
|
const AToken: string; AIndex: integer): boolean;
|
||||||
var
|
var
|
||||||
n: integer;
|
n: integer;
|
||||||
begin
|
begin
|
||||||
@ -238,8 +238,7 @@ begin
|
|||||||
|
|
||||||
if InputQuery(lisCodeTemplAddCodeTemplate,
|
if InputQuery(lisCodeTemplAddCodeTemplate,
|
||||||
[lisCodeTemplToken, lisCodeTemplComment], Str) then
|
[lisCodeTemplToken, lisCodeTemplComment], Str) then
|
||||||
if IsCodeTemplateOk(ASynAutoComplete,
|
if IsCodeTemplateOk(ASynAutoComplete, Str[0], ASynAutoComplete.Completions.Count) then
|
||||||
Str[0], Str[1], ASynAutoComplete.Completions.Count) then
|
|
||||||
begin
|
begin
|
||||||
Result:= mrOk;
|
Result:= mrOk;
|
||||||
AToken:= Str[0];
|
AToken:= Str[0];
|
||||||
@ -262,8 +261,7 @@ begin
|
|||||||
if not InputQuery(lisCodeTemplEditCodeTemplate,
|
if not InputQuery(lisCodeTemplEditCodeTemplate,
|
||||||
[lisCodeTemplToken, lisCodeTemplComment], Str) then exit;
|
[lisCodeTemplToken, lisCodeTemplComment], Str) then exit;
|
||||||
|
|
||||||
if not IsCodeTemplateOk(ASynAutoComplete,
|
if not IsCodeTemplateOk(ASynAutoComplete, Str[0], AIndex) then exit;
|
||||||
Str[0], Str[1], AIndex) then exit;
|
|
||||||
|
|
||||||
ASynAutoComplete.Completions[AIndex]:= Str[0];
|
ASynAutoComplete.Completions[AIndex]:= Str[0];
|
||||||
ASynAutoComplete.CompletionComments[AIndex]:= Str[1];
|
ASynAutoComplete.CompletionComments[AIndex]:= Str[1];
|
||||||
|
@ -351,7 +351,7 @@ begin
|
|||||||
Code:=CodeToolBoss.LoadFile(Msg.GetFullFilename,true,false);
|
Code:=CodeToolBoss.LoadFile(Msg.GetFullFilename,true,false);
|
||||||
if Code=nil then exit;
|
if Code=nil then exit;
|
||||||
|
|
||||||
if QuickFixLocalVarNotInitialized(Code,Msg.Column,Msg.Line,Identifier) then
|
if QuickFixLocalVarNotInitialized(Code, Msg.Column, Msg.Line) then
|
||||||
Msg.MarkFixed;
|
Msg.MarkFixed;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -136,7 +136,6 @@ procedure TMouseaActionDialog.FormCreate(Sender: TObject);
|
|||||||
var
|
var
|
||||||
mb: TSynMouseButton;
|
mb: TSynMouseButton;
|
||||||
cc: TSynMAClickCount;
|
cc: TSynMAClickCount;
|
||||||
s: string;
|
|
||||||
begin
|
begin
|
||||||
ButtonName[mbXLeft]:=dlgMouseOptBtnLeft;
|
ButtonName[mbXLeft]:=dlgMouseOptBtnLeft;
|
||||||
ButtonName[mbXRight]:=dlgMouseOptBtnRight;
|
ButtonName[mbXRight]:=dlgMouseOptBtnRight;
|
||||||
|
@ -57,13 +57,11 @@ type
|
|||||||
procedure Init(TheStatements: TStrings; TheInsertPositions: TObjectList);
|
procedure Init(TheStatements: TStrings; TheInsertPositions: TObjectList);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function QuickFixLocalVarNotInitialized(Code: TCodeBuffer; X, Y: integer;
|
function QuickFixLocalVarNotInitialized(Code: TCodeBuffer; X, Y: integer): boolean;
|
||||||
Identifier: string): boolean;
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
function QuickFixLocalVarNotInitialized(Code: TCodeBuffer; X, Y: integer;
|
function QuickFixLocalVarNotInitialized(Code: TCodeBuffer; X, Y: integer): boolean;
|
||||||
Identifier: string): boolean;
|
|
||||||
var
|
var
|
||||||
Statements: TStrings;
|
Statements: TStrings;
|
||||||
InsertPositions: TObjectList;
|
InsertPositions: TObjectList;
|
||||||
|
Loading…
Reference in New Issue
Block a user