![]() ![]() IF IDE.MainFileForCompiler "" THEN TheExeName = MFE_List.Item (MFE_GetFileIndex (IDE.MainFileForCompiler ) ) IF TRIM$ (IDE.FBCommandLine ) "" THEN TheCompilerScript = TheCompilerScript IDE_Conf_FBHelpFilePathEdit.Text Quot$ 'gotta do something END IF DEFSTR TheExeName = IDE.MFEActiveFile TheCompilerScript = TheCompilerScript IDE.FBCompilerPath Quot$ TheCompilerScript = Quot$ 'set up IF IDE.FBCompilerPath "" THEN ' IF r "" THEN Execute_ExternalApp (IDE.ScriptBeforeCompile ) 'want a compile script like this "\program files\freebasic\fbc.exe" -s gui "myprog.bas" > out.$$$ ' DEFINT r2 = re.FindLocation(CRLF "FUNCTION", 0, 1, 0) ' DEFINT r = re.FindLocation(CRLF "SUB ", 0, 1, 0) 'keeps finding first one!! ' re.Set_AnchorPosition(i) 'remove selection GListOkButton.Tag = 1 'signal this is for go to line IDE.HiLightTurnOFF = True 'toggle to turn off compile error line IncResPanel.Visible = False 'turn off other panelsĮND SUB SUB SubsCombo_Change_objects (Sender AS QCOMBOBOX ) DEFSTR tmp = FIELD$ (Sender.Item (Sender.ItemIndex ), LineNumDelimitr, 2 ) DEFINT TheLineNum = VAL (tmp ) IF IDE.ShowSubsAfterLoad THEN 'switch to show the list of subs functions CAPTION, LineNumDelimitr, 3 ) ) 'get value from line, SubItem crashes NEXT i SubFuncListView (indx ).Item (i ).ImageIndex = VAL ( FIELD$ (SubFuncListView (indx ).Item (i ). FOR i = 0 TO SubFuncListView (indx ).ItemCount-1 'align icons now IF IDE.SortSubs THEN SubFuncListView (indx ).SortType = stText 'now sort it. SubFuncListView (indx ).AddItems DELETE$ ( LTRIM$ (tmpList.Item (i ) ), 1, 16 ) SPACE$ (90 ) LineNumDelimitr STR$ (i ) LineNumDelimitr " 1" SubFuncListView (indx ).AddItems DELETE$ ( LTRIM$ (tmpList.Item (i ) ), 1, 11 ) SPACE$ (90 ) LineNumDelimitr STR$ (i ) LineNumDelimitr " 0"ĮLSE IF INSTR ( LEFT$ (Search, 18 ), " FUNCTION " ) THEN IDE.ListResources (indx ).AddItems REPLACESUBSTR$ (Search, Quot$, "" ) 'make a backup for multiple file END IF ELSEIF ( LEFT$ (Search, 8 ) = " PRIVATE " ) OR ( LEFT$ (Search, 7 ) = " PUBLIC " ) THEN IF INSTR ( LEFT$ (Search, 12 ), " SUB " ) THEN MainListBoxResources.AddItems REPLACESUBSTR$ (Search, Quot$, "" ) 'hope quotes are not in file/path Search = DELETE$ (TRIM$ ( tmpList.Item (i ) ), 1, 10 ) IDE.ListIncludes (indx ).AddItems IDE.CompilerIncPath " \" Search 'make a backup for multiple file END IF END IF END IF END IF ELSEIF ( LEFT$ (Search, 10 ) = " $RESOURCE " ) THEN MainListBoxIncludes.AddItems IDE.CompilerIncPath " \" Search IDE.ListIncludes (indx ).AddItems (StripPath (IDE.MFEActiveFile ) Search ) ELSE MainListBoxIncludes.AddItems (StripPath (IDE.MFEActiveFile ) Search ) IDE.ListIncludes (indx ).AddItems Search 'make a backup for multiple file ELSE IF FILEEXISTS (StripPath (IDE.MFEActiveFile ) Search ) THEN Search = REPLACESUBSTR$ (Search, " ", "" ) IF FILEEXISTS (Search ) THEN IDE.ListIncludes (indx ).AddItems REPLACESUBSTR$ (Search, Quot$, "" ) 'make a backup for multiple file ELSEĬommFound = RINSTR (Search, " >" ) 'get default inc path files IF CommFound > 0 THEN MainListBoxIncludes.AddItems REPLACESUBSTR$ (Search, Quot$, "" ) 'hope quotes are not in file/path Search = DELETE$ (TRIM$ ( tmpList.Item (i ) ), 1, 9 )ĬommFound = RINSTR (Search, sQuot ) 'get comments out IF CommFound > 0 THEN Search = RTRIM$ ( LEFT$ (Search, CommFound-1 ) )ĬommFound = RINSTR (Search, Quot$ ) IF CommFound > 0 THEN SubFuncListView (indx ).AddItems DELETE$ ( LTRIM$ (tmpList.Item (i ) ), 1, 9 ) SPACE$ (90 ) LineNumDelimitr STR$ (i ) LineNumDelimitr " 1"ĮLSEIF ( LEFT$ (Search, 9 ) = InclStr ) THEN ' SubFuncListView(indx).AddSubItem Cnt, STR$(i) 'problem with sortingĮLSEIF ( LEFT$ (Search, 9 ) = " FUNCTION " ) THEN ' SubFuncListView(indx).Item(Cnt).ImageIndex = 0 SubFuncListView (indx ).AddItems DELETE$ ( LTRIM$ (tmpList.Item (i ) ), 1, 4 ) SPACE$ (90 ) LineNumDelimitr STR$ (i ) LineNumDelimitr " 0" can separate subs from functions by first char as CHR$(171) Search = LTRIM$ ( UCASE$ (tmpList.Item (i ) ) ) IF ( LEFT$ (Search, 4 ) = " SUB " ) THEN 'put all information on one line for easy sorting, name, line#, image index. ![]() IF IDE.ModuleType (MFE_Tab.TabIndex ) > 0 THEN InclStr = " #" 'compatible with freebasic SubFuncListView (indx ).SortType = stNone 'wait for it. SubFuncListView (indx ).Clear 'clear listview IDE.ListIncludes (indx ).Clear 'clear backups too MainListBoxIncludes.Clear 'clear out, we are going to add items SUB ParseSubIncRes (indx AS INTEGER, SourceText AS STRING ) DEFINT i, Cnt = 0, SubsFound = 0, CommFound = 0 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |