* flag if trytoopen should look for other extensions

+ browser tab in the tools-compiler
This commit is contained in:
peter 1999-03-12 01:13:56 +00:00
parent a0c648d7aa
commit fa4edfc81f
7 changed files with 178 additions and 104 deletions

View File

@ -187,13 +187,13 @@ var
begin
{ Get FileName }
P:=Message(Desktop,evBroadcast,cmSearchWindow,nil);
if (PrimaryFile='') and (P=nil) then
if (PrimaryFileMain='') and (P=nil) then
begin
ErrorBox('Oooops, nothing to compile.',nil);
Exit;
end;
if PrimaryFile<>'' then
FileName:=PrimaryFile
if PrimaryFileMain<>'' then
FileName:=PrimaryFileMain
else
begin
if P^.Editor^.Modified and (not P^.Editor^.Save) then
@ -279,14 +279,19 @@ end;
end.
{
$Log$
Revision 1.16 1999-03-07 23:00:47 pierre
Revision 1.17 1999-03-12 01:13:56 peter
* flag if trytoopen should look for other extensions
+ browser tab in the tools-compiler
Revision 1.16 1999/03/07 23:00:47 pierre
* Fix for path of executable
Revision 1.15 1999/03/01 15:41:50 peter
+ Added dummy entries for functions not yet implemented
* MenuBar didn't update itself automatically on command-set changes
* Fixed Debugging/Profiling options dialog
* TCodeEditor converts spaces to tabs at save only if efUseTabChars is set
* TCodeEditor converts spaces to tabs at save only if efUseTabChars is
set
* efBackSpaceUnindents works correctly
+ 'Messages' window implemented
+ Added '$CAP MSG()' and '$CAP EDIT' to available tool-macros

View File

@ -40,6 +40,8 @@ type
public
procedure ShowUserScreen;
procedure ShowIDEScreen;
public
procedure UpdatePrimaryFile;
private
Heap: PFPHeapView;
procedure NewEditor;
@ -59,13 +61,13 @@ type
procedure DoResetDebugger;
procedure DoContToCursor;
procedure Target;
procedure PrimaryFile_;
procedure ClearPrimary;
procedure DoPrimaryFile;
procedure DoClearPrimary;
procedure DoUserScreenWindow;
procedure DoUserScreen;
procedure DoOpenGDBWindow;
procedure DoToggleBreak;
procedure Information;
procedure DoInformation;
procedure Messages;
procedure Calculator;
procedure DoAsciiTable;
@ -105,7 +107,6 @@ type
private
procedure Update;
procedure CurDirChanged;
procedure UpdatePrimaryFile;
procedure UpdateINIFile;
procedure UpdateRecentFileList;
procedure UpdateTools;
@ -388,9 +389,9 @@ begin
cmBuild : DoCompile(cBuild);
cmMake : DoCompile(cMake);
cmTarget : Target;
cmPrimaryFile : PrimaryFile_;
cmClearPrimary : ClearPrimary;
cmInformation : Information;
cmPrimaryFile : DoPrimaryFile;
cmClearPrimary : DoClearPrimary;
cmInformation : DoInformation;
{ -- Debug menu -- }
cmUserScreen : DoUserScreen;
cmToggleBreakpoint : DoToggleBreak;
@ -552,6 +553,7 @@ begin
UpdateMenu(MenuBar^.Menu);
end;
procedure TIDEApp.UpdatePrimaryFile;
begin
SetMenuItemParam(SearchMenuItem(MenuBar^.Menu,cmPrimaryFile),SmartPath(PrimaryFile));
@ -716,7 +718,11 @@ end;
END.
{
$Log$
Revision 1.21 1999-03-02 13:48:29 peter
Revision 1.22 1999-03-12 01:13:57 peter
* flag if trytoopen should look for other extensions
+ browser tab in the tools-compiler
Revision 1.21 1999/03/02 13:48:29 peter
* fixed far problem is fpdebug
* tile/cascading with message window
* grep fixes

View File

@ -238,8 +238,10 @@ begin
end;
end;
{ Run }
{ First read the primary file, which can also set the parameters which can
be overruled with the parameter loading }
SetPrimaryFile(INIFile^.GetEntry(secCompile,iePrimaryFile,PrimaryFile));
SetRunParameters(INIFile^.GetEntry(secRun,ieRunParameters,GetRunParameters));
PrimaryFile:=INIFile^.GetEntry(secCompile,iePrimaryFile,PrimaryFile);
{ Compile }
S:=INIFile^.GetEntry(secCompile,ieCompileMode,'');
for ts:=low(TSwitchMode) to high(TSwitchMode) do
@ -297,6 +299,7 @@ begin
PS:=PS+StrToPalette(INIFile^.GetEntry(secColors,iePalette+'_161_200',PaletteToStr(copy(S,161,40))));
PS:=PS+StrToPalette(INIFile^.GetEntry(secColors,iePalette+'_201_240',PaletteToStr(copy(S,201,40))));
AppPalette:=PS;
{ Open files }
for I:=INIFile^.GetIntEntry(secFiles,ieOpenFileCount,0) downto 1 do
begin
S:=INIFile^.GetEntry(secFiles,ieOpenFile+IntToStr(I),'');
@ -329,9 +332,9 @@ begin
if P=0 then P:=length(S)+1;
R.B.Y:=Max(0,StrToInt(copy(S,1,P-1)));
if (R.A.X<R.B.X) and (R.A.Y<R.B.Y) then
TryToOpenFile(@R,S1,X,Y)
TryToOpenFile(@R,S1,X,Y,false)
else
TryToOpenFile(nil,S1,X,Y);
TryToOpenFile(nil,S1,X,Y,false);
{ remove it because otherwise we allways keep old files }
INIFile^.DeleteEntry(secFiles,ieOpenFile+IntToStr(I));
end;
@ -461,7 +464,11 @@ end;
end.
{
$Log$
Revision 1.16 1999-03-08 14:58:09 peter
Revision 1.17 1999-03-12 01:13:58 peter
* flag if trytoopen should look for other extensions
+ browser tab in the tools-compiler
Revision 1.16 1999/03/08 14:58:09 peter
+ prompt with dialogs for tools
Revision 1.15 1999/03/05 17:53:02 pierre

View File

@ -47,29 +47,32 @@ begin
Dispose(D, Done);
end;
procedure TIDEApp.PrimaryFile_;
procedure TIDEApp.DoPrimaryFile;
var
D : PFileDialog;
FileName : string;
begin
New(D, Init('*.pas','Primary file','*.pas',fdOpenButton,0));
New(D, Init('*.pri;*.pas','Primary file','*.pri;*.pas',fdOpenButton,0));
if Desktop^.ExecView(D)<>cmCancel then
begin
D^.GetFileName(FileName);
PrimaryFile:=FileName;
SetPrimaryFile(FileName);
UpdatePrimaryFile;
end;
end;
procedure TIDEApp.ClearPrimary;
procedure TIDEApp.DoClearPrimary;
begin
PrimaryFile:='';
PrimaryFileMain:='';
PrimaryFileSwitches:='';
PrimaryFilePara:='';
UpdatePrimaryFile;
end;
procedure TIDEApp.Information;
procedure TIDEApp.DoInformation;
begin
with ProgramInfoWindow^ do
begin
@ -81,7 +84,11 @@ end;
{
$Log$
Revision 1.2 1998-12-28 15:47:46 peter
Revision 1.3 1999-03-12 01:13:59 peter
* flag if trytoopen should look for other extensions
+ browser tab in the tools-compiler
Revision 1.2 1998/12/28 15:47:46 peter
+ Added user screen support, display & window
+ Implemented Editor,Mouse Options dialog
+ Added location of .INI and .CFG file

View File

@ -61,13 +61,15 @@ procedure TIDEApp.DoCompilerSwitch;
var R,R2,TabR,TabIR: TRect;
D: PCenterDialog;
CB1,CB2,CB3,CB4: PCheckBoxes;
RB1,RB2,RB3: PRadioButtons;
RB1,RB2,RB3,RB4: PRadioButtons;
Items: PSItem;
IL: PInputLine;
Count : integer;
I,L: longint;
Tab: PTab;
Label11,Label21,Label22,Label23,Label24,Label31: PLabel;
Label11,Label12,
Label21,Label22,Label23,
Label31,Label41: PLabel;
begin
R.Assign(0,0,72,18);
New(D, Init(R, 'Compiler Switches'));
@ -85,7 +87,7 @@ begin
Count:=SyntaxSwitches^.ItemCount;
R.Copy(TabIR);
R2.Copy(R);
R2.B.X:=R2.A.X+(R2.B.X-R2.A.X) div 2;
R2.B.X:=(R2.A.X+(R2.B.X-R2.A.X) div 2)-2;
R2.B.Y:=R2.A.Y+Count;
Items:=nil;
for I:=Count-1 downto 0 do
@ -98,6 +100,21 @@ begin
R2.B.Y:=R2.A.Y+1;
New(Label11, Init(R2, 'Syntax Switches', CB1));
Count:=AsmReaderSwitches^.ItemCount;
R2.Copy(TabIR);
R2.A.X:=R2.B.X-(R2.B.X-R2.A.X) div 2;
Dec(R2.B.X,4);
R2.B.Y:=R2.A.Y+Count;
Items:=nil;
for I:=Count-1 downto 0 do
Items:=NewSItem(AsmReaderSwitches^.ItemName(I), Items);
New(RB2, Init(R2, Items));
L:=AsmReaderSwitches^.GetCurrSel;
RB2^.SetData(L);
Dec(R2.A.Y);
R2.B.Y:=R2.A.Y+1;
New(Label12, Init(R2, 'Assembler format', RB2));
{ --- Sheet 2 --- }
Count:=CodegenSwitches^.ItemCount;
R2.Copy(TabIR);
@ -149,7 +166,7 @@ begin
Count:=ProcessorSwitches^.ItemCount;
R2.Copy(TabIR);
R2.B.X:=R2.A.X+(R2.B.X-R2.A.X) div 2-2;
Inc(R2.A.Y,1+CodegenSwitches^.ItemCount);
Inc(R2.A.Y,CodegenSwitches^.ItemCount+2);
R2.B.Y:=R2.A.Y+Count;
Items:=nil;
for I:=Count-1 downto 0 do
@ -161,22 +178,6 @@ begin
R2.B.Y:=R2.A.Y+1;
New(Label23, Init(R2, 'Target processor', RB1));
Count:=AsmReaderSwitches^.ItemCount;
R2.Copy(TabIR);
R2.A.X:=R2.B.X-(R2.B.X-R2.A.X) div 2;
Dec(R2.B.X,4);
Inc(R2.A.Y, OptimizationSwitches^.ItemCount+OptimizingGoalSwitches^.ItemCount);
R2.B.Y:=R2.A.Y+Count;
Items:=nil;
for I:=Count-1 downto 0 do
Items:=NewSItem(AsmReaderSwitches^.ItemName(I), Items);
New(RB2, Init(R2, Items));
L:=AsmReaderSwitches^.GetCurrSel;
RB2^.SetData(L);
Dec(R2.A.Y);
R2.B.Y:=R2.A.Y+1;
New(Label24, Init(R2, 'Assembler format', RB2));
{ --- Sheet 3 --- }
Count:=VerboseSwitches^.ItemCount;
R.Copy(TabIR);
@ -194,12 +195,30 @@ begin
R2.B.Y:=R2.A.Y+1;
New(Label31, Init(R2, 'Verbose Switches', CB4));
{ --- Sheet 4 --- }
Count:=BrowserSwitches^.ItemCount;
R.Copy(TabIR);
R2.Copy(R);
R2.B.X:=R2.A.X+(R2.B.X-R2.A.X) div 2;
R2.B.Y:=R2.A.Y+Count;
Items:=nil;
for I:=Count-1 downto 0 do
Items:=NewSItem(BrowserSwitches^.ItemName(I), Items);
New(RB4, Init(R2, Items));
L:=BrowserSwitches^.GetCurrSel;
RB4^.SetData(L);
Dec(R2.A.Y);
R2.B.Y:=R2.A.Y+1;
New(Label41, Init(R2, 'Browser', RB4));
{ create tabs }
New(Tab, Init(TabR,
NewTabDef('S~y~ntax',CB1,
NewTabItem(Label11,
NewTabItem(CB1,
nil)),
NewTabItem(Label12,
NewTabItem(RB2,
nil)))),
NewTabDef('Code ~g~eneration',CB3,
NewTabItem(Label21,
NewTabItem(CB3,
@ -208,14 +227,16 @@ begin
NewTabItem(Label23,
NewTabItem(RB3,
NewTabItem(RB1,
NewTabItem(Label24,
NewTabItem(RB2,
nil))))))))),
nil))))))),
NewTabDef('~V~erbose',CB4,
NewTabItem(Label31,
NewTabItem(CB4,
nil)),
nil)))));
NewTabDef('~B~rowser',RB4,
NewTabItem(Label41,
NewTabItem(RB4,
nil)),
nil))))));
Tab^.GrowMode:=0;
Insert(Tab);
@ -241,6 +262,7 @@ begin
OptimizingGoalSwitches^.SetCurrSel(RB3^.Value);
ProcessorSwitches^.SetCurrSel(RB1^.Value);
AsmReaderSwitches^.SetCurrSel(RB2^.Value);
BrowserSwitches^.SetCurrSel(RB4^.Value);
ConditionalSwitches^.SetStringItem(0,IL^.Data^);
end;
Dispose(D, Done);
@ -354,7 +376,7 @@ var R,R2: TRect;
begin
R.Assign(0,0,60,2+DebugInfoSwitches^.ItemCount+2
+ProfileInfoSwitches^.ItemCount+2+2+1);
New(D, Init(R, 'Debugging/Profiling'));
New(D, Init(R, 'Browsing/Debugging/Profiling'));
with D^ do
begin
GetExtent(R); R.Grow(-3,-1);
@ -805,11 +827,16 @@ end;
{
$Log$
Revision 1.18 1999-03-01 15:41:57 peter
Revision 1.19 1999-03-12 01:14:00 peter
* flag if trytoopen should look for other extensions
+ browser tab in the tools-compiler
Revision 1.18 1999/03/01 15:41:57 peter
+ Added dummy entries for functions not yet implemented
* MenuBar didn't update itself automatically on command-set changes
* Fixed Debugging/Profiling options dialog
* TCodeEditor converts spaces to tabs at save only if efUseTabChars is set
* TCodeEditor converts spaces to tabs at save only if efUseTabChars is
set
* efBackSpaceUnindents works correctly
+ 'Messages' window implemented
+ Added '$CAP MSG()' and '$CAP EDIT' to available tool-macros

View File

@ -115,7 +115,7 @@ const
('NORMAL','DEBUG','RELEASE');
CustomArg : array[TSwitchMode] of string=
('','','');
var
LibLinkerSwitches,
DebugInfoSwitches,
@ -131,6 +131,7 @@ var
TargetSwitches,
ConditionalSwitches,
MemorySwitches,
BrowserSwitches,
DirectorySwitches : PSwitches;
{ write/read the Switches to ppc.cfg file }
@ -154,7 +155,7 @@ var
CfgFile : text;
{*****************************************************************************
TSwitchItem
TSwitchItem
*****************************************************************************}
constructor TSwitchItem.Init(const n,p:string);
@ -183,7 +184,7 @@ end;
{*****************************************************************************
TSelectItem
TSelectItem
*****************************************************************************}
constructor TSelectItem.Init(const n,p:string);
@ -194,7 +195,7 @@ end;
{*****************************************************************************
TBooleanItem
TBooleanItem
*****************************************************************************}
constructor TBooleanItem.Init(const n,p:string);
@ -218,7 +219,7 @@ end;
{*****************************************************************************
TStringItem
TStringItem
*****************************************************************************}
constructor TStringItem.Init(const n,p:string;mult:boolean);
@ -249,7 +250,7 @@ end;
{*****************************************************************************
TLongintItem
TLongintItem
*****************************************************************************}
constructor TLongintItem.Init(const n,p:string);
@ -282,7 +283,7 @@ end;
{*****************************************************************************
TSwitch
TSwitch
*****************************************************************************}
constructor TSwitches.Init(ch:char);
@ -457,23 +458,23 @@ var
if P^.NeedParam then
begin
if (P^.Typ=ot_string) and (PStringItem(P)^.Multiple) then
begin
s:=PStringItem(P)^.Str[SwitchesMode];
repeat
i:=pos(';',s);
j:=pos(' ',s);
if i=0 then
i:=256;
if (j>0) and (j<i) then
i:=j;
s1:=Copy(s,1,i-1);
if s1<>'' then
writeln(CfgFile,' -'+Pref+P^.Param+s1);
Delete(s,1,i);
until s='';
end
begin
s:=PStringItem(P)^.Str[SwitchesMode];
repeat
i:=pos(';',s);
j:=pos(' ',s);
if i=0 then
i:=256;
if (j>0) and (j<i) then
i:=j;
s1:=Copy(s,1,i-1);
if s1<>'' then
writeln(CfgFile,' -'+Pref+P^.Param+s1);
Delete(s,1,i);
until s='';
end
else
Writeln(CfgFile,' -'+Pref+P^.Param+P^.ParamValue);
Writeln(CfgFile,' -'+Pref+P^.Param+P^.ParamValue);
end;
end;
@ -497,9 +498,9 @@ begin
if i=0 then i:=256;
writeln(CfgFile,' '+Copy(s,1,i-1));
if i=256 then
s:=''
s:=''
else
s:=copy(s,i+1,255);
s:=copy(s,i+1,255);
end;
end;
@ -510,7 +511,7 @@ function TSwitches.ReadItemsCfg(const s:string):boolean;
begin
{ empty items are not equivalent to others !! }
CheckItem:=((S='') and (P^.Param='')) or
((Length(S)>0) and (P^.Param=Copy(s,1,length(P^.Param))));
((Length(S)>0) and (P^.Param=Copy(s,1,length(P^.Param))));
end;
var
@ -524,12 +525,12 @@ begin
ot_Select : SelNr[SwitchesMode]:=Items^.IndexOf(FoundP);
ot_Boolean : PBooleanItem(FoundP)^.IsSet[SwitchesMode]:=true;
ot_String : begin
if (PStringItem(FoundP)^.Multiple) and (PStringItem(FoundP)^.Str[SwitchesMode]<>'') then
PStringItem(FoundP)^.Str[SwitchesMode]:=PStringItem(FoundP)^.Str[SwitchesMode]+';'+
Copy(s,length(FoundP^.Param)+1,255)
else
PStringItem(FoundP)^.Str[SwitchesMode]:=Copy(s,length(FoundP^.Param)+1,255);
end;
if (PStringItem(FoundP)^.Multiple) and (PStringItem(FoundP)^.Str[SwitchesMode]<>'') then
PStringItem(FoundP)^.Str[SwitchesMode]:=PStringItem(FoundP)^.Str[SwitchesMode]+';'+
Copy(s,length(FoundP^.Param)+1,255)
else
PStringItem(FoundP)^.Str[SwitchesMode]:=Copy(s,length(FoundP^.Param)+1,255);
end;
ot_Longint : Val(Copy(s,length(FoundP^.Param)+1,255),PLongintItem(FoundP)^.Val[SwitchesMode],code);
end;
ReadItemsCfg:=true;
@ -540,7 +541,7 @@ end;
{*****************************************************************************
Read / Write
Read / Write
*****************************************************************************}
procedure WriteSwitches(const fn:string);
@ -573,6 +574,7 @@ begin
LibLinkerSwitches^.WriteItemsCfg;
DebugInfoSwitches^.WriteItemsCfg;
ProfileInfoSwitches^.WriteItemsCfg;
BrowserSwitches^.WriteItemsCfg;
{MemorySizeSwitches^.WriteItemsCfg;}
WriteCustom;
Writeln(CfgFile,'#ENDIF');
@ -617,17 +619,18 @@ begin
'T' : res:=TargetSwitches^.ReadItemsCfg(s);
'R' : res:=AsmReaderSwitches^.ReadItemsCfg(s);
'C' : begin
res:=CodegenSwitches^.ReadItemsCfg(s);
if not res then
res:=MemorySwitches^.ReadItemsCfg(s);
end;
res:=CodegenSwitches^.ReadItemsCfg(s);
if not res then
res:=MemorySwitches^.ReadItemsCfg(s);
end;
'v' : res:=VerboseSwitches^.ReadItemsCfg(s);
'O' : begin
res:=true;
if not OptimizationSwitches^.ReadItemsCfg(s) then
if not ProcessorSwitches^.ReadItemsCfg(s) then
res:=OptimizingGoalSwitches^.ReadItemsCfg(s)
end;
res:=true;
if not OptimizationSwitches^.ReadItemsCfg(s) then
if not ProcessorSwitches^.ReadItemsCfg(s) then
res:=OptimizingGoalSwitches^.ReadItemsCfg(s);
end;
'b' : res:=BrowserSwitches^.ReadItemsCfg(s);
end;
{ keep all others as a string }
if not res then
@ -636,13 +639,13 @@ begin
else
if (Copy(s,1,7)='#IFDEF ') then
begin
Delete(s,1,7);
for i:=low(TSwitchMode) to high(TSwitchMode) do
if s=SwitchesModeStr[i] then
begin
SwitchesMode:=i;
break;
end;
Delete(s,1,7);
for i:=low(TSwitchMode) to high(TSwitchMode) do
if s=SwitchesModeStr[i] then
begin
SwitchesMode:=i;
break;
end;
end
else;
end;
@ -678,7 +681,7 @@ begin
end;
{*****************************************************************************
Initialize
Initialize
*****************************************************************************}
procedure InitSwitches;
@ -752,6 +755,13 @@ begin
AddSelectItem('~A~T&T style assembler','att');
AddSelectItem('Int~e~l style assembler','intel');
end;
New(BrowserSwitches,InitSelect('b'));
with BrowserSwitches^ do
begin
AddSelectItem('~N~o browser','-');
AddSelectItem('Only ~G~lobal browser','+');
AddSelectItem('~L~ocal and global browser','l');
end;
New(ConditionalSwitches,Init('d'));
with ConditionalSwitches^ do
begin
@ -772,7 +782,7 @@ begin
AddStringItem('~O~bject directories','o',true);
AddStringItem('~E~XE & PPU directories','E',true);
end;
New(LibLinkerSwitches,InitSelect('X'));
with LibLinkerSwitches^ do
begin
@ -814,6 +824,7 @@ begin
dispose(OptimizationSwitches,Done);
dispose(OptimizingGoalSwitches,Done);
dispose(ProcessorSwitches,Done);
dispose(BrowserSwitches,Done);
dispose(TargetSwitches,Done);
dispose(AsmReaderSwitches,Done);
dispose(ConditionalSwitches,Done);
@ -830,7 +841,11 @@ end;
end.
{
$Log$
Revision 1.10 1999-02-16 12:46:38 pierre
Revision 1.11 1999-03-12 01:14:01 peter
* flag if trytoopen should look for other extensions
+ browser tab in the tools-compiler
Revision 1.10 1999/02/16 12:46:38 pierre
* String items can also be separated by spaces
Revision 1.9 1999/02/10 09:45:55 pierre

View File

@ -37,6 +37,9 @@ const ClipboardWindow : PClipboardWindow = nil;
TabsPattern : string = 'make*;make*.*';
SourceDirs : string = '';
PrimaryFile : string = '';
PrimaryFileMain : string = '';
PrimaryFileSwitches : string = '';
PrimaryFilePara : string = '';
GDBOutputFile : string = 'gdb$$$.txt';
IsEXECompiled : boolean = false;
MainFile : string = '';
@ -70,7 +73,11 @@ implementation
END.
{
$Log$
Revision 1.11 1999-03-08 14:58:15 peter
Revision 1.12 1999-03-12 01:14:02 peter
* flag if trytoopen should look for other extensions
+ browser tab in the tools-compiler
Revision 1.11 1999/03/08 14:58:15 peter
+ prompt with dialogs for tools
Revision 1.10 1999/03/01 15:42:07 peter