mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 06:45:37 +03:00
- Upgraded Code-Inspector
- Now checks language strings - New design - Better parsing - Displays actions - Added function: can't load files twice - Updated Code-Explorer - now faster - fixed a few small bugs - now keeps selection - Updated Settings-Dialog - Fixed output bug (showed sometimes huge numbers as line numbers) - Fixed design bug (displayed wrong plugin data on start) - Fixed small bug in the color dialog - Fixed small start bug (didn't show real plugin data on startup) - Added restore function - Fixed code-explorer bug (didn't recognize @-functions) - Fixed highlight bug (had problems with ^" and ^ in strings) - Fixed potential crash bug - Fixed another highlight bug - Fixed aother code-explorer bug... - Added 2 settings (for auto-complete and calltips) - Added SCM_SETTINGS_REMOVEPAGE-message - Fixed SCM_SETTINGS_CREATEPAGE bug
This commit is contained in:
parent
76b6510a27
commit
c3450df360
@ -113,9 +113,9 @@ RootDir=C:\Programme\Borland\Delphi7\Bin\
|
|||||||
IncludeVerInfo=1
|
IncludeVerInfo=1
|
||||||
AutoIncBuild=1
|
AutoIncBuild=1
|
||||||
MajorVer=1
|
MajorVer=1
|
||||||
MinorVer=2
|
MinorVer=3
|
||||||
Release=0
|
Release=0
|
||||||
Build=4
|
Build=9
|
||||||
Debug=0
|
Debug=0
|
||||||
PreRelease=0
|
PreRelease=0
|
||||||
Special=0
|
Special=0
|
||||||
@ -126,7 +126,7 @@ CodePage=1252
|
|||||||
[Version Info Keys]
|
[Version Info Keys]
|
||||||
CompanyName=AMX Mod X Dev Team
|
CompanyName=AMX Mod X Dev Team
|
||||||
FileDescription=
|
FileDescription=
|
||||||
FileVersion=1.2.0.4
|
FileVersion=1.3.0.9
|
||||||
InternalName=
|
InternalName=
|
||||||
LegalCopyright=
|
LegalCopyright=
|
||||||
LegalTrademarks=
|
LegalTrademarks=
|
||||||
|
@ -10,7 +10,6 @@ uses
|
|||||||
SysUtils,
|
SysUtils,
|
||||||
SciLexerMemo,
|
SciLexerMemo,
|
||||||
JvInspector,
|
JvInspector,
|
||||||
|
|
||||||
UnitfrmMain in 'UnitfrmMain.pas' {frmMain},
|
UnitfrmMain in 'UnitfrmMain.pas' {frmMain},
|
||||||
UnitMainTools in 'UnitMainTools.pas',
|
UnitMainTools in 'UnitMainTools.pas',
|
||||||
UnitfrmSettings in 'UnitfrmSettings.pas' {frmSettings},
|
UnitfrmSettings in 'UnitfrmSettings.pas' {frmSettings},
|
||||||
@ -61,6 +60,7 @@ begin
|
|||||||
for i := 1 to ParamCount do
|
for i := 1 to ParamCount do
|
||||||
SendStudioMsg(SCM_LOADFILE, ParamStr(i), 0);
|
SendStudioMsg(SCM_LOADFILE, ParamStr(i), 0);
|
||||||
end;
|
end;
|
||||||
|
SetForegroundWindow(FindWindow('TfrmMain', 'AMXX-Studio'));
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
Application.Initialize;
|
Application.Initialize;
|
||||||
@ -70,6 +70,9 @@ begin
|
|||||||
Application.CreateForm(TfrmSettings, frmSettings);
|
Application.CreateForm(TfrmSettings, frmSettings);
|
||||||
Application.OnMessage := frmMain.OnMessage;
|
Application.OnMessage := frmMain.OnMessage;
|
||||||
Application.OnShortCut := frmMain.OnShortCut;
|
Application.OnShortCut := frmMain.OnShortCut;
|
||||||
|
frmMain.sciEditor.Lines[5] := '#define PLUGIN "' + frmSettings.txtDefaultName.Text + '"';
|
||||||
|
frmMain.sciEditor.Lines[6] := '#define VERSION "' + frmSettings.txtDefaultVersion.Text + '"';
|
||||||
|
frmMain.sciEditor.Lines[7] := '#define AUTHOR "' + frmSettings.txtDefaultAuthor.Text + '"';
|
||||||
|
|
||||||
frmMain.sciPropertyLoader.FileName := ExtractFilePath(ParamStr(0)) + 'config\Editor.sci';
|
frmMain.sciPropertyLoader.FileName := ExtractFilePath(ParamStr(0)) + 'config\Editor.sci';
|
||||||
if FileExists(frmMain.sciPropertyLoader.FileName) then
|
if FileExists(frmMain.sciPropertyLoader.FileName) then
|
||||||
@ -129,7 +132,7 @@ begin
|
|||||||
ActivateProjects(0, False); // Started := True is already set here
|
ActivateProjects(0, False); // Started := True is already set here
|
||||||
PAWNProjects.Activate(PAWNProjects.Count -1, False, False);
|
PAWNProjects.Activate(PAWNProjects.Count -1, False, False);
|
||||||
end;
|
end;
|
||||||
UpdateCI;
|
UpdateCI(frmMain.sciEditor.GetCurrentLineNumber);
|
||||||
|
|
||||||
Application.CreateForm(TfrmSelectColor, frmSelectColor);
|
Application.CreateForm(TfrmSelectColor, frmSelectColor);
|
||||||
Application.CreateForm(TfrmInfo, frmInfo);
|
Application.CreateForm(TfrmInfo, frmInfo);
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -4,7 +4,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, Forms, SysUtils, ComCtrls, Windows, ScintillaLanguageManager,
|
Classes, Forms, SysUtils, ComCtrls, Windows, ScintillaLanguageManager,
|
||||||
Dialogs, CommCtrl;
|
Dialogs, CommCtrl, madExcept;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCodeExplorerUpdater = class(TThread)
|
TCodeExplorerUpdater = class(TThread)
|
||||||
@ -20,13 +20,15 @@ type
|
|||||||
|
|
||||||
eCode: TStringList;
|
eCode: TStringList;
|
||||||
|
|
||||||
eAutoComplete, eCallTips, eKeywords: String;
|
eAutoComplete, eCallTips, eKeywords: string;
|
||||||
protected
|
protected
|
||||||
procedure Execute; override;
|
procedure Execute; override;
|
||||||
procedure GetCode;
|
procedure GetCode;
|
||||||
procedure SetValuesPawn;
|
procedure SetValuesPawn;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function GetNode(eText: string): TTreeNode;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses UnitfrmMain, UnitLanguages, UnitMainTools, UnitCodeUtils,
|
uses UnitfrmMain, UnitLanguages, UnitMainTools, UnitCodeUtils,
|
||||||
@ -85,14 +87,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
// GABEN
|
if FindWindow(nil, 'Delphi 7') <> 0 then // This is "Debug Mode"
|
||||||
|
madExcept.HandleException;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
Sleep(1000);
|
Sleep(1000);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Sleep(50);
|
Sleep(50);
|
||||||
until (Application.Terminated);
|
until not Started;
|
||||||
|
|
||||||
eCode.Free;
|
eCode.Free;
|
||||||
eConstants.Free;
|
eConstants.Free;
|
||||||
@ -113,13 +116,12 @@ begin
|
|||||||
eCode.Assign(frmMain.sciEditor.Lines);
|
eCode.Assign(frmMain.sciEditor.Lines);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCodeExplorerUpdater.SetValuesPawn;
|
function GetNode(eText: string): TTreeNode;
|
||||||
function GetNode(eText: String): TTreeNode;
|
|
||||||
var i: integer;
|
var i: integer;
|
||||||
begin
|
begin
|
||||||
Result := nil;
|
Result := nil;
|
||||||
|
|
||||||
for i := 0 to frmMain.trvExplorer.Items.Count -1 do begin
|
for i := 0 to frmMain.trvExplorer.Items.Count - 1 do begin
|
||||||
if (frmMain.trvExplorer.Items[i].Text = eText) then begin
|
if (frmMain.trvExplorer.Items[i].Text = eText) then begin
|
||||||
if (frmMain.trvExplorer.Items[i].ImageIndex = 42) or (frmMain.trvExplorer.Items[i].ImageIndex = 43) then begin
|
if (frmMain.trvExplorer.Items[i].ImageIndex = 42) or (frmMain.trvExplorer.Items[i].ImageIndex = 43) then begin
|
||||||
Result := frmMain.trvExplorer.Items[i];
|
Result := frmMain.trvExplorer.Items[i];
|
||||||
@ -129,183 +131,208 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCodeExplorerUpdater.SetValuesPawn;
|
||||||
var exConstants, exDefined, exIncluded, exMethods, exDefault, exEvents,
|
var exConstants, exDefined, exIncluded, exMethods, exDefault, exEvents,
|
||||||
exStocks, exNatives, exForwards, exVariables, exCVars: Boolean;
|
exStocks, exNatives, exForwards, exVariables, exCVars: Boolean;
|
||||||
i, eSelStart, eSelLength: integer;
|
i, eSelStart, eSelLength: integer;
|
||||||
LineMaxSubord: integer;
|
LineMaxSubord: integer;
|
||||||
eStr: TStringList;
|
eStr: TStringList;
|
||||||
eScrollPosX, eScrollPosY: Integer;
|
eScrollPosX, eScrollPosY: Integer;
|
||||||
|
eTempNode: TTreeNode;
|
||||||
|
eSelected: Integer;
|
||||||
begin
|
begin
|
||||||
|
if Application.Terminated then exit;
|
||||||
if frmMain.trvExplorer.Items.Count = 0 then exit;
|
if frmMain.trvExplorer.Items.Count = 0 then exit;
|
||||||
|
|
||||||
|
if Assigned(frmMain.trvExplorer.Selected) then
|
||||||
|
eSelected := frmMain.trvExplorer.Selected.AbsoluteIndex
|
||||||
|
else
|
||||||
|
eSelected := -1;
|
||||||
|
|
||||||
frmMain.trvExplorer.Items.BeginUpdate;
|
frmMain.trvExplorer.Items.BeginUpdate;
|
||||||
eScrollPosX := GetScrollPos(frmMain.trvExplorer.Handle, SB_HORZ);
|
try
|
||||||
eScrollPosY := GetScrollPos(frmMain.trvExplorer.Handle, SB_VERT);
|
eScrollPosX := GetScrollPos(frmMain.trvExplorer.Handle, SB_HORZ);
|
||||||
|
eScrollPosY := GetScrollPos(frmMain.trvExplorer.Handle, SB_VERT);
|
||||||
|
|
||||||
// Get Expanded-State and delete children
|
// Get Expanded-State and delete children
|
||||||
with GetNode('Constants') do begin
|
with GetNode('Constants') do begin
|
||||||
exConstants := Expanded;
|
exConstants := Expanded;
|
||||||
DeleteChildren;
|
DeleteChildren;
|
||||||
end;
|
end;
|
||||||
with GetNode('CVars') do begin
|
with GetNode('CVars') do begin
|
||||||
exCVars := Expanded;
|
exCVars := Expanded;
|
||||||
DeleteChildren;
|
DeleteChildren;
|
||||||
end;
|
end;
|
||||||
with GetNode('Defined') do begin
|
with GetNode('Defined') do begin
|
||||||
exDefined := Expanded;
|
exDefined := Expanded;
|
||||||
DeleteChildren;
|
DeleteChildren;
|
||||||
end;
|
end;
|
||||||
with GetNode('Included') do begin
|
with GetNode('Included') do begin
|
||||||
exIncluded := Expanded;
|
exIncluded := Expanded;
|
||||||
DeleteChildren;
|
DeleteChildren;
|
||||||
end;
|
end;
|
||||||
with GetNode('Default') do begin
|
with GetNode('Default') do begin
|
||||||
exDefault := Expanded;
|
exDefault := Expanded;
|
||||||
DeleteChildren;
|
DeleteChildren;
|
||||||
end;
|
end;
|
||||||
with GetNode('Events') do begin
|
with GetNode('Events') do begin
|
||||||
exEvents := Expanded;
|
exEvents := Expanded;
|
||||||
DeleteChildren;
|
DeleteChildren;
|
||||||
end;
|
end;
|
||||||
with GetNode('Stocks') do begin
|
with GetNode('Stocks') do begin
|
||||||
exStocks := Expanded;
|
exStocks := Expanded;
|
||||||
DeleteChildren;
|
DeleteChildren;
|
||||||
end;
|
end;
|
||||||
with GetNode('Methods') do begin
|
with GetNode('Methods') do begin
|
||||||
exMethods := Expanded;
|
exMethods := Expanded;
|
||||||
DeleteChildren;
|
DeleteChildren;
|
||||||
end;
|
end;
|
||||||
with GetNode('Natives') do begin
|
with GetNode('Natives') do begin
|
||||||
exNatives := Expanded;
|
exNatives := Expanded;
|
||||||
DeleteChildren;
|
DeleteChildren;
|
||||||
end;
|
end;
|
||||||
with GetNode('Forwards') do begin
|
with GetNode('Forwards') do begin
|
||||||
exForwards := Expanded;
|
exForwards := Expanded;
|
||||||
DeleteChildren;
|
DeleteChildren;
|
||||||
end;
|
end;
|
||||||
with GetNode('Variables') do begin
|
with GetNode('Variables') do begin
|
||||||
exVariables := Expanded;
|
exVariables := Expanded;
|
||||||
DeleteChildren;
|
DeleteChildren;
|
||||||
end;
|
end;
|
||||||
// Create new children
|
// Create new children
|
||||||
with frmMain.trvExplorer.Items.AddChild(GetNode('Defined'), 'CVars') do begin
|
with frmMain.trvExplorer.Items.AddChild(GetNode('Defined'), 'CVars') do begin
|
||||||
ImageIndex := 42;
|
ImageIndex := 42;
|
||||||
SelectedIndex := 42;
|
SelectedIndex := 42;
|
||||||
end;
|
end;
|
||||||
with frmMain.trvExplorer.Items.AddChild(GetNode('Methods'), 'Default') do begin
|
with frmMain.trvExplorer.Items.AddChild(GetNode('Methods'), 'Default') do begin
|
||||||
ImageIndex := 42;
|
ImageIndex := 42;
|
||||||
SelectedIndex := 42;
|
SelectedIndex := 42;
|
||||||
end;
|
end;
|
||||||
with frmMain.trvExplorer.Items.AddChild(GetNode('Methods'), 'Events') do begin
|
with frmMain.trvExplorer.Items.AddChild(GetNode('Methods'), 'Events') do begin
|
||||||
ImageIndex := 42;
|
ImageIndex := 42;
|
||||||
SelectedIndex := 42;
|
SelectedIndex := 42;
|
||||||
end;
|
end;
|
||||||
with frmMain.trvExplorer.Items.AddChild(GetNode('Methods'), 'Stocks') do begin
|
with frmMain.trvExplorer.Items.AddChild(GetNode('Methods'), 'Stocks') do begin
|
||||||
ImageIndex := 42;
|
ImageIndex := 42;
|
||||||
SelectedIndex := 42;
|
SelectedIndex := 42;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
for i := 0 to eConstants.Count -1 do begin
|
eTempNode := GetNode('Constants');
|
||||||
with frmMain.trvExplorer.Items.AddChildObject(GetNode('Constants'), eConstants[i], Pointer(eConstants.Objects[i])) do begin
|
for i := 0 to eConstants.Count - 1 do begin
|
||||||
ImageIndex := 48;
|
with frmMain.trvExplorer.Items.AddChildObject(eTempNode, eConstants[i], Pointer(eConstants.Objects[i])) do begin
|
||||||
SelectedIndex := 48;
|
ImageIndex := 48;
|
||||||
|
SelectedIndex := 48;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
eTempNode := GetNode('Defined');
|
||||||
for i := 0 to eDefined.Count -1 do begin
|
for i := 0 to eDefined.Count - 1 do begin
|
||||||
with frmMain.trvExplorer.Items.AddChildObject(GetNode('Defined'), eDefined[i], Pointer(eDefined.Objects[i])) do begin
|
with frmMain.trvExplorer.Items.AddChildObject(eTempNode, eDefined[i], Pointer(eDefined.Objects[i])) do begin
|
||||||
ImageIndex := 48;
|
ImageIndex := 48;
|
||||||
SelectedIndex := 48;
|
SelectedIndex := 48;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
eTempNode := GetNode('CVars');
|
||||||
for i := 0 to eCVars.Count -1 do begin
|
for i := 0 to eCVars.Count - 1 do begin
|
||||||
with frmMain.trvExplorer.Items.AddChildObject(GetNode('CVars'), eCVars[i], Pointer(eCVars.Objects[i])) do begin
|
with frmMain.trvExplorer.Items.AddChildObject(eTempNode, eCVars[i], Pointer(eCVars.Objects[i])) do begin
|
||||||
ImageIndex := 35;
|
ImageIndex := 35;
|
||||||
SelectedIndex := 35;
|
SelectedIndex := 35;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
// Sort items
|
// Sort items
|
||||||
eIncluded.Sort;
|
eIncluded.Sort;
|
||||||
eMethodsDefault.Sort;
|
eMethodsDefault.Sort;
|
||||||
eMethodsEvents.Sort;
|
eMethodsEvents.Sort;
|
||||||
eStocks.Sort;
|
eStocks.Sort;
|
||||||
eNatives.Sort;
|
eNatives.Sort;
|
||||||
eForwards.Sort;
|
eForwards.Sort;
|
||||||
eVariables.Sort;
|
eVariables.Sort;
|
||||||
// Add items
|
// Add items
|
||||||
for i := 0 to eIncluded.Count -1 do begin
|
eTempNode := GetNode('Included');
|
||||||
with frmMain.trvExplorer.Items.AddChildObject(GetNode('Included'), eIncluded[i], Pointer(eIncluded.Objects[i])) do begin
|
for i := 0 to eIncluded.Count - 1 do begin
|
||||||
ImageIndex := 34;
|
with frmMain.trvExplorer.Items.AddChildObject(eTempNode, eIncluded[i], Pointer(eIncluded.Objects[i])) do begin
|
||||||
SelectedIndex := 34;
|
ImageIndex := 34;
|
||||||
|
SelectedIndex := 34;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
eTempNode := GetNode('Default');
|
||||||
for i := 0 to eMethodsDefault.Count -1 do begin
|
for i := 0 to eMethodsDefault.Count - 1 do begin
|
||||||
with frmMain.trvExplorer.Items.AddChildObject(GetNode('Default'), eMethodsDefault[i], Pointer(eMethodsDefault.Objects[i])) do begin
|
with frmMain.trvExplorer.Items.AddChildObject(eTempNode, eMethodsDefault[i], Pointer(eMethodsDefault.Objects[i])) do begin
|
||||||
ImageIndex := 12;
|
ImageIndex := 12;
|
||||||
SelectedIndex := 12;
|
SelectedIndex := 12;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
eTempNode := GetNode('Events');
|
||||||
for i := 0 to eMethodsEvents.Count -1 do begin
|
for i := 0 to eMethodsEvents.Count - 1 do begin
|
||||||
with frmMain.trvExplorer.Items.AddChildObject(GetNode('Events'), eMethodsEvents[i], Pointer(eMethodsEvents.Objects[i])) do begin
|
with frmMain.trvExplorer.Items.AddChildObject(eTempNode, eMethodsEvents[i], Pointer(eMethodsEvents.Objects[i])) do begin
|
||||||
ImageIndex := 47;
|
ImageIndex := 47;
|
||||||
SelectedIndex := 47;
|
SelectedIndex := 47;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
eTempNode := GetNode('Stocks');
|
||||||
for i := 0 to eStocks.Count -1 do begin
|
for i := 0 to eStocks.Count - 1 do begin
|
||||||
with frmMain.trvExplorer.Items.AddChildObject(GetNode('Stocks'), eStocks[i], Pointer(eStocks.Objects[i])) do begin
|
with frmMain.trvExplorer.Items.AddChildObject(eTempNode, eStocks[i], Pointer(eStocks.Objects[i])) do begin
|
||||||
ImageIndex := 12;
|
ImageIndex := 12;
|
||||||
SelectedIndex := 12;
|
SelectedIndex := 12;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
eTempNode := GetNode('Natives');
|
||||||
for i := 0 to eNatives.Count -1 do begin
|
for i := 0 to eNatives.Count - 1 do begin
|
||||||
with frmMain.trvExplorer.Items.AddChildObject(GetNode('Natives'), eNatives[i], Pointer(eNatives.Objects[i])) do begin
|
with frmMain.trvExplorer.Items.AddChildObject(eTempNode, eNatives[i], Pointer(eNatives.Objects[i])) do begin
|
||||||
ImageIndex := 47;
|
ImageIndex := 47;
|
||||||
SelectedIndex := 47;
|
SelectedIndex := 47;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
eTempNode := GetNode('Forwards');
|
||||||
for i := 0 to eForwards.Count -1 do begin
|
for i := 0 to eForwards.Count - 1 do begin
|
||||||
with frmMain.trvExplorer.Items.AddChildObject(GetNode('Forwards'), eForwards[i], Pointer(eForwards.Objects[i])) do begin
|
with frmMain.trvExplorer.Items.AddChildObject(eTempNode, eForwards[i], Pointer(eForwards.Objects[i])) do begin
|
||||||
ImageIndex := 47;
|
ImageIndex := 47;
|
||||||
SelectedIndex := 47;
|
SelectedIndex := 47;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
eTempNode := GetNode('Variables');
|
||||||
for i := 0 to eVariables.Count -1 do begin
|
for i := 0 to eVariables.Count - 1 do begin
|
||||||
with frmMain.trvExplorer.Items.AddChildObject(GetNode('Variables'), eVariables[i], Pointer(eVariables.Objects[i])) do begin
|
with frmMain.trvExplorer.Items.AddChildObject(eTempNode, eVariables[i], Pointer(eVariables.Objects[i])) do begin
|
||||||
ImageIndex := 35;
|
ImageIndex := 35;
|
||||||
SelectedIndex := 35;
|
SelectedIndex := 35;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
|
|
||||||
GetNode('Constants').Expanded := exConstants;
|
GetNode('Constants').Expanded := exConstants;
|
||||||
GetNode('Defined').Expanded := exDefined;
|
GetNode('Defined').Expanded := exDefined;
|
||||||
GetNode('CVars').Expanded := exCVars;
|
GetNode('CVars').Expanded := exCVars;
|
||||||
GetNode('Included').Expanded := exIncluded;
|
GetNode('Included').Expanded := exIncluded;
|
||||||
GetNode('Methods').Expanded := exMethods;
|
GetNode('Methods').Expanded := exMethods;
|
||||||
GetNode('Default').Expanded := exDefault;
|
GetNode('Default').Expanded := exDefault;
|
||||||
GetNode('Events').Expanded := exEvents;
|
GetNode('Events').Expanded := exEvents;
|
||||||
GetNode('Stocks').Expanded := exStocks;
|
GetNode('Stocks').Expanded := exStocks;
|
||||||
GetNode('Natives').Expanded := exNatives;
|
GetNode('Natives').Expanded := exNatives;
|
||||||
GetNode('Forwards').Expanded := exForwards;
|
GetNode('Forwards').Expanded := exForwards;
|
||||||
GetNode('Variables').Expanded := exVariables;
|
GetNode('Variables').Expanded := exVariables;
|
||||||
|
|
||||||
SetScrollPos(frmMain.trvExplorer.Handle, SB_HORZ, eScrollPosX, False);
|
SetScrollPos(frmMain.trvExplorer.Handle, SB_HORZ, eScrollPosX, False);
|
||||||
SetScrollPos(frmMain.trvExplorer.Handle, SB_VERT, eScrollPosY, False);
|
SetScrollPos(frmMain.trvExplorer.Handle, SB_VERT, eScrollPosY, False);
|
||||||
|
if eSelected <> -1 then
|
||||||
|
frmMain.trvExplorer.Items[eSelected].Selected := True;
|
||||||
|
except
|
||||||
|
// well, yes.
|
||||||
|
end;
|
||||||
frmMain.trvExplorer.Items.EndUpdate;
|
frmMain.trvExplorer.Items.EndUpdate;
|
||||||
|
|
||||||
if (not frmMain.pnlLoading.Visible) and (not frmMain.sciEditor.AutoCActive) and (not frmMain.sciEditor.CallTipActive) then begin
|
if (not frmMain.pnlLoading.Visible) and (not frmMain.sciEditor.AutoCActive) and (not frmMain.sciEditor.CallTipActive) then begin
|
||||||
frmMain.sciAutoComplete.AStrings.Text := eAutoComplete;
|
frmMain.sciAutoComplete.AStrings.Text := eAutoComplete;
|
||||||
for i := frmMain.sciAutoComplete.AStrings.Count -1 downto 0 do begin
|
for i := frmMain.sciAutoComplete.AStrings.Count - 1 downto 0 do begin
|
||||||
if Length(Trim(frmMain.sciAutoComplete.AStrings[i])) <= 1 then
|
if Length(Trim(frmMain.sciAutoComplete.AStrings[i])) <= 1 then
|
||||||
frmMain.sciAutoComplete.AStrings.Delete(i);
|
frmMain.sciAutoComplete.AStrings.Delete(i);
|
||||||
end;
|
end;
|
||||||
frmMain.sciCallTips.ApiStrings.Text := eCallTips;
|
frmMain.sciCallTips.ApiStrings.Text := eCallTips;
|
||||||
for i := frmMain.sciCallTips.ApiStrings.Count -1 downto 0 do begin
|
for i := frmMain.sciCallTips.ApiStrings.Count - 1 downto 0 do begin
|
||||||
if Length(Trim(frmMain.sciCallTips.ApiStrings[i])) <= 1 then
|
if Length(Trim(frmMain.sciCallTips.ApiStrings[i])) <= 1 then
|
||||||
frmMain.sciCallTips.ApiStrings.Delete(i);
|
frmMain.sciCallTips.ApiStrings.Delete(i);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
with TSciKeywords(TSciLangItem(frmMain.sciEditor.LanguageManager.LanguageList.Find('Pawn').Keywords.Items[1])) do begin
|
with TSciKeywords(TSciLangItem(frmMain.sciEditor.LanguageManager.LanguageList.Find('Pawn').Keywords.Items[1])) do begin
|
||||||
eStr := TStringList.Create;
|
eStr := TStringList.Create;
|
||||||
for i := 0 to frmMain.sciEditor.Lines.Count -1 do begin
|
for i := 0 to frmMain.sciEditor.Lines.Count - 1 do begin
|
||||||
if not frmMain.sciEditor.GetFoldExpanded(i) then
|
if not frmMain.sciEditor.GetFoldExpanded(i) then
|
||||||
eStr.Add(IntToStr(i));
|
eStr.Add(IntToStr(i));
|
||||||
end;
|
end;
|
||||||
@ -313,12 +340,12 @@ begin
|
|||||||
Keywords.Text := eKeywords;
|
Keywords.Text := eKeywords;
|
||||||
frmMain.sciEditor.LanguageManager.Update;
|
frmMain.sciEditor.LanguageManager.Update;
|
||||||
|
|
||||||
for i := 0 to frmMain.sciEditor.Lines.Count -1 do begin
|
for i := 0 to frmMain.sciEditor.Lines.Count - 1 do begin
|
||||||
if eStr.IndexOf(IntToStr(i)) <> -1 then begin
|
if eStr.IndexOf(IntToStr(i)) <> -1 then begin
|
||||||
LineMaxSubord := frmMain.sciEditor.GetLastChild(i, -1);
|
LineMaxSubord := frmMain.sciEditor.GetLastChild(i, -1);
|
||||||
frmMain.sciEditor.SetFoldExpanded(i, False);
|
frmMain.sciEditor.SetFoldExpanded(i, False);
|
||||||
if LineMaxSubord > i then
|
if LineMaxSubord > i then
|
||||||
frmMain.sciEditor.HideLines(i+1, LineMaxSubord);
|
frmMain.sciEditor.HideLines(i + 1, LineMaxSubord);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -330,3 +357,4 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -5,6 +5,7 @@ interface
|
|||||||
uses SysUtils, Classes, Forms, Controls, Windows, ScintillaLanguageManager,
|
uses SysUtils, Classes, Forms, Controls, Windows, ScintillaLanguageManager,
|
||||||
RichEdit, ComCtrls, JvInspector;
|
RichEdit, ComCtrls, JvInspector;
|
||||||
|
|
||||||
|
function PosBack(eSubStr, eStr: String): Integer;
|
||||||
function IsAtStart(eSubStr, eStr: String; AllowFunctions: Boolean = True): Boolean;
|
function IsAtStart(eSubStr, eStr: String; AllowFunctions: Boolean = True): Boolean;
|
||||||
function GetIndents(Line: Integer = -1): String;
|
function GetIndents(Line: Integer = -1): String;
|
||||||
function GetStyleAt(ePos: Integer): TSciStyle;
|
function GetStyleAt(ePos: Integer): TSciStyle;
|
||||||
@ -12,10 +13,10 @@ function LineFromPos(ePos: Integer): Integer;
|
|||||||
function RemoveSemicolon(eStr: String): String;
|
function RemoveSemicolon(eStr: String): String;
|
||||||
procedure IndentCode;
|
procedure IndentCode;
|
||||||
procedure UnindentCode;
|
procedure UnindentCode;
|
||||||
function Between(eText, eFirst, eSecond: String): String;
|
function Between(eText, eFirst, eSecond: String; eSecondBack: Boolean = False): String;
|
||||||
procedure Delay(eTime: Integer);
|
procedure Delay(eTime: Integer);
|
||||||
function CountChars(eIn: String; eChar: Char): Integer;
|
function CountChars(eIn: String; eChar: Char): Integer;
|
||||||
function RemoveStringsAndComments(eLine: String; eRemoveStrings: Boolean): String;
|
function RemoveStringsAndComments(eLine: String; eRemoveStrings: Boolean; eRemoveComments: Boolean): String;
|
||||||
function GetMatchingBrace(eString: String): Integer;
|
function GetMatchingBrace(eString: String): Integer;
|
||||||
function GetColoredLine(eLine: Integer): String;
|
function GetColoredLine(eLine: Integer): String;
|
||||||
|
|
||||||
@ -26,6 +27,15 @@ implementation
|
|||||||
|
|
||||||
uses UnitfrmMain, UnitMainTools, UnitLanguages, UnitfrmIRCPaster;
|
uses UnitfrmMain, UnitMainTools, UnitLanguages, UnitfrmIRCPaster;
|
||||||
|
|
||||||
|
function PosBack(eSubStr, eStr: String): Integer;
|
||||||
|
begin
|
||||||
|
Result := 0;
|
||||||
|
if Pos(eSubStr, eStr) <> 0 then begin
|
||||||
|
while Pos(eSubStr, Copy(eStr, Result +1, Length(eStr))) <> 0 do
|
||||||
|
Inc(Result, 1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function IsAtStart(eSubStr, eStr: String; AllowFunctions: Boolean = True): Boolean;
|
function IsAtStart(eSubStr, eStr: String; AllowFunctions: Boolean = True): Boolean;
|
||||||
begin
|
begin
|
||||||
eStr := LowerCase(Trim(StringReplace(eStr, #9, #32, [rfReplaceAll])));
|
eStr := LowerCase(Trim(StringReplace(eStr, #9, #32, [rfReplaceAll])));
|
||||||
@ -72,12 +82,10 @@ begin
|
|||||||
else if eBits = 6 then
|
else if eBits = 6 then
|
||||||
eStyleNo := eStyleNo and $3f; //Strip away the indicators (2 bits)
|
eStyleNo := eStyleNo and $3f; //Strip away the indicators (2 bits)
|
||||||
|
|
||||||
if eStyleNo <> 32 then begin
|
with frmMain.sciEditor.LanguageManager.LanguageList.Find(ActiveDoc.Highlighter).Styles do begin
|
||||||
with frmMain.sciEditor.LanguageManager.LanguageList.Find(ActiveDoc.Highlighter).Styles do begin
|
for i := 0 to Count -1 do begin
|
||||||
for i := 0 to Count -1 do begin
|
if TSciStyle(Items[i]).StyleNumber = eStyleNo then
|
||||||
if TSciStyle(Items[i]).StyleNumber = eStyleNo then
|
Result := TSciStyle(Items[i]);
|
||||||
Result := TSciStyle(Items[i]);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -113,14 +121,14 @@ end;
|
|||||||
procedure IndentCode;
|
procedure IndentCode;
|
||||||
var eStr: TStringList;
|
var eStr: TStringList;
|
||||||
i, k: integer;
|
i, k: integer;
|
||||||
eIdent, eTempIdent: Integer;
|
eIndent, eTempIndent: Integer;
|
||||||
eString: String;
|
eString: String;
|
||||||
begin
|
begin
|
||||||
Screen.Cursor := crHourGlass;
|
Screen.Cursor := crHourGlass;
|
||||||
frmMain.sciEditor.Enabled := False;
|
frmMain.sciEditor.Enabled := False;
|
||||||
eStr := TStringList.Create;
|
eStr := TStringList.Create;
|
||||||
eIdent := 0;
|
eIndent := 0;
|
||||||
eTempIdent := 0;
|
eTempIndent := 0;
|
||||||
|
|
||||||
Cancel := False;
|
Cancel := False;
|
||||||
ShowProgress(False);
|
ShowProgress(False);
|
||||||
@ -134,18 +142,18 @@ begin
|
|||||||
// Remove strings and comments virtually because they could include brackets
|
// Remove strings and comments virtually because they could include brackets
|
||||||
frmMain.pbLoading.Position := i;
|
frmMain.pbLoading.Position := i;
|
||||||
SetProgressStatus('Indenting Code...');
|
SetProgressStatus('Indenting Code...');
|
||||||
eStr[i] := RemoveStringsAndComments(eStr[i], True);
|
eStr[i] := RemoveStringsAndComments(eStr[i], True, True);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
for i := 0 to eStr.Count -1 do begin
|
for i := 0 to eStr.Count -1 do begin
|
||||||
if CountChars(eStr[i], '{') <> CountChars(eStr[i], '}') then
|
if CountChars(eStr[i], '{') <> CountChars(eStr[i], '}') then
|
||||||
eIdent := eIdent - CountChars(eStr[i], '}');
|
eIndent := eIndent - CountChars(eStr[i], '}');
|
||||||
frmMain.sciEditor.Lines[i] := TrimLeft(frmMain.sciEditor.Lines[i]);
|
frmMain.sciEditor.Lines[i] := TrimLeft(frmMain.sciEditor.Lines[i]);
|
||||||
|
|
||||||
for k := 1 to eIdent + eTempIdent do
|
for k := 1 to eIndent + eTempIndent do
|
||||||
frmMain.sciEditor.Lines[i] := ' ' + frmMain.sciEditor.Lines[i];
|
frmMain.sciEditor.Lines[i] := ' ' + frmMain.sciEditor.Lines[i];
|
||||||
if eTempIdent <> 0 then
|
if eTempIndent <> 0 then
|
||||||
eTempIdent := eTempIdent -1;
|
eTempIndent := eTempIndent -1;
|
||||||
|
|
||||||
if (IsAtStart('if', eStr[i], True)) and (Pos('{', eStr[i]) = 0) and (Length(eStr[i]) > 3) then begin
|
if (IsAtStart('if', eStr[i], True)) and (Pos('{', eStr[i]) = 0) and (Length(eStr[i]) > 3) then begin
|
||||||
eString := eStr[i];
|
eString := eStr[i];
|
||||||
@ -153,7 +161,7 @@ begin
|
|||||||
if (eString[1] <> Trim(eString)[1]) or (eString[1] = '(') then begin
|
if (eString[1] <> Trim(eString)[1]) or (eString[1] = '(') then begin
|
||||||
eString := Trim(eString);
|
eString := Trim(eString);
|
||||||
if GetMatchingBrace(eString) = Length(eString) then
|
if GetMatchingBrace(eString) = Length(eString) then
|
||||||
eTempIdent := eTempIdent +1;
|
eTempIndent := eTempIndent +1;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if (IsAtStart('for', eStr[i], True)) and (Pos('{', eStr[i]) = 0) and (Length(eStr[i]) > 4) then begin
|
else if (IsAtStart('for', eStr[i], True)) and (Pos('{', eStr[i]) = 0) and (Length(eStr[i]) > 4) then begin
|
||||||
@ -162,16 +170,16 @@ begin
|
|||||||
if (eString[1] <> Trim(eString)[1]) or (eString[1] = '(') then begin
|
if (eString[1] <> Trim(eString)[1]) or (eString[1] = '(') then begin
|
||||||
eString := Trim(eString);
|
eString := Trim(eString);
|
||||||
if GetMatchingBrace(eString) = Length(eString) then
|
if GetMatchingBrace(eString) = Length(eString) then
|
||||||
eTempIdent := eTempIdent +1;
|
eTempIndent := eTempIndent +1;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if (IsAtStart('else', eStr[i], False)) and (Pos('{', eStr[i]) = 0) and (Length(eStr[i]) > 5) then begin
|
else if (IsAtStart('else', eStr[i], False)) and (Pos('{', eStr[i]) = 0) then begin
|
||||||
eString := eStr[i];
|
eString := eStr[i];
|
||||||
Delete(eString, 1, 4);
|
Delete(eString, 1, 4);
|
||||||
if eString[1] <> Trim(eString)[1] then begin
|
if eString[1] <> Trim(eString)[1] then begin
|
||||||
eString := Trim(eString);
|
eString := Trim(eString);
|
||||||
if GetMatchingBrace(eString) = Length(eString) then
|
if GetMatchingBrace(eString) = Length(eString) then
|
||||||
eTempIdent := eTempIdent +1;
|
eTempIndent := eTempIndent +1;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if (Pos('{', eStr[i]) = 0) and (Length(eStr[i]) > 6) then begin
|
else if (Pos('{', eStr[i]) = 0) and (Length(eStr[i]) > 6) then begin
|
||||||
@ -181,7 +189,7 @@ begin
|
|||||||
if (eString[1] <> Trim(eString)[1]) or (eString[1] = '(') then begin
|
if (eString[1] <> Trim(eString)[1]) or (eString[1] = '(') then begin
|
||||||
eString := Trim(eString);
|
eString := Trim(eString);
|
||||||
if GetMatchingBrace(eString) = Length(eString) then
|
if GetMatchingBrace(eString) = Length(eString) then
|
||||||
eTempIdent := eTempIdent +1;
|
eTempIndent := eTempIndent +1;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -193,7 +201,7 @@ begin
|
|||||||
if eString[1] <> Trim(eString)[1] then begin
|
if eString[1] <> Trim(eString)[1] then begin
|
||||||
eString := Trim(eString);
|
eString := Trim(eString);
|
||||||
if GetMatchingBrace(eString) = Length(eString) then
|
if GetMatchingBrace(eString) = Length(eString) then
|
||||||
eTempIdent := eTempIdent +1;
|
eTempIndent := eTempIndent +1;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
@ -203,12 +211,12 @@ begin
|
|||||||
if eString[1] <> Trim(eString)[1] then begin
|
if eString[1] <> Trim(eString)[1] then begin
|
||||||
eString := Trim(eString);
|
eString := Trim(eString);
|
||||||
if GetMatchingBrace(eString) = Length(eString) then
|
if GetMatchingBrace(eString) = Length(eString) then
|
||||||
eTempIdent := eTempIdent +1;
|
eTempIndent := eTempIndent +1;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if CountChars(eStr[i], '{') <> CountChars(eStr[i], '}') then
|
if CountChars(eStr[i], '{') <> CountChars(eStr[i], '}') then
|
||||||
eIdent := eIdent + CountChars(eStr[i], '{');
|
eIndent := eIndent + CountChars(eStr[i], '{');
|
||||||
|
|
||||||
frmMain.pbLoading.Position := frmMain.sciEditor.Lines.Count + i -1;
|
frmMain.pbLoading.Position := frmMain.sciEditor.Lines.Count + i -1;
|
||||||
SetProgressStatus('Indenting Code...');
|
SetProgressStatus('Indenting Code...');
|
||||||
@ -249,18 +257,20 @@ begin
|
|||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function RemoveStringsAndComments(eLine: String; eRemoveStrings: Boolean): String;
|
function RemoveStringsAndComments(eLine: String; eRemoveStrings: Boolean; eRemoveComments: Boolean): String;
|
||||||
begin
|
begin
|
||||||
// Remove comments
|
// Remove comments
|
||||||
if (Pos(GetCurrLang.CommentBoxStart, eLine) = 1) or (Pos(GetCurrLang.CommentBoxMiddle, eLine) = 1) or (Pos(GetCurrLang.CommentBoxEnd, eLine) = 1) or (Pos(GetCurrLang.CommentBlock, eLine) = 1) then
|
if eRemoveComments then begin
|
||||||
eLine := '';
|
if (Pos(GetCurrLang.CommentBoxStart, eLine) = 1) or (Pos(GetCurrLang.CommentBoxMiddle, eLine) = 1) or (Pos(GetCurrLang.CommentBoxEnd, eLine) = 1) or (Pos(GetCurrLang.CommentBlock, eLine) = 1) then
|
||||||
if Pos(GetCurrLang.CommentBlock, eLine) <> 0 then
|
eLine := '';
|
||||||
eLine := Copy(eLine, 1, Pos('//', eLine) -2);
|
if Pos(GetCurrLang.CommentBlock, eLine) <> 0 then
|
||||||
if (Pos(GetCurrLang.CommentStreamStart, eLine) < Pos(GetCurrLang.CommentStreamEnd, eLine)) and (Pos(GetCurrLang.CommentStreamStart, eLine) <> 0) then
|
eLine := Copy(eLine, 1, Pos('//', eLine) -2);
|
||||||
eLine := StringReplace(eLine, GetCurrLang.CommentStreamStart + Between(eLine, GetCurrLang.CommentStreamStart, GetCurrLang.CommentStreamEnd) + GetCurrLang.CommentStreamEnd, '', [rfReplaceAll]); // maybe not the best method, but simple and quite easy
|
if (Pos(GetCurrLang.CommentStreamStart, eLine) < Pos(GetCurrLang.CommentStreamEnd, eLine)) and (Pos(GetCurrLang.CommentStreamStart, eLine) <> 0) then
|
||||||
|
eLine := StringReplace(eLine, GetCurrLang.CommentStreamStart + Between(eLine, GetCurrLang.CommentStreamStart, GetCurrLang.CommentStreamEnd) + GetCurrLang.CommentStreamEnd, '', [rfReplaceAll]); // maybe not the best method, but simple and quite easy
|
||||||
|
end;
|
||||||
// Remove quotes
|
// Remove quotes
|
||||||
if eRemoveStrings then begin
|
if eRemoveStrings then begin
|
||||||
while CountChars(eLine, '"') > 1 do
|
while Between(eLine, '"', '"') <> '' do
|
||||||
eLine := StringReplace(eLine, '"' + Between(eLine, '"', '"') + '"', '', [rfReplaceAll]);
|
eLine := StringReplace(eLine, '"' + Between(eLine, '"', '"') + '"', '', [rfReplaceAll]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -290,17 +300,22 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function Between(eText, eFirst, eSecond: String): String;
|
function Between(eText, eFirst, eSecond: String; eSecondBack: Boolean = False): String;
|
||||||
var eTemp: String;
|
var eTemp: String;
|
||||||
begin
|
begin
|
||||||
if (Pos(eFirst, eText) = 0) or (Pos(eSecond, eText) = 0) then
|
Result := '';
|
||||||
Result := ''
|
|
||||||
else begin
|
if Pos(eFirst, eText) = PosBack(eSecond, eText) then exit;
|
||||||
eTemp := eText;
|
if Pos(eFirst, eText) = 0 then exit;
|
||||||
Delete(eTemp, 1, Pos(eFirst, eText) + Length(eFirst) - 1);
|
if PosBack(eSecond, eText) < Pos(eFirst, eText) then exit;
|
||||||
|
|
||||||
|
eTemp := eText;
|
||||||
|
Delete(eTemp, 1, Pos(eFirst, eText) + Length(eFirst) - 1);
|
||||||
|
if eSecondBack then
|
||||||
|
Delete(eTemp, PosBack(eSecond, eTemp), Length(eTemp))
|
||||||
|
else
|
||||||
Delete(eTemp, Pos(eSecond, eTemp), Length(eTemp));
|
Delete(eTemp, Pos(eSecond, eTemp), Length(eTemp));
|
||||||
Result := eTemp;
|
Result := eTemp;
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GetMatchingBrace(eString: String): Integer;
|
function GetMatchingBrace(eString: String): Integer;
|
||||||
|
@ -81,7 +81,12 @@ begin
|
|||||||
if Pos(LowerCase(FileName), LowerCase(eLineStr)) = 1 then begin
|
if Pos(LowerCase(FileName), LowerCase(eLineStr)) = 1 then begin
|
||||||
Delete(eLineStr, 1, Length(FileName));
|
Delete(eLineStr, 1, Length(FileName));
|
||||||
if IsNumeric(Between(eLineStr, '(', ')')) then
|
if IsNumeric(Between(eLineStr, '(', ')')) then
|
||||||
eLine := StrToInt(Between(eLineStr, '(', ')'));
|
eLine := StrToInt(Between(eLineStr, '(', ')'))
|
||||||
|
else begin
|
||||||
|
eTemp := Between(eLineStr, '(', ')');
|
||||||
|
eTemp := Copy(eTemp, 1, Pos(#32, eTemp) -1);
|
||||||
|
eLine := StrToInt(eTemp)
|
||||||
|
end;
|
||||||
|
|
||||||
eTemp := Between(eLineStr, ':', ':');
|
eTemp := Between(eLineStr, ':', ':');
|
||||||
|
|
||||||
|
@ -80,6 +80,9 @@ var lInvalidFile: String;
|
|||||||
lNoCPP: String;
|
lNoCPP: String;
|
||||||
lInvalidChannel: String;
|
lInvalidChannel: String;
|
||||||
lResetShortcuts: String;
|
lResetShortcuts: String;
|
||||||
|
lSelectLanguageDir: String;
|
||||||
|
lFailedCreateBak: String;
|
||||||
|
lAskRestore: String;
|
||||||
|
|
||||||
procedure ResetToEnglish;
|
procedure ResetToEnglish;
|
||||||
|
|
||||||
@ -163,6 +166,9 @@ begin
|
|||||||
lNoCPP := 'Sorry, the C++ IDE is not enabled.';
|
lNoCPP := 'Sorry, the C++ IDE is not enabled.';
|
||||||
lInvalidChannel := 'Invalid channel.';
|
lInvalidChannel := 'Invalid channel.';
|
||||||
lResetShortcuts := 'Warning: The shortcut reset would immediately take affect. Reset anyway?';
|
lResetShortcuts := 'Warning: The shortcut reset would immediately take affect. Reset anyway?';
|
||||||
|
lSelectLanguageDir := 'Please select the directory of all dictionary files (default "%datadir%/lang"):';
|
||||||
|
lFailedCreateBak := 'Error creating file backup.';
|
||||||
|
lAskRestore := 'Do you want to restore the old file backup?';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -65,7 +65,7 @@ function GetCIItemByValue(eValue: String; eParent: TJvCustomInspectorItem = nil)
|
|||||||
function FindSettingsNode(eText: String; eParent: TTreeNode = nil): TTreeNode;
|
function FindSettingsNode(eText: String; eParent: TTreeNode = nil): TTreeNode;
|
||||||
|
|
||||||
procedure LoadPlugins;
|
procedure LoadPlugins;
|
||||||
function GetAllIncludeFiles: TStringArray;
|
function GetAllIncludeFiles(eMask: String): TStringArray;
|
||||||
function GetCurrLang(FileName: String = ''): TSciLangItem;
|
function GetCurrLang(FileName: String = ''): TSciLangItem;
|
||||||
procedure FillCodeExplorer(Lang: String);
|
procedure FillCodeExplorer(Lang: String);
|
||||||
function IEInstalled: Boolean;
|
function IEInstalled: Boolean;
|
||||||
@ -289,23 +289,36 @@ begin
|
|||||||
ePConfig.Destroy;
|
ePConfig.Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GetAllIncludeFiles: TStringArray;
|
function GetAllIncludeFiles(eMask: String): TStringArray;
|
||||||
var eSearchRec: TSearchRec;
|
var eSearchRec: TSearchRec;
|
||||||
eStr: TStringList;
|
eStr: TStringList;
|
||||||
i: integer;
|
i: integer;
|
||||||
begin
|
begin
|
||||||
|
if Between(eMask, '<', '>') <> '' then
|
||||||
|
eMask := Between(eMask, '<', '>', True)
|
||||||
|
else if Between(eMask, '"', '"') <> '' then
|
||||||
|
eMask := Between(eMask, '"', '"', True);
|
||||||
|
|
||||||
eStr := TStringList.Create;
|
eStr := TStringList.Create;
|
||||||
if GetAMXXDir(False) <> '' then begin
|
if GetAMXXDir(False) <> '' then begin
|
||||||
if FindFirst(GetAMXXDir(False) + 'scripting\include\*.inc', faAnyFile, eSearchRec) = 0 then begin
|
if FindFirst(GetAMXXDir(False) + 'scripting\include\*.inc', faAnyFile, eSearchRec) = 0 then begin
|
||||||
repeat
|
repeat
|
||||||
if (eSearchRec.Name[1] <> '.') and (eSearchRec.Attr and faDirectory <> faDirectory) then
|
if (eSearchRec.Name[1] <> '.') and (eSearchRec.Attr and faDirectory <> faDirectory) then begin
|
||||||
eStr.Add(eSearchRec.Name);
|
if ExtractFileExt(eMask) <> '' then
|
||||||
|
eStr.Add(eSearchRec.Name)
|
||||||
|
else
|
||||||
|
eStr.Add(ChangeFileExt(eSearchRec.Name, ''));
|
||||||
|
end;
|
||||||
until (FindNext(eSearchRec) <> 0);
|
until (FindNext(eSearchRec) <> 0);
|
||||||
end;
|
end;
|
||||||
if FindFirst(GetAMXXDir(False) + 'scripting\*.inc', faAnyFile, eSearchRec) = 0 then begin
|
if FindFirst(GetAMXXDir(False) + 'scripting\*.inc', faAnyFile, eSearchRec) = 0 then begin
|
||||||
repeat
|
repeat
|
||||||
if (eSearchRec.Name[1] <> '.') and (eSearchRec.Attr and faDirectory <> faDirectory) then
|
if (eSearchRec.Name[1] <> '.') and (eSearchRec.Attr and faDirectory <> faDirectory) then begin
|
||||||
eStr.Add(eSearchRec.Name);
|
if ExtractFileExt(eMask) <> '' then
|
||||||
|
eStr.Add(eSearchRec.Name)
|
||||||
|
else
|
||||||
|
eStr.Add(ChangeFileExt(eSearchRec.Name, ''));
|
||||||
|
end;
|
||||||
until (FindNext(eSearchRec) <> 0);
|
until (FindNext(eSearchRec) <> 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -313,8 +326,12 @@ begin
|
|||||||
if (not ActiveDoc.Untitled) then begin
|
if (not ActiveDoc.Untitled) then begin
|
||||||
if FindFirst(GetAMXXDir(False) + 'scripting\include\*.inc', faAnyFile, eSearchRec) = 0 then begin
|
if FindFirst(GetAMXXDir(False) + 'scripting\include\*.inc', faAnyFile, eSearchRec) = 0 then begin
|
||||||
repeat
|
repeat
|
||||||
if (eSearchRec.Name[1] <> '.') and (eSearchRec.Attr and faDirectory <> faDirectory) then
|
if (eSearchRec.Name[1] <> '.') and (eSearchRec.Attr and faDirectory <> faDirectory) then begin
|
||||||
eStr.Add(eSearchRec.Name);
|
if ExtractFileExt(eMask) <> '' then
|
||||||
|
eStr.Add(eSearchRec.Name)
|
||||||
|
else
|
||||||
|
eStr.Add(ChangeFileExt(eSearchRec.Name, ''));
|
||||||
|
end;
|
||||||
until (FindNext(eSearchRec) <> 0);
|
until (FindNext(eSearchRec) <> 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -608,6 +625,8 @@ begin
|
|||||||
frmSettings.chkAutoCloseBraces.Checked := frmMain.sciEditor.AutoCloseBraces;
|
frmSettings.chkAutoCloseBraces.Checked := frmMain.sciEditor.AutoCloseBraces;
|
||||||
frmSettings.chkAutoCloseQuotes.Checked := frmMain.sciEditor.AutoCloseQuotes;
|
frmSettings.chkAutoCloseQuotes.Checked := frmMain.sciEditor.AutoCloseQuotes;
|
||||||
frmSettings.chkWordWrap.Checked := frmMain.sciEditor.WordWrap = sciWrap;
|
frmSettings.chkWordWrap.Checked := frmMain.sciEditor.WordWrap = sciWrap;
|
||||||
|
frmSettings.chkMakeBaks.Checked := eConfig.ReadBool('Editor', 'MakeBaks', True);
|
||||||
|
frmSettings.chkDontLoadFilesTwice.Checked := eConfig.ReadBool('Editor', 'DontLoadFilesTwice', True);
|
||||||
frmSettings.chkAutoIndent.Checked := eConfig.ReadBool('Editor', 'Auto-Indent', True);
|
frmSettings.chkAutoIndent.Checked := eConfig.ReadBool('Editor', 'Auto-Indent', True);
|
||||||
frmAutoIndent.chkIndentOpeningBrace.Checked := eConfig.ReadBool('Editor', 'IndentOpeningBrace', True);
|
frmAutoIndent.chkIndentOpeningBrace.Checked := eConfig.ReadBool('Editor', 'IndentOpeningBrace', True);
|
||||||
frmAutoIndent.chkUnindentPressingClosingBrace.Checked := eConfig.ReadBool('Editor', 'UnindentClosingBrace', True);
|
frmAutoIndent.chkUnindentPressingClosingBrace.Checked := eConfig.ReadBool('Editor', 'UnindentClosingBrace', True);
|
||||||
@ -637,6 +656,10 @@ begin
|
|||||||
frmMain.sciEditor.AutoCloseQuotes := frmSettings.chkAutoCloseQuotes.Checked;
|
frmMain.sciEditor.AutoCloseQuotes := frmSettings.chkAutoCloseQuotes.Checked;
|
||||||
frmMain.sciEditor.BraceHilite := frmSettings.chkHighlightBraces.Checked;
|
frmMain.sciEditor.BraceHilite := frmSettings.chkHighlightBraces.Checked;
|
||||||
frmMain.sciEditor.ClearUndoAfterSave := frmSettings.chkClearUndoAfterSave.Checked;
|
frmMain.sciEditor.ClearUndoAfterSave := frmSettings.chkClearUndoAfterSave.Checked;
|
||||||
|
frmSettings.chkDisableAC.Checked := eConfig.ReadBool('Editor', 'Disable_AC', False);
|
||||||
|
frmSettings.chkDisableCT.Checked := eConfig.ReadBool('Editor', 'Disable_CT', False);
|
||||||
|
frmMain.sciAutoComplete.Disabled := frmSettings.chkDisableAC.Checked;
|
||||||
|
frmMain.sciCallTips.Disabled := frmSettings.chkDisableCT.Checked;
|
||||||
{ Shortcuts }
|
{ Shortcuts }
|
||||||
frmSettings.lvShortcuts.Items.BeginUpdate;
|
frmSettings.lvShortcuts.Items.BeginUpdate;
|
||||||
try
|
try
|
||||||
@ -711,6 +734,7 @@ begin
|
|||||||
eCPUSpeed := frmSettings.sldSpeed.Value
|
eCPUSpeed := frmSettings.sldSpeed.Value
|
||||||
else
|
else
|
||||||
eCPUSpeed := 1; // otherwise the program would hang up
|
eCPUSpeed := 1; // otherwise the program would hang up
|
||||||
|
frmSettings.txtLangDir.Text := IncludeTrailingPathDelimiter(eConfig.ReadString('Misc', 'LangDir', ''));
|
||||||
frmSettings.chkShowStatusbar.Checked := eConfig.ReadBool('Misc', 'ShowStatusbar', True);
|
frmSettings.chkShowStatusbar.Checked := eConfig.ReadBool('Misc', 'ShowStatusbar', True);
|
||||||
frmMain.sbStatus.Visible := frmSettings.chkShowStatusbar.Checked;
|
frmMain.sbStatus.Visible := frmSettings.chkShowStatusbar.Checked;
|
||||||
end;
|
end;
|
||||||
@ -811,6 +835,18 @@ begin
|
|||||||
Cancel := False;
|
Cancel := False;
|
||||||
|
|
||||||
ShowProgress(True);
|
ShowProgress(True);
|
||||||
|
if (FileExists(FFileName)) and (frmSettings.chkMakeBaks.Checked) then begin
|
||||||
|
try
|
||||||
|
CopyFile(PChar(FFileName), PChar(FFileName + '.bak'), False);
|
||||||
|
SetFileAttributes(PChar(FFileName + '.bak'), faHidden);
|
||||||
|
if ActiveDoc = Self then
|
||||||
|
frmMain.mnuRestoreBackup.Enabled := True;
|
||||||
|
except
|
||||||
|
MessageBox(Application.Handle, PChar(lFailedCreateBak), PChar(Application.Title), MB_ICONERROR);
|
||||||
|
frmMain.mnuRestoreBackup.Enabled := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
try
|
try
|
||||||
AssignFile(F, FFilename);
|
AssignFile(F, FFilename);
|
||||||
Rewrite(F);
|
Rewrite(F);
|
||||||
@ -958,6 +994,7 @@ begin
|
|||||||
frmMain.sciEditor.SelLength := Document.SelLength;
|
frmMain.sciEditor.SelLength := Document.SelLength;
|
||||||
frmMain.sciEditor.LineScroll(0, (0 - frmMain.sciEditor.GetFirstVisibleLine) + Document.TopLine);
|
frmMain.sciEditor.LineScroll(0, (0 - frmMain.sciEditor.GetFirstVisibleLine) + Document.TopLine);
|
||||||
end;
|
end;
|
||||||
|
frmMain.mnuRestoreBackup.Enabled := (FileExists(Document.FileName + '.bak')) and (not Document.Untitled);
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
Plugin_DocChange(Document.Index, Document.FileName, Document.Highlighter, RestoreCaret, False);
|
Plugin_DocChange(Document.Index, Document.FileName, Document.Highlighter, RestoreCaret, False);
|
||||||
end;
|
end;
|
||||||
@ -1069,6 +1106,16 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if frmSettings.chkDontLoadFilesTwice.Checked then begin
|
||||||
|
for i := 0 to Count -1 do begin
|
||||||
|
if AnsiSameText(TDocument(Items[i]).FileName, AFilename) then begin
|
||||||
|
Result := i;
|
||||||
|
Activate(i, True);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
if Assigned(ActiveDoc) then begin
|
if Assigned(ActiveDoc) then begin
|
||||||
ActiveDoc.Code := frmMain.sciEditor.Lines.Text; // saving is fast, but loading is usually slow because of code-folding...
|
ActiveDoc.Code := frmMain.sciEditor.Lines.Text; // saving is fast, but loading is usually slow because of code-folding...
|
||||||
ActiveDoc.Highlighter := frmMain.sciEditor.LanguageManager.SelectedLanguage;
|
ActiveDoc.Highlighter := frmMain.sciEditor.LanguageManager.SelectedLanguage;
|
||||||
|
@ -157,6 +157,7 @@ const SCM_SHOWPROGRESS = WM_USER + $100;
|
|||||||
SCM_PLUGIN_LOAD = WM_USER + $119;
|
SCM_PLUGIN_LOAD = WM_USER + $119;
|
||||||
SCM_PLUGIN_UNLOAD = WM_USER + $120;
|
SCM_PLUGIN_UNLOAD = WM_USER + $120;
|
||||||
SCM_SETTINGS_CREATEPAGE = WM_USER + $121;
|
SCM_SETTINGS_CREATEPAGE = WM_USER + $121;
|
||||||
|
SCM_SETTINGS_REMOVEPAGE = WM_USER + $194;
|
||||||
SCM_CODEINSPECTOR_CLEAR = WM_USER + $122;
|
SCM_CODEINSPECTOR_CLEAR = WM_USER + $122;
|
||||||
SCM_CODEINSPECTOR_ADD = WM_USER + $123;
|
SCM_CODEINSPECTOR_ADD = WM_USER + $123;
|
||||||
SCM_CODEINSPECTOR_ADDCOMBO = WM_USER + $124;
|
SCM_CODEINSPECTOR_ADDCOMBO = WM_USER + $124;
|
||||||
|
@ -25,8 +25,8 @@ type TPawnParseResult = class
|
|||||||
procedure DestroyResult;
|
procedure DestroyResult;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ParseCodePawn(eCode: TStringList; FileName: String; IsRecursive: Boolean = False): TPawnParseResult;
|
function ParseCodePawn(eCode: TStringList; FileName: string; IsRecursive: Boolean = False): TPawnParseResult;
|
||||||
function UpdateIncPath(eInput: String): String;
|
function UpdateIncPath(eInput: string): string;
|
||||||
|
|
||||||
var eCPUSpeed: Integer = 1;
|
var eCPUSpeed: Integer = 1;
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ uses UnitCodeExplorerUpdater, UnitCodeUtils, UnitfrmSettings,
|
|||||||
|
|
||||||
var eLookedUpIncluded: TStringList;
|
var eLookedUpIncluded: TStringList;
|
||||||
|
|
||||||
function UpdateIncPath(eInput: String): String;
|
function UpdateIncPath(eInput: string): string;
|
||||||
begin
|
begin
|
||||||
eInput := StringReplace(Trim(eInput), '/', '\', [rfReplaceAll]);
|
eInput := StringReplace(Trim(eInput), '/', '\', [rfReplaceAll]);
|
||||||
if FileExists(ExtractFilePath(frmSettings.txtPawnCompilerPath.Text) + eInput + '.inc') then
|
if FileExists(ExtractFilePath(frmSettings.txtPawnCompilerPath.Text) + eInput + '.inc') then
|
||||||
@ -50,15 +50,15 @@ begin
|
|||||||
Result := '';
|
Result := '';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ParseCodePawn(eCode: TStringList; FileName: String; IsRecursive: Boolean = False): TPawnParseResult;
|
function ParseCodePawn(eCode: TStringList; FileName: string; IsRecursive: Boolean = False): TPawnParseResult;
|
||||||
var i, k: integer;
|
var i, k: integer;
|
||||||
eString, eTemp, eBackup: string;
|
eString, eTemp, eBackup: string;
|
||||||
eStr, ePreEvents: TStringList;
|
eStr, ePreEvents: TStringList;
|
||||||
eStartLine, eBracesOpen: Integer;
|
eStartLine, eBracesOpen: Integer;
|
||||||
eTimeToSleep: Integer;
|
eTimeToSleep: Integer;
|
||||||
eAddingEnum: Integer;
|
eAddingEnum: Integer;
|
||||||
eTempResult: TPawnParseResult;
|
eTempResult: TPawnParseResult;
|
||||||
eProcedureAdded: Boolean;
|
eProcedureAdded: Boolean;
|
||||||
begin
|
begin
|
||||||
Result := TPawnParseResult.Create;
|
Result := TPawnParseResult.Create;
|
||||||
if not IsRecursive then
|
if not IsRecursive then
|
||||||
@ -74,7 +74,7 @@ begin
|
|||||||
for i := 0 to eCode.Count - 1 do begin
|
for i := 0 to eCode.Count - 1 do begin
|
||||||
if (Application.Terminated) or (not Started) or (frmMain.pnlLoading.Visible) or (not frmMain.trvExplorer.Visible) then exit;
|
if (Application.Terminated) or (not Started) or (frmMain.pnlLoading.Visible) or (not frmMain.trvExplorer.Visible) then exit;
|
||||||
|
|
||||||
eString := RemoveStringsAndComments(Trim(eCode[i]), True);
|
eString := RemoveStringsAndComments(Trim(eCode[i]), True, True);
|
||||||
eBackup := Trim(eCode[i]);
|
eBackup := Trim(eCode[i]);
|
||||||
|
|
||||||
eProcedureAdded := False;
|
eProcedureAdded := False;
|
||||||
@ -86,34 +86,36 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ Constants and Variables }
|
{ Constants and Variables }
|
||||||
if (IsAtStart('new', eString)) and (eBracesOpen = 0) and (not IsRecursive) then begin // const or variable
|
if (IsAtStart('new', eString, False)) or (IsAtStart('stock', eString, False)) then begin // const or variable
|
||||||
Delete(eString, 1, 4);
|
if (eBracesOpen = 0) and (not IsRecursive) and (Pos('(', eString) = Pos(')', eString)) then begin
|
||||||
eString := Trim(eString);
|
Delete(eString, 1, Pos(#32, eString));
|
||||||
// we don't need braces so delete them...
|
eString := Trim(eString);
|
||||||
while (CountChars(eString, '{') <> 0) and (CountChars(eString, '}') <> 0) and (Pos('{', eString) < Pos('}', eString)) do
|
// we don't need braces so delete them...
|
||||||
eString := StringReplace(eString, '{' + Between(eString, '{', '}') + '}', '', [rfReplaceAll]);
|
while (CountChars(eString, '{') <> 0) and (CountChars(eString, '}') <> 0) and (Pos('{', eString) < Pos('}', eString)) do
|
||||||
while (CountChars(eString, '[') <> 0) and (CountChars(eString, ']') <> 0) and (Pos('[', eString) < Pos(']', eString)) do
|
eString := StringReplace(eString, '{' + Between(eString, '{', '}') + '}', '', [rfReplaceAll]);
|
||||||
eString := StringReplace(eString, '[' + Between(eString, '[', ']') + ']', '', [rfReplaceAll]);
|
while (CountChars(eString, '[') <> 0) and (CountChars(eString, ']') <> 0) and (Pos('[', eString) < Pos(']', eString)) do
|
||||||
// done? okay, split all items if there are more than one; and if not, it's okay...
|
eString := StringReplace(eString, '[' + Between(eString, '[', ']') + ']', '', [rfReplaceAll]);
|
||||||
eStr.Text := StringReplace(eString, ',', #13, [rfReplaceAll]);
|
// done? okay, split all items if there are more than one; and if not, it's okay...
|
||||||
for k := 0 to eStr.Count - 1 do begin
|
eStr.Text := StringReplace(eString, ',', #13, [rfReplaceAll]);
|
||||||
if (Trim(eStr[k]) <> '') and (eStr[k] <> '}') then begin
|
for k := 0 to eStr.Count - 1 do begin
|
||||||
eTemp := Trim(RemoveSemicolon(eStr[k]));
|
if (Trim(eStr[k]) <> '') and (eStr[k] <> '}') then begin
|
||||||
|
eTemp := Trim(RemoveSemicolon(eStr[k]));
|
||||||
|
|
||||||
if Pos(':', eTemp) <> 0 then
|
if Pos(':', eTemp) <> 0 then
|
||||||
eTemp := Copy(eTemp, Pos(':', eTemp) + 1, Length(eTemp));
|
eTemp := Copy(eTemp, Pos(':', eTemp) + 1, Length(eTemp));
|
||||||
|
|
||||||
if Pos('=', eTemp) <> 0 then begin // constant
|
if Pos('=', eTemp) <> 0 then begin // constant
|
||||||
Result.Constants.AddObject(Copy(eTemp, 1, Pos('=', eTemp) - 1), TObject(i));
|
Result.Constants.AddObject(Copy(eTemp, 1, Pos('=', eTemp) - 1), TObject(i));
|
||||||
Result.AutoComplete.Add(Copy(eTemp, 1, Pos('=', eTemp) - 1));
|
Result.AutoComplete.Add(Copy(eTemp, 1, Pos('=', eTemp) - 1));
|
||||||
end
|
end
|
||||||
else begin // variable
|
else begin // variable
|
||||||
Result.Variables.AddObject(eTemp, TObject(i));
|
Result.Variables.AddObject(eTemp, TObject(i));
|
||||||
Result.AutoComplete.Add(eTemp);
|
Result.AutoComplete.Add(eTemp);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
eString := RemoveStringsAndComments(Trim(eCode[i]), True, True);
|
||||||
end;
|
end;
|
||||||
eString := RemoveStringsAndComments(Trim(eCode[i]), True);
|
|
||||||
end
|
end
|
||||||
{ Included }
|
{ Included }
|
||||||
else if (IsAtStart('#include', eBackup)) then begin
|
else if (IsAtStart('#include', eBackup)) then begin
|
||||||
@ -206,77 +208,89 @@ begin
|
|||||||
end;
|
end;
|
||||||
{ <- Enums }
|
{ <- Enums }
|
||||||
end;
|
end;
|
||||||
if (Pos('}', eString) <> 0) and (not IsAtStart('new', Trim(eCode[eStartLine]))) then begin
|
if (Pos('}', eString) <> 0) then begin
|
||||||
{ Enums -> }
|
{ Enums -> }
|
||||||
if eAddingEnum <> 0 then
|
if eAddingEnum <> 0 then
|
||||||
eAddingEnum := 0;
|
eAddingEnum := 0;
|
||||||
|
|
||||||
{ <- Enums }
|
{ <- Enums }
|
||||||
if (eBracesOpen = 0) and (Length(Trim(eCode[eStartLine])) > 1) then begin
|
if (eStartLine <> -1) then begin
|
||||||
eTemp := Trim(RemoveSemicolon(Trim(eCode[eStartLine])));
|
if (eBracesOpen = 0) and (not IsAtStart('new', Trim(eCode[eStartLine]))) then begin
|
||||||
|
if Trim(RemoveStringsAndComments(eCode[eStartLine], True, True)) = '{' then
|
||||||
if eTemp[Length(eTemp)] = '{' then
|
eStartLine := eStartLine - 1;
|
||||||
eTemp := Trim(Copy(eTemp, 1, Length(eTemp) -1));
|
eTemp := Trim(RemoveSemicolon(Trim(eCode[eStartLine])));
|
||||||
|
|
||||||
// Analyze type
|
// Analyze type
|
||||||
k := 0;
|
k := 0;
|
||||||
if IsAtStart('public', eTemp) then
|
if IsAtStart('public', eTemp) then
|
||||||
k := 1
|
k := 1
|
||||||
else if IsAtStart('stock', eTemp) then
|
else if IsAtStart('stock', eTemp) then
|
||||||
k := 2
|
k := 2
|
||||||
else if IsAtStart('native', eTemp) then
|
else if IsAtStart('native', eTemp) then
|
||||||
k := 3
|
k := 3
|
||||||
else if IsAtStart('forward', eTemp) then
|
else if IsAtStart('forward', eTemp) then
|
||||||
k := 4
|
k := 4
|
||||||
else if Pos('enum', LowerCase(eTemp)) = 1 then // no method
|
else if Pos('enum', LowerCase(eTemp)) = 1 then // no method
|
||||||
k := 5;
|
k := 5;
|
||||||
|
|
||||||
|
|
||||||
// Remove type
|
// Remove type
|
||||||
if (Pos(#32, eTemp) <> 0) and (Pos(#32, eTemp) < Pos('(', eTemp)) then
|
if Pos('@', eTemp) = 1 then begin
|
||||||
eTemp := Copy(eCode[eStartLine], Pos(#32, eCode[eStartLine]) + 1, Length(eCode[eStartLine]))
|
eTemp := Copy(eTemp, 2, Length(eTemp));
|
||||||
else if (Pos(#9, eTemp) <> 0) and (Pos(#9, eTemp) < Pos('(', eTemp)) then
|
k := 1;
|
||||||
eTemp := Copy(eTemp, Pos(#9, eTemp) + 1, Length(eTemp));
|
end
|
||||||
// Remove return-type
|
else begin
|
||||||
if (Pos(':', eTemp) <> 0) and (Pos(':', eTemp) < Pos('(', eTemp)) then
|
if (Pos(#32, eTemp) <> 0) and (Pos(#32, eTemp) < Pos('(', eTemp)) then
|
||||||
Delete(eTemp, 1, Pos(':', eTemp));
|
eTemp := Copy(eCode[eStartLine], Pos(#32, eCode[eStartLine]) + 1, Length(eCode[eStartLine]))
|
||||||
|
else if (Pos(#9, eTemp) <> 0) and (Pos(#9, eTemp) < Pos('(', eTemp)) then
|
||||||
if Pos('operator', eTemp) = 1 then
|
eTemp := Copy(eTemp, Pos(#9, eTemp) + 1, Length(eTemp));
|
||||||
k := 6;
|
|
||||||
|
|
||||||
if k < 5 then
|
|
||||||
Result.CallTips.Add(eTemp + '-> ' + FileName);
|
|
||||||
// Copy function-name
|
|
||||||
if Pos('(', eTemp) <> 0 then
|
|
||||||
eTemp := Copy(eTemp, 1, Pos('(', eTemp) - 1);
|
|
||||||
eTemp := Trim(eTemp);
|
|
||||||
|
|
||||||
if k < 5 then begin
|
|
||||||
Result.AutoComplete.Add(eTemp);
|
|
||||||
Result.HighlightKeywords.Add(eTemp);
|
|
||||||
end;
|
|
||||||
|
|
||||||
if eTemp <> '' then begin
|
|
||||||
case k of
|
|
||||||
0: begin
|
|
||||||
if not IsRecursive then
|
|
||||||
Result.MethodsDefault.AddObject(eTemp, TObject(eStartLine)); // Default Method
|
|
||||||
end;
|
|
||||||
1: begin
|
|
||||||
k := ePreEvents.IndexOf(eTemp);
|
|
||||||
if k <> -1 then begin
|
|
||||||
Result.Events.AddObject(eTemp, ePreEvents.Objects[k]);
|
|
||||||
ePreEvents.Delete(k);
|
|
||||||
end
|
|
||||||
else
|
|
||||||
Result.MethodsDefault.AddObject(eTemp, TObject(eStartLine));
|
|
||||||
end;
|
|
||||||
2: Result.Stocks.AddObject(eTemp, TObject(eStartLine));
|
|
||||||
3: Result.Natives.AddObject(eTemp, TObject(eStartLine));
|
|
||||||
4: Result.Forwards.AddObject(eTemp, TObject(eStartLine));
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if eTemp[Length(eTemp)] = '{' then
|
||||||
|
eTemp := Trim(Copy(eTemp, 1, Length(eTemp) - 1));
|
||||||
|
|
||||||
|
// Remove return-type
|
||||||
|
if (Pos(':', eTemp) <> 0) and (Pos(':', eTemp) < Pos('(', eTemp)) then
|
||||||
|
Delete(eTemp, 1, Pos(':', eTemp));
|
||||||
|
|
||||||
|
if Pos('operator', eTemp) = 1 then
|
||||||
|
k := 6;
|
||||||
|
|
||||||
|
if k < 5 then
|
||||||
|
Result.CallTips.Add(eTemp + '-> ' + FileName);
|
||||||
|
// Copy function-name
|
||||||
|
if Pos('(', eTemp) <> 0 then
|
||||||
|
eTemp := Copy(eTemp, 1, Pos('(', eTemp) - 1);
|
||||||
|
eTemp := Trim(eTemp);
|
||||||
|
|
||||||
|
if k < 5 then begin
|
||||||
|
Result.AutoComplete.Add(eTemp);
|
||||||
|
Result.HighlightKeywords.Add(eTemp);
|
||||||
|
end;
|
||||||
|
|
||||||
|
if eTemp <> '' then begin
|
||||||
|
case k of
|
||||||
|
0: begin
|
||||||
|
if not IsRecursive then
|
||||||
|
Result.MethodsDefault.AddObject(eTemp, TObject(eStartLine)); // Default Method
|
||||||
|
end;
|
||||||
|
1: begin
|
||||||
|
k := ePreEvents.IndexOf(eTemp);
|
||||||
|
if k <> -1 then begin
|
||||||
|
Result.Events.AddObject(eTemp, ePreEvents.Objects[k]);
|
||||||
|
ePreEvents.Delete(k);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result.MethodsDefault.AddObject(eTemp, TObject(eStartLine));
|
||||||
|
end;
|
||||||
|
2: Result.Stocks.AddObject(eTemp, TObject(eStartLine));
|
||||||
|
3: Result.Natives.AddObject(eTemp, TObject(eStartLine));
|
||||||
|
4: Result.Forwards.AddObject(eTemp, TObject(eStartLine));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
eStartLine := -1;
|
||||||
|
eBracesOpen := 0;
|
||||||
end;
|
end;
|
||||||
eStartLine := -1;
|
|
||||||
eBracesOpen := 0;
|
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if (eAddingEnum = 2) and (Pos('enum', LowerCase(eString)) <> 1) then begin
|
else if (eAddingEnum = 2) and (Pos('enum', LowerCase(eString)) <> 1) then begin
|
||||||
@ -301,10 +315,11 @@ begin
|
|||||||
|
|
||||||
{ Functions (2) }
|
{ Functions (2) }
|
||||||
if (IsAtStart('forward', eString)) or (IsAtStart('public', eString)) or (IsAtStart('native', eString)) or (IsAtStart('stock', eString)) then begin
|
if (IsAtStart('forward', eString)) or (IsAtStart('public', eString)) or (IsAtStart('native', eString)) or (IsAtStart('stock', eString)) then begin
|
||||||
if (not eProcedureAdded) and (Pos('(', eString) <> 0) then begin
|
if (not eProcedureAdded) and (Pos('(', eString) <> 0) and (Pos(')', eString) <> 0) then begin
|
||||||
eTemp := Trim(RemoveSemicolon(eString));
|
eTemp := StringReplace(Trim(eBackup), #9, #32, [rfReplaceAll]);
|
||||||
|
eTemp := Trim(RemoveSemicolon(eTemp));
|
||||||
if eTemp[Length(eTemp)] = '{' then
|
if eTemp[Length(eTemp)] = '{' then
|
||||||
eTemp := Trim(Copy(eTemp, 1, Length(eTemp) -1));
|
eTemp := Trim(Copy(eTemp, 1, Length(eTemp) - 1));
|
||||||
|
|
||||||
// Remove type
|
// Remove type
|
||||||
if (Pos(#32, eTemp) <> 0) and (Pos(#32, eTemp) < Pos('(', eTemp)) then
|
if (Pos(#32, eTemp) <> 0) and (Pos(#32, eTemp) < Pos('(', eTemp)) then
|
||||||
@ -320,8 +335,8 @@ begin
|
|||||||
|
|
||||||
// Copy function-name
|
// Copy function-name
|
||||||
if Pos('(', eTemp) <> 0 then
|
if Pos('(', eTemp) <> 0 then
|
||||||
eTemp := Copy(eTemp, 1, Pos('(', eTemp) - 1);
|
eTemp := Copy(eTemp, 1, Pos('(', eTemp) - 1);
|
||||||
eTemp := Trim(eTemp);
|
eTemp := Trim(eTemp);
|
||||||
|
|
||||||
if (Pos('enum', eTemp) = Pos('operator', eTemp)) and (Pos('enum', eTemp) = 0) then begin
|
if (Pos('enum', eTemp) = Pos('operator', eTemp)) and (Pos('enum', eTemp) = 0) then begin
|
||||||
Result.AutoComplete.Add(eTemp);
|
Result.AutoComplete.Add(eTemp);
|
||||||
@ -405,3 +420,4 @@ finalization
|
|||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -178,10 +178,16 @@ procedure TfrmHudMsgGenerator.cmdSelectColorClick(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
frmSelectColor.chkDefault1.Enabled := False;
|
frmSelectColor.chkDefault1.Enabled := False;
|
||||||
frmSelectColor.chkDefault2.Enabled := False;
|
frmSelectColor.chkDefault2.Enabled := False;
|
||||||
|
frmSelectColor.chkNone1.Enabled := False;
|
||||||
|
frmSelectColor.chkNone2.Enabled := False;
|
||||||
|
|
||||||
ShowColorDialog(CurrColor, imgColor);
|
ShowColorDialog(CurrColor, imgColor);
|
||||||
lblHudMsg.Font.Color := CurrColor;
|
lblHudMsg.Font.Color := CurrColor;
|
||||||
|
|
||||||
frmSelectColor.chkDefault1.Enabled := True;
|
frmSelectColor.chkDefault1.Enabled := True;
|
||||||
frmSelectColor.chkDefault2.Enabled := True;
|
frmSelectColor.chkDefault2.Enabled := True;
|
||||||
|
frmSelectColor.chkNone1.Enabled := True;
|
||||||
|
frmSelectColor.chkNone2.Enabled := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmHudMsgGenerator.txtTextChange(Sender: TObject);
|
procedure TfrmHudMsgGenerator.txtTextChange(Sender: TObject);
|
||||||
@ -189,7 +195,7 @@ begin
|
|||||||
if txtText.Text = '' then
|
if txtText.Text = '' then
|
||||||
lblHudMsg.Caption := 'Custom Hudmessage'
|
lblHudMsg.Caption := 'Custom Hudmessage'
|
||||||
else
|
else
|
||||||
lblHudMsg.Caption := stringReplace(txtText.Text, '\n', #13, [rfReplaceAll]);
|
lblHudMsg.Caption := StringReplace(txtText.Text, '\n', #13, [rfReplaceAll]);
|
||||||
|
|
||||||
if chkXCenter.Checked then
|
if chkXCenter.Checked then
|
||||||
CenterX;
|
CenterX;
|
||||||
|
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
object frmMain: TfrmMain
|
object frmMain: TfrmMain
|
||||||
Left = 284
|
Left = 257
|
||||||
Top = 290
|
Top = 302
|
||||||
Width = 888
|
Width = 888
|
||||||
Height = 640
|
Height = 640
|
||||||
Caption = 'AMXX-Studio'
|
Caption = 'AMXX-Studio'
|
||||||
@ -455,6 +455,13 @@ object frmMain: TfrmMain
|
|||||||
OnClick = mnuPasterClick
|
OnClick = mnuPasterClick
|
||||||
CaptionW = 'IRC Paster'
|
CaptionW = 'IRC Paster'
|
||||||
end
|
end
|
||||||
|
object mnuRestoreBackup: TSpTBXItem
|
||||||
|
Enabled = False
|
||||||
|
ImageIndex = 46
|
||||||
|
Images = ilImages
|
||||||
|
OnClick = mnuRestoreBackupClick
|
||||||
|
CaptionW = 'Restore from backup'
|
||||||
|
end
|
||||||
object sepTools3: TSpTBXSeparatorItem
|
object sepTools3: TSpTBXSeparatorItem
|
||||||
end
|
end
|
||||||
object mnuSettings: TSpTBXItem
|
object mnuSettings: TSpTBXItem
|
||||||
@ -714,7 +721,7 @@ object frmMain: TfrmMain
|
|||||||
Align = alRight
|
Align = alRight
|
||||||
end
|
end
|
||||||
object splRight: TSplitter
|
object splRight: TSplitter
|
||||||
Left = 701
|
Left = 669
|
||||||
Top = 23
|
Top = 23
|
||||||
Height = 472
|
Height = 472
|
||||||
Align = alRight
|
Align = alRight
|
||||||
@ -722,7 +729,7 @@ object frmMain: TfrmMain
|
|||||||
object pnlParent: TPanel
|
object pnlParent: TPanel
|
||||||
Left = 3
|
Left = 3
|
||||||
Top = 23
|
Top = 23
|
||||||
Width = 698
|
Width = 666
|
||||||
Height = 472
|
Height = 472
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
@ -730,7 +737,7 @@ object frmMain: TfrmMain
|
|||||||
object splOutput: TSplitter
|
object splOutput: TSplitter
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 387
|
Top = 387
|
||||||
Width = 698
|
Width = 666
|
||||||
Height = 3
|
Height = 3
|
||||||
Cursor = crVSplit
|
Cursor = crVSplit
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
@ -739,7 +746,7 @@ object frmMain: TfrmMain
|
|||||||
object sciEditor: TScintilla
|
object sciEditor: TScintilla
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 698
|
Width = 666
|
||||||
Height = 387
|
Height = 387
|
||||||
Color = clWhite
|
Color = clWhite
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
@ -818,7 +825,7 @@ object frmMain: TfrmMain
|
|||||||
WordChars = '_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
|
WordChars = '_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
|
||||||
ControlCharSymbol = #0
|
ControlCharSymbol = #0
|
||||||
BraceHilite = True
|
BraceHilite = True
|
||||||
Folding = [foldFold, foldComment, foldPreprocessor, foldCommentPython, foldAtElse, foldHTML, foldHTMLPreProcessor]
|
Folding = [foldFold, foldCompact, foldComment, foldPreprocessor, foldCommentPython, foldAtElse, foldHTML, foldHTMLPreProcessor]
|
||||||
FoldMarkerType = sciMarkBox
|
FoldMarkerType = sciMarkBox
|
||||||
LanguageManager.LanguageList = <
|
LanguageManager.LanguageList = <
|
||||||
item
|
item
|
||||||
@ -4001,7 +4008,7 @@ object frmMain: TfrmMain
|
|||||||
object lstOutput: TListBox
|
object lstOutput: TListBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 390
|
Top = 390
|
||||||
Width = 698
|
Width = 666
|
||||||
Height = 82
|
Height = 82
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
ItemHeight = 13
|
ItemHeight = 13
|
||||||
@ -4062,9 +4069,9 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object tcTools: TSpTBXTabControl
|
object tcTools: TSpTBXTabControl
|
||||||
Left = 704
|
Left = 672
|
||||||
Top = 23
|
Top = 23
|
||||||
Width = 173
|
Width = 205
|
||||||
Height = 472
|
Height = 472
|
||||||
Align = alRight
|
Align = alRight
|
||||||
ActiveTabIndex = 0
|
ActiveTabIndex = 0
|
||||||
@ -4086,13 +4093,13 @@ object frmMain: TfrmMain
|
|||||||
object tsNotes: TSpTBXTabSheet
|
object tsNotes: TSpTBXTabSheet
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 173
|
Width = 205
|
||||||
Height = 449
|
Height = 449
|
||||||
Caption = 'Notes'
|
Caption = 'Notes'
|
||||||
ImageIndex = -1
|
ImageIndex = -1
|
||||||
TabItem = 'tiNotes'
|
TabItem = 'tiNotes'
|
||||||
object imgRight4: TImage
|
object imgRight4: TImage
|
||||||
Left = 170
|
Left = 202
|
||||||
Top = 26
|
Top = 26
|
||||||
Width = 1
|
Width = 1
|
||||||
Height = 421
|
Height = 421
|
||||||
@ -4101,14 +4108,14 @@ object frmMain: TfrmMain
|
|||||||
object imgBottom4: TImage
|
object imgBottom4: TImage
|
||||||
Left = 2
|
Left = 2
|
||||||
Top = 447
|
Top = 447
|
||||||
Width = 169
|
Width = 201
|
||||||
Height = 2
|
Height = 2
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
end
|
end
|
||||||
object imgTop4: TImage
|
object imgTop4: TImage
|
||||||
Left = 2
|
Left = 2
|
||||||
Top = 24
|
Top = 24
|
||||||
Width = 169
|
Width = 201
|
||||||
Height = 2
|
Height = 2
|
||||||
Align = alTop
|
Align = alTop
|
||||||
end
|
end
|
||||||
@ -4122,7 +4129,7 @@ object frmMain: TfrmMain
|
|||||||
object tbxNotes: TSpTBXToolbar
|
object tbxNotes: TSpTBXToolbar
|
||||||
Left = 2
|
Left = 2
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 169
|
Width = 201
|
||||||
Height = 22
|
Height = 22
|
||||||
Align = alTop
|
Align = alTop
|
||||||
Caption = 'tbxNotes'
|
Caption = 'tbxNotes'
|
||||||
@ -4162,7 +4169,7 @@ object frmMain: TfrmMain
|
|||||||
object rtfNotes: TRichEdit
|
object rtfNotes: TRichEdit
|
||||||
Left = 3
|
Left = 3
|
||||||
Top = 26
|
Top = 26
|
||||||
Width = 167
|
Width = 199
|
||||||
Height = 421
|
Height = 421
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
@ -4173,7 +4180,7 @@ object frmMain: TfrmMain
|
|||||||
object tsExplorer: TSpTBXTabSheet
|
object tsExplorer: TSpTBXTabSheet
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 173
|
Width = 205
|
||||||
Height = 449
|
Height = 449
|
||||||
Caption = 'Code-Tools'
|
Caption = 'Code-Tools'
|
||||||
ImageIndex = -1
|
ImageIndex = -1
|
||||||
@ -4181,7 +4188,7 @@ object frmMain: TfrmMain
|
|||||||
object spcBottom2: TImage
|
object spcBottom2: TImage
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 447
|
Top = 447
|
||||||
Width = 173
|
Width = 205
|
||||||
Height = 2
|
Height = 2
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
end
|
end
|
||||||
@ -4193,7 +4200,7 @@ object frmMain: TfrmMain
|
|||||||
Align = alLeft
|
Align = alLeft
|
||||||
end
|
end
|
||||||
object spcRight2: TImage
|
object spcRight2: TImage
|
||||||
Left = 170
|
Left = 202
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 3
|
Width = 3
|
||||||
Height = 447
|
Height = 447
|
||||||
@ -4202,21 +4209,21 @@ object frmMain: TfrmMain
|
|||||||
object pnlDock: TSpTBXMultiDock
|
object pnlDock: TSpTBXMultiDock
|
||||||
Left = 3
|
Left = 3
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 167
|
Width = 199
|
||||||
Height = 447
|
Height = 447
|
||||||
Position = dpxClient
|
Position = dpxClient
|
||||||
object pnlCodeExplorer: TSpTBXDockablePanel
|
object pnlCodeExplorer: TSpTBXDockablePanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Caption = 'Code-Explorer'
|
Caption = 'Code-Explorer'
|
||||||
DockedWidth = 163
|
DockedWidth = 195
|
||||||
DockPos = 0
|
DockPos = 0
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnVisibleChanged = pnlCodeExplorerVisibleChanged
|
OnVisibleChanged = pnlCodeExplorerVisibleChanged
|
||||||
object trvExplorer: TTreeView
|
object trvExplorer: TTreeView
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 26
|
Top = 26
|
||||||
Width = 163
|
Width = 195
|
||||||
Height = 186
|
Height = 186
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Images = ilImages
|
Images = ilImages
|
||||||
@ -4224,6 +4231,7 @@ object frmMain: TfrmMain
|
|||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
SortType = stBoth
|
SortType = stBoth
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
OnClick = trvExplorerClick
|
||||||
OnCollapsed = trvExplorerCollapsed
|
OnCollapsed = trvExplorerCollapsed
|
||||||
OnDblClick = trvExplorerDblClick
|
OnDblClick = trvExplorerDblClick
|
||||||
OnExpanded = trvExplorerExpanded
|
OnExpanded = trvExplorerExpanded
|
||||||
@ -4247,17 +4255,17 @@ object frmMain: TfrmMain
|
|||||||
Left = 0
|
Left = 0
|
||||||
Top = 216
|
Top = 216
|
||||||
Caption = 'Code-Inspector'
|
Caption = 'Code-Inspector'
|
||||||
DockedWidth = 163
|
DockedWidth = 195
|
||||||
DockPos = 216
|
DockPos = 216
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
OnVisibleChanged = pnlCodeInspectorVisibleChanged
|
OnVisibleChanged = pnlCodeInspectorVisibleChanged
|
||||||
object jviCode: TJvInspector
|
object jviCode: TJvInspector
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 26
|
Top = 26
|
||||||
Width = 163
|
Width = 195
|
||||||
Height = 185
|
Height = 185
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Divider = 80
|
Divider = 110
|
||||||
ItemHeight = 16
|
ItemHeight = 16
|
||||||
Painter = JvInspectorDotNETPainter
|
Painter = JvInspectorDotNETPainter
|
||||||
OnItemValueChanged = jviCodeItemValueChanged
|
OnItemValueChanged = jviCodeItemValueChanged
|
||||||
@ -7564,7 +7572,7 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object JvInspectorDotNETPainter: TJvInspectorDotNETPainter
|
object JvInspectorDotNETPainter: TJvInspectorDotNETPainter
|
||||||
DrawNameEndEllipsis = False
|
DrawNameEndEllipsis = True
|
||||||
Left = 662
|
Left = 662
|
||||||
Top = 36
|
Top = 36
|
||||||
end
|
end
|
||||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -42,24 +42,26 @@ object frmSettings: TfrmSettings
|
|||||||
000000FFFFFFFFFFFFFFFF040000000200000008436F6D70696C65722A000000
|
000000FFFFFFFFFFFFFFFF040000000200000008436F6D70696C65722A000000
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF040000000000000011436F6D70696C65
|
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF040000000000000011436F6D70696C65
|
||||||
722053657474696E67732C000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0500
|
722053657474696E67732C000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0500
|
||||||
0000000000001348616C662D4C696665204469726563746F727926000000FFFF
|
0000000000001348616C662D4C696665204469726563746F7279230000000100
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFF03000000000000000D436F64652D536E6970
|
000001000000FFFFFFFFFFFFFFFF0A000000020000000A436F64652D546F6F6C
|
||||||
706574731C0000000100000001000000FFFFFFFFFFFFFFFF0600000002000000
|
7321000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0A00000000000000085365
|
||||||
0346545021000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0600000000000000
|
7474696E677326000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF030000000000
|
||||||
0853657474696E67731E000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF070000
|
00000D436F64652D536E6970706574731C0000000100000001000000FFFFFFFF
|
||||||
00000000000550726F787921000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF08
|
FFFFFFFF06000000020000000346545021000000FFFFFFFFFFFFFFFFFFFFFFFF
|
||||||
0000000000000008506C75672D496E731D000000FFFFFFFFFFFFFFFFFFFFFFFF
|
FFFFFFFF06000000000000000853657474696E67731E000000FFFFFFFFFFFFFF
|
||||||
FFFFFFFF0900000000000000044D697363}
|
FFFFFFFFFFFFFFFFFF07000000000000000550726F787921000000FFFFFFFFFF
|
||||||
|
FFFFFFFFFFFFFFFFFFFFFF080000000000000008506C75672D496E731D000000
|
||||||
|
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0900000000000000044D697363}
|
||||||
Items.Links = {
|
Items.Links = {
|
||||||
0D00000000000000000000000100000002000000040000000400000005000000
|
0F00000000000000000000000100000002000000040000000400000005000000
|
||||||
030000000600000006000000070000000800000009000000}
|
0A0000000A000000030000000600000006000000070000000800000009000000}
|
||||||
end
|
end
|
||||||
object jplSettings: TJvPageList
|
object jplSettings: TJvPageList
|
||||||
Left = 135
|
Left = 135
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 353
|
Width = 353
|
||||||
Height = 260
|
Height = 260
|
||||||
ActivePage = jspHighlighter
|
ActivePage = jspTools
|
||||||
PropagateEnable = False
|
PropagateEnable = False
|
||||||
Align = alClient
|
Align = alClient
|
||||||
OnChange = jplSettingsChange
|
OnChange = jplSettingsChange
|
||||||
@ -355,35 +357,35 @@ object frmSettings: TfrmSettings
|
|||||||
Caption = 'Tools'
|
Caption = 'Tools'
|
||||||
object bvlTools1: TBevel
|
object bvlTools1: TBevel
|
||||||
Left = 4
|
Left = 4
|
||||||
Top = 68
|
Top = 90
|
||||||
Width = 347
|
Width = 347
|
||||||
Height = 3
|
Height = 3
|
||||||
Shape = bsTopLine
|
Shape = bsTopLine
|
||||||
end
|
end
|
||||||
object lblCodeFolding: TLabel
|
object lblCodeFolding: TLabel
|
||||||
Left = 6
|
Left = 6
|
||||||
Top = 142
|
Top = 158
|
||||||
Width = 67
|
Width = 67
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Code-Folding:'
|
Caption = 'Code-Folding:'
|
||||||
end
|
end
|
||||||
object lblCaret: TLabel
|
object lblCaret: TLabel
|
||||||
Left = 6
|
Left = 6
|
||||||
Top = 76
|
Top = 96
|
||||||
Width = 31
|
Width = 31
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Caret:'
|
Caption = 'Caret:'
|
||||||
end
|
end
|
||||||
object lblAutoIndent: TLabel
|
object lblAutoIndent: TLabel
|
||||||
Left = 194
|
Left = 194
|
||||||
Top = 142
|
Top = 158
|
||||||
Width = 63
|
Width = 63
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Auto-Indent:'
|
Caption = 'Auto-Indent:'
|
||||||
end
|
end
|
||||||
object chkHighlightBraces: TFlatCheckBox
|
object chkHighlightBraces: TFlatCheckBox
|
||||||
Left = 6
|
Left = 6
|
||||||
Top = 26
|
Top = 22
|
||||||
Width = 95
|
Width = 95
|
||||||
Height = 17
|
Height = 17
|
||||||
Caption = 'Highlight braces'
|
Caption = 'Highlight braces'
|
||||||
@ -392,7 +394,7 @@ object frmSettings: TfrmSettings
|
|||||||
end
|
end
|
||||||
object chkAutoCloseBraces: TFlatCheckBox
|
object chkAutoCloseBraces: TFlatCheckBox
|
||||||
Left = 176
|
Left = 176
|
||||||
Top = 4
|
Top = 6
|
||||||
Width = 107
|
Width = 107
|
||||||
Height = 17
|
Height = 17
|
||||||
Caption = 'Auto-Close braces'
|
Caption = 'Auto-Close braces'
|
||||||
@ -401,7 +403,7 @@ object frmSettings: TfrmSettings
|
|||||||
end
|
end
|
||||||
object chkAutoCloseQuotes: TFlatCheckBox
|
object chkAutoCloseQuotes: TFlatCheckBox
|
||||||
Left = 176
|
Left = 176
|
||||||
Top = 24
|
Top = 22
|
||||||
Width = 107
|
Width = 107
|
||||||
Height = 17
|
Height = 17
|
||||||
Caption = 'Auto-Close quotes'
|
Caption = 'Auto-Close quotes'
|
||||||
@ -410,7 +412,7 @@ object frmSettings: TfrmSettings
|
|||||||
end
|
end
|
||||||
object chkClearUndoAfterSave: TFlatCheckBox
|
object chkClearUndoAfterSave: TFlatCheckBox
|
||||||
Left = 6
|
Left = 6
|
||||||
Top = 46
|
Top = 38
|
||||||
Width = 125
|
Width = 125
|
||||||
Height = 17
|
Height = 17
|
||||||
Caption = 'Clear Undo after save'
|
Caption = 'Clear Undo after save'
|
||||||
@ -419,7 +421,7 @@ object frmSettings: TfrmSettings
|
|||||||
end
|
end
|
||||||
object chkWordWrap: TFlatCheckBox
|
object chkWordWrap: TFlatCheckBox
|
||||||
Left = 176
|
Left = 176
|
||||||
Top = 44
|
Top = 38
|
||||||
Width = 173
|
Width = 173
|
||||||
Height = 17
|
Height = 17
|
||||||
Caption = 'Word-Wrap (not recommended)'
|
Caption = 'Word-Wrap (not recommended)'
|
||||||
@ -428,7 +430,7 @@ object frmSettings: TfrmSettings
|
|||||||
end
|
end
|
||||||
object pnlCodeFolding: TPanel
|
object pnlCodeFolding: TPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
Top = 158
|
Top = 174
|
||||||
Width = 183
|
Width = 183
|
||||||
Height = 49
|
Height = 49
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
@ -461,7 +463,7 @@ object frmSettings: TfrmSettings
|
|||||||
end
|
end
|
||||||
object pnlCaret: TPanel
|
object pnlCaret: TPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
Top = 92
|
Top = 112
|
||||||
Width = 343
|
Width = 343
|
||||||
Height = 43
|
Height = 43
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
@ -563,7 +565,7 @@ object frmSettings: TfrmSettings
|
|||||||
end
|
end
|
||||||
object pnlAutoIndent: TPanel
|
object pnlAutoIndent: TPanel
|
||||||
Left = 194
|
Left = 194
|
||||||
Top = 158
|
Top = 174
|
||||||
Width = 155
|
Width = 155
|
||||||
Height = 49
|
Height = 49
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
@ -591,6 +593,42 @@ object frmSettings: TfrmSettings
|
|||||||
OnClick = cmdAdvancedAutoIndentClick
|
OnClick = cmdAdvancedAutoIndentClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object chkDontLoadFilesTwice: TFlatCheckBox
|
||||||
|
Left = 6
|
||||||
|
Top = 54
|
||||||
|
Width = 157
|
||||||
|
Height = 17
|
||||||
|
Caption = 'Don'#39't allow to load files twice'
|
||||||
|
TabOrder = 9
|
||||||
|
TabStop = True
|
||||||
|
end
|
||||||
|
object chkMakeBaks: TFlatCheckBox
|
||||||
|
Left = 176
|
||||||
|
Top = 54
|
||||||
|
Width = 151
|
||||||
|
Height = 17
|
||||||
|
Caption = 'Create BAK-file for each file'
|
||||||
|
TabOrder = 10
|
||||||
|
TabStop = True
|
||||||
|
end
|
||||||
|
object chkDisableAC: TFlatCheckBox
|
||||||
|
Left = 6
|
||||||
|
Top = 70
|
||||||
|
Width = 127
|
||||||
|
Height = 17
|
||||||
|
Caption = 'Disable Auto-Complete'
|
||||||
|
TabOrder = 11
|
||||||
|
TabStop = True
|
||||||
|
end
|
||||||
|
object chkDisableCT: TFlatCheckBox
|
||||||
|
Left = 176
|
||||||
|
Top = 70
|
||||||
|
Width = 97
|
||||||
|
Height = 15
|
||||||
|
Caption = 'Disable Call-Tips'
|
||||||
|
TabOrder = 12
|
||||||
|
TabStop = True
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object jspShortcuts: TJvStandardPage
|
object jspShortcuts: TJvStandardPage
|
||||||
Left = 0
|
Left = 0
|
||||||
@ -1480,7 +1518,7 @@ object frmSettings: TfrmSettings
|
|||||||
end
|
end
|
||||||
object chkShowStatusbar: TFlatCheckBox
|
object chkShowStatusbar: TFlatCheckBox
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 214
|
Top = 146
|
||||||
Width = 93
|
Width = 93
|
||||||
Height = 17
|
Height = 17
|
||||||
Caption = 'Show Statusbar'
|
Caption = 'Show Statusbar'
|
||||||
@ -1528,13 +1566,34 @@ object frmSettings: TfrmSettings
|
|||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
object jspCTSettings: TJvStandardPage
|
||||||
|
Left = 0
|
||||||
|
Top = 25
|
||||||
|
Width = 353
|
||||||
|
Height = 235
|
||||||
|
Caption = 'Settings'
|
||||||
|
object lblCodeExplorer: TLabel
|
||||||
|
Left = 6
|
||||||
|
Top = 6
|
||||||
|
Width = 73
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Code-Explorer:'
|
||||||
|
end
|
||||||
|
object lblCodeInspector: TLabel
|
||||||
|
Left = 6
|
||||||
|
Top = 94
|
||||||
|
Width = 79
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Code-Inspector:'
|
||||||
|
end
|
||||||
object pnlPCSpeed: TPanel
|
object pnlPCSpeed: TPanel
|
||||||
Left = 8
|
Left = 6
|
||||||
Top = 146
|
Top = 22
|
||||||
Width = 337
|
Width = 341
|
||||||
Height = 67
|
Height = 67
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
TabOrder = 3
|
TabOrder = 0
|
||||||
object lblCPUSpeed: TLabel
|
object lblCPUSpeed: TLabel
|
||||||
Left = 4
|
Left = 4
|
||||||
Top = 4
|
Top = 4
|
||||||
@ -1550,14 +1609,14 @@ object frmSettings: TfrmSettings
|
|||||||
Caption = 'Slow'
|
Caption = 'Slow'
|
||||||
end
|
end
|
||||||
object lblAverage: TLabel
|
object lblAverage: TLabel
|
||||||
Left = 131
|
Left = 133
|
||||||
Top = 48
|
Top = 48
|
||||||
Width = 41
|
Width = 41
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Average'
|
Caption = 'Average'
|
||||||
end
|
end
|
||||||
object lblFast: TLabel
|
object lblFast: TLabel
|
||||||
Left = 308
|
Left = 314
|
||||||
Top = 48
|
Top = 48
|
||||||
Width = 21
|
Width = 21
|
||||||
Height = 13
|
Height = 13
|
||||||
@ -1566,7 +1625,7 @@ object frmSettings: TfrmSettings
|
|||||||
object sldSpeed: TJvxSlider
|
object sldSpeed: TJvxSlider
|
||||||
Left = 4
|
Left = 4
|
||||||
Top = 18
|
Top = 18
|
||||||
Width = 325
|
Width = 331
|
||||||
Height = 31
|
Height = 31
|
||||||
Increment = 2
|
Increment = 2
|
||||||
MinValue = 1
|
MinValue = 1
|
||||||
@ -1575,6 +1634,42 @@ object frmSettings: TfrmSettings
|
|||||||
Value = 5
|
Value = 5
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object pnlCodeInspector: TPanel
|
||||||
|
Left = 6
|
||||||
|
Top = 112
|
||||||
|
Width = 341
|
||||||
|
Height = 47
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 1
|
||||||
|
object lblLangDir: TLabel
|
||||||
|
Left = 4
|
||||||
|
Top = 4
|
||||||
|
Width = 143
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Directory of all language files:'
|
||||||
|
end
|
||||||
|
object cmdBrowseLangDir: TFlatButton
|
||||||
|
Left = 306
|
||||||
|
Top = 20
|
||||||
|
Width = 29
|
||||||
|
Height = 19
|
||||||
|
ColorFocused = 16245198
|
||||||
|
ColorDown = 16245198
|
||||||
|
ColorHighLight = 8623776
|
||||||
|
ColorShadow = 8623776
|
||||||
|
Caption = '...'
|
||||||
|
TabOrder = 0
|
||||||
|
OnClick = cmdBrowseLangDirClick
|
||||||
|
end
|
||||||
|
object txtLangDir: TFlatEdit
|
||||||
|
Left = 4
|
||||||
|
Top = 20
|
||||||
|
Width = 297
|
||||||
|
Height = 19
|
||||||
|
ColorFlat = clWhite
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object lblCurrSetting: TLabel
|
object lblCurrSetting: TLabel
|
||||||
Left = 0
|
Left = 0
|
||||||
|
@ -159,12 +159,6 @@ type
|
|||||||
lblProxyHost: TLabel;
|
lblProxyHost: TLabel;
|
||||||
cboProxy: TFlatComboBox;
|
cboProxy: TFlatComboBox;
|
||||||
lblProxy: TLabel;
|
lblProxy: TLabel;
|
||||||
pnlPCSpeed: TPanel;
|
|
||||||
lblCPUSpeed: TLabel;
|
|
||||||
sldSpeed: TJvxSlider;
|
|
||||||
lblSlow: TLabel;
|
|
||||||
lblAverage: TLabel;
|
|
||||||
lblFast: TLabel;
|
|
||||||
jspHalfLife: TJvStandardPage;
|
jspHalfLife: TJvStandardPage;
|
||||||
pnlHLExecutable: TPanel;
|
pnlHLExecutable: TPanel;
|
||||||
lblHLExec: TLabel;
|
lblHLExec: TLabel;
|
||||||
@ -182,6 +176,23 @@ type
|
|||||||
cmdBrowseAMXXDir: TFlatButton;
|
cmdBrowseAMXXDir: TFlatButton;
|
||||||
cmdResetShortcuts: TFlatButton;
|
cmdResetShortcuts: TFlatButton;
|
||||||
txtShortcut: TFlatEdit;
|
txtShortcut: TFlatEdit;
|
||||||
|
jspCTSettings: TJvStandardPage;
|
||||||
|
pnlPCSpeed: TPanel;
|
||||||
|
lblCPUSpeed: TLabel;
|
||||||
|
lblSlow: TLabel;
|
||||||
|
lblAverage: TLabel;
|
||||||
|
lblFast: TLabel;
|
||||||
|
sldSpeed: TJvxSlider;
|
||||||
|
lblCodeExplorer: TLabel;
|
||||||
|
lblCodeInspector: TLabel;
|
||||||
|
pnlCodeInspector: TPanel;
|
||||||
|
cmdBrowseLangDir: TFlatButton;
|
||||||
|
txtLangDir: TFlatEdit;
|
||||||
|
lblLangDir: TLabel;
|
||||||
|
chkDontLoadFilesTwice: TFlatCheckBox;
|
||||||
|
chkMakeBaks: TFlatCheckBox;
|
||||||
|
chkDisableAC: TFlatCheckBox;
|
||||||
|
chkDisableCT: TFlatCheckBox;
|
||||||
procedure jplSettingsChange(Sender: TObject);
|
procedure jplSettingsChange(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
@ -243,6 +254,7 @@ type
|
|||||||
procedure txtShortcutKeyUp(Sender: TObject; var Key: Word;
|
procedure txtShortcutKeyUp(Sender: TObject; var Key: Word;
|
||||||
Shift: TShiftState);
|
Shift: TShiftState);
|
||||||
procedure cboFontChange(Sender: TObject);
|
procedure cboFontChange(Sender: TObject);
|
||||||
|
procedure cmdBrowseLangDirClick(Sender: TObject);
|
||||||
public
|
public
|
||||||
Foreground, Background: TColor;
|
Foreground, Background: TColor;
|
||||||
CaretFore, CaretBack: TColor;
|
CaretFore, CaretBack: TColor;
|
||||||
@ -979,4 +991,11 @@ begin
|
|||||||
TSciStyle(TSciLangItem(frmMain.sciEditor.LanguageManager.LanguageList.Items[cboLanguage.ItemIndex]).Styles.Items[lstStyles.ItemIndex]).FontName := cboFont.Text;
|
TSciStyle(TSciLangItem(frmMain.sciEditor.LanguageManager.LanguageList.Items[cboLanguage.ItemIndex]).Styles.Items[lstStyles.ItemIndex]).FontName := cboFont.Text;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSettings.cmdBrowseLangDirClick(Sender: TObject);
|
||||||
|
var eStr: String;
|
||||||
|
begin
|
||||||
|
if SelectDirectory(lSelectLanguageDir, ExtractFilePath(txtLangDir.Text), eStr) then
|
||||||
|
txtLangDir.Text := eStr;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -7,6 +7,7 @@ del .\*.~dfm
|
|||||||
del .\*.~dpr
|
del .\*.~dpr
|
||||||
del .\*.map
|
del .\*.map
|
||||||
del .\*.drc
|
del .\*.drc
|
||||||
|
del .\bugreport.txt
|
||||||
del .\plugins\*.~xfm
|
del .\plugins\*.~xfm
|
||||||
del .\plugins\*.~pas
|
del .\plugins\*.~pas
|
||||||
del .\plugins\*.dcu
|
del .\plugins\*.dcu
|
||||||
|
Loading…
Reference in New Issue
Block a user