//***************************************************************************************** // Copyright (c) 2003 Wil van Antwerpen // All rights reserved, LGPL license // // // $FileName : oIDETagsArray.pkg // $ProjectName : CODEMAX EDITOR // $Author : Wil van Antwerpen // $Created : 20-06-2003 @ 14:00 // // Contents: // An array which contains all the available IDE/DDB // and WebApp Studio tags for keeping your sources // compatible with the DataAccess development tools. // $Rev History // //***************************************************************************************** //TH-RevisionStart // 17.07.2003 13:19 Improved support for the different VDF versions. The Ad // array is now reloaded if you change versions after // selecting a different workspace. // Now only markers for your current VDF version will be // shown. // 07.11.2004 Changed logic so that markers are now added as a pair //TH-RevisionEnd Define csABStart For ("/"+"/AB") Define csDDBStart For ("/"+"/DDB") Define CsIDEStart For ("/"+"/IDE") Define csABStoreTopStart For (csABStart+"-StoreTopStart") Define csABStoreTopEnd For (csABStart+"-StoreTopEnd") Define csABStoreStart For (csABStart+"-StoreStart") Define csABStoreEnd For (csABStart+"-StoreEnd") Define csABIgnoreStart For (csABStart+"-IgnoreStart") Define csABIgnoreEnd For (csABStart+"-IgnoreEnd") Define csABDDOStart For (csABStart+"-DDOStart") Define csABDDOEnd For (csABStart+"-DDOEnd") Define csABPanelStoreStart For (csABStart+"-PanelStoreStart") Define csABPanelStoreEnd For (csABStart+"-PanelStoreEnd") Define csABPanelStoreTopStart For (csABStart+"-PanelStoreTopStart") Define csABPanelStoreTopEnd For (csABStart+"-PanelStoreTopEnd") Define csABClientStoreStart For (csABStart+"-ClientStoreStart") Define csABClientStoreEnd For (csABStart+"-ClientStoreEnd") Define csABClientStoreTopStart For (csABStart+"-ClientStoreTopStart") Define csABClientStoreTopEnd For (csABStart+"-ClientStoreTopEnd") Define csABRegisterInterfaceStart For (csABStart+"-RegisterInterface-Start") Define csABRegisterInterfaceEnd For (csABStart+"-RegisterInterface-End") Define csABMenuAutoGen For (csABStart+"-MenuAutoGen") Define csABMenuPackage For (csABStart+"-MenuPackage") Define csABToolbarPackage For (csABStart+"-ToolbarPackage") Define csABStatusbarPackage For (csABStart+"-StatusBarPackage") Define csABEnd For (csABStart+"-End") Define csABViewStart For (csABStart+"-ViewStart") Define csABViewEnd For (csABStart+"-ViewEnd") Define csDDBSelectionPkgStart For (csDDBStart+"-Selection-pkg-Start") Define csDDBSelectionPkgEnd For (csDDBStart+"-Selection-pkg-End") Define csDDBFileStart For (csDDBStart+"-FileStart") Define csDDBFileEnd For (csDDBStart+"-FileEnd") Define csDDBHeaderStart For (csDDBStart+"-HeaderStart") Define csDDBHeaderEnd For (csDDBStart+"-HeaderEnd") Define csDDBSelectionStart For (csDDBStart+"-SelectionStart") Define csDDBSelectionEnd For (csDDBStart+"-SelectionEnd") Define csDDBGeneratedCodeLocation For (csDDBStart+"-Generated-Code-Location") Define csDDBDefineFieldStart For (csDDBStart+"-DefineFieldStart") Define csDDBDefineFieldEnd For (csDDBStart+"-DefineFieldEnd") Define csDDBFieldDefaultStart For (csDDBStart+"-FieldDefaultStart") Define csDDBFieldDefaultEnd For (csDDBStart+"-FieldDefaultEnd") Define csIDEWebBusinessObjectsStart For (csIDEStart+"-WebBusinessObjects-Start") Define csIDEWebBusinessObjectsEnd For (csIDEStart+"-WebBusinessObjects-End") Define csIDEUseDDStart For (csIDEStart+"-UseDD-Start") Define csIDEUseDDEnd For (csIDEStart+"-UseDD-End") Define csIDEDDOStart For (csIDEStart+"-DDO-Start") Define csIDEDDOEnd For (csIDEStart+"-DDO-End") Define csIDERegisterInterfaceStart For (csIDEStart+"-RegisterInterface-Start") Define csIDERegisterInterfaceEnd For (csIDEStart+"-RegisterInterface-End") Class cIDETagsArray Is a Array Procedure Construct_Object Forward Send Construct_Object Property Number pnLastVDFVersion Public 0 Property Boolean pbDisplayingList Public True End_Procedure // Construct_Object Procedure AddIdeMarkers String sDescription String sStartMarker String sEndMarker Integer iCount Get Item_Count To iCount Set Value Item iCount To (sDescription+"|"+sStartMarker+"\n\tab"+sEndMarker) End_Procedure // AddIdeMarker Function Value Integer iItem Returns String String sValue String sTag Integer iPos Forward Get Value Item iItem To sValue Move (Pos("|",sValue)) To iPos If (iPos<>0) Begin If (pbDisplayingList(Self)) Begin // The IDE tags suggestion list is being displayed // Display the description field Move (Left(sValue,iPos-1)) To sTag End Else Begin // The IDE tags suggestion list is being read for generating // code Move (Left(sValue,iPos-1)) To sTag Move (Replace(sTag+"|",sValue,"")) To sTag End End Else Move sValue To sTag Function_Return sTag End_Function // Value Function TagValue Integer iItem Returns String String sTags Set pbDisplayingList To False Get Value Item iItem To sTags Set pbDisplayingList To True Function_Return sTags End_Function // TagValue Function FindTagsForItem String sItem Returns String String sTags String sValue Integer iCount Integer iLoop Move 0 To iLoop Move "" To sTags Move (Item_Count(Self)-1) To iCount While (iLoop < iCount) Get Value Item iLoop To sValue If (sValue=sItem) Begin Get TagValue Item iLoop To sTags End Increment iLoop Loop Function_Return sTags End_Function // FindTagsForItem Procedure AddAllMarkers Number nVer Get fnCurrentVdfVersion Of ghoWorkSpaceHandlerEx To nVer // 70=VDF7, 82=VDF8.2 Set pnLastVDFVersion To nVer Send AddIdeMarkers "" csABStoreTopStart csABStoreTopEnd Send AddIdeMarkers "" csABStoreStart csABStoreEnd Send AddIdeMarkers "" csABIgnoreStart csABIgnoreEnd Send AddIdeMarkers "" csABDDOStart csABDDOEnd Send AddIdeMarkers "" csDDBSelectionPkgStart csDDBSelectionPkgEnd Send AddIdeMarkers "" csDDBFileStart csDDBFileEnd Send AddIdeMarkers "" csDDBHeaderStart csDDBHeaderEnd Send AddIdeMarkers "" csDDBSelectionStart csDDBSelectionEnd Send AddIdeMarkers "" csDDBGeneratedCodeLocation "" Send AddIdeMarkers "" csDDBDefineFieldStart csDDBDefineFieldEnd Send AddIdeMarkers "" csDDBFieldDefaultStart csDDBFieldDefaultEnd Send AddIdeMarkers "" csIDEWebBusinessObjectsStart csIDEWebBusinessObjectsEnd Send AddIdeMarkers "" csIDEUseDDStart csIDEUseDDEnd Send AddIdeMarkers "" csIDEDDOStart csIDEDDOEnd If (nVer = 70) Begin // WebApp 3.0 only Send AddIdeMarkers "" csIDERegisterInterfaceStart csIDERegisterInterfaceEnd End If (nVer >= 80) Begin Send AddIdeMarkers "" csABMenuAutoGen csABEnd Send AddIdeMarkers "" csABMenuPackage csABEnd Send AddIdeMarkers "" csABToolbarPackage csABEnd Send AddIdeMarkers "" csABStatusbarPackage csABEnd Send AddIdeMarkers "" csABViewStart csABViewEnd Send AddIdeMarkers "" (csABStart+"/") csABEnd // The pseudo marker End Else Begin // before VDF8 Send AddIdeMarkers "" csABPanelStoreStart csABPanelStoreEnd Send AddIdeMarkers "" csABPanelStoreTopStart csABPanelStoreTopEnd Send AddIdeMarkers "" csABClientStoreStart csABClientStoreEnd Send AddIdeMarkers "" csABClientStoreTopStart csABClientStoreTopEnd End If (nVer > 90) Begin // VDF 9.1 and up Send AddIdeMarkers "" csABRegisterInterfaceStart csABRegisterInterfaceEnd End End_Procedure // AddAllMarkers // If the workspace has changed then the VDF version may have changed // as well and if that is the case then we very much like // to only present the IDE markers which are relevant to this specific // version. Procedure OnWorkspaceChanged String sVer Number nVer Get psVDFVersion Of ghoWorkSpaceHandlerEx To sVer Get StringVdfVersionToNum Of ghoWorkSpaceHandlerEx sVer To nVer // 70=VDF7, 82=VDF8.2 If (pnLastVdfVersion(Self) <> nVer) Begin Send Delete_Data Send AddAllMarkers End End_Procedure // OnWorkspaceChanged //Finish object construction Procedure End_Construct_Object Send AddAllMarkers Forward Send End_Construct_Object End_Procedure End_Class // cIDETagsArray Object oIDETagsArray Is a cIDETagsArray //Send Sort_Items ascending End_Object