// TH3BuildMenu.mn Use cCJCommandBarSystem.pkg Register_Function CAFileNameCur Returns String Object oBuildMenu is a cCJMenuItem Set peControlType to xtpControlPopup Set psCaption to "&Build" Set psDescription to "Compile, Debug, Run the Project" Set psCategory to "Build" Object oRunItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set psImage to "Build16.bmp" Set psCaption to "Run" Set psToolTip to "Compile and Run the current project" Set psDescription to "Run project" Set psShortcut to "F5" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CABuildRun of hoClient End_Procedure End_Object Object oCompileItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set psImage to "Compile16.bmp" Set psCaption to "Compile" Set psToolTip to "Compile the current project" Set psDescription to "Compile project" Set psShortcut to "" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CABuildCompile of hoClient End_Procedure End_Object Object oExecuteItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set psImage to "Run16.bmp" Set psCaption to "Execute" Set psToolTip to "Execute the current project" Set psDescription to "Execute project" Set psShortcut to "" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CABuildExecute of hoClient End_Procedure End_Object Object oCmdLineItem is a cCJMenuItem Set pbAddToDesignerMenu to True //Set psImage to "New16.bmp" Set psCaption to "Command Line Parameters" Set psToolTip to "Allows to specify the command line for the current project" Set psDescription to "Specify run parameters" Set psShortcut to "" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CABuildCommandLineParameter of hoClient End_Procedure End_Object Object oSignItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set pbControlBeginGroup to True Set psCaption to "Sign Project" Set psToolTip to "Sign the current DataFlex project" Set psDescription to "Sign the current DataFlex project" Set psShortcut to "" Set psImage to "ActionSign16.ico" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send Info_Box "Further work required on Project Signing" Send LaunchProjectSignUtility of hoClient End_Procedure End_Object Object oDebugItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set pbControlBeginGroup to True //Set psImage to "New16.bmp" Set psCaption to "Debug Run" Set psToolTip to "Compile and run the current project with the debugging tool" Set psDescription to "Debug" Set psShortcut to "" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CABuildDebugRun of hoClient End_Procedure End_Object Object oPrecompileWindowsItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set pbControlBeginGroup to True //Set psImage to "New16.bmp" Set psCaption to "Pre-Compile Windows.pkg..." Set psToolTip to "Pre-compile standard DataFlex Windows.pkg package" Set psDescription to "Pre-Compile Windows.pkg" Set psShortcut to "" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send PreCompileWindows of hoClient End_Procedure End_Object Object oPrecompileDFAllEntItem is a cCJMenuItem Set pbAddToDesignerMenu to True //Set psImage to "New16.bmp" Set psCaption to "Pre-Compile DFAllEnt.pkg..." Set psToolTip to "Pre-compile standard DataFlex DFAllEnt.pkg package" Set psDescription to "Pre-Compile Windows.pkg" Set psShortcut to "" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send PreCompileDFAllEnt of hoClient End_Procedure End_Object Object oPrecompileAllWebAppItem is a cCJMenuItem Set pbAddToDesignerMenu to True //Set psImage to "New16.bmp" Set psCaption to "Pre-Compile AllWebAppClasses.pkg..." Set psToolTip to "Pre-compile standard DataFlex AllWebAppClasses.pkg package" Set psDescription to "Pre-Compile AllWebAppClasses.pkg" Set psShortcut to "" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send PreCompileAllWebAppClasses of hoClient End_Procedure End_Object Object oPrecompileItem is a cCJMenuItem Set pbAddToDesignerMenu to True Set psCaption to "Pre-Compile..." Set psToolTip to "Pre-compile selected file" Set psDescription to "Pre-Compile selected file" Set psShortcut to "" Procedure OnExecute Variant vCommandBarControl Handle hoClient Get Client_Id to hoClient Send CABuildPreCompile of hoClient End_Procedure End_Object #IFDEF TH_TRANSLATION Procedure Translate Set psCaption of oRunItem to gILanguage[104] Set psToolTip of oRunItem to gILanguage[105] Set psDescription of oRunItem to gILanguage[106] Set psCaption of oCompileItem to gILanguage[107] Set psToolTip of oCompileItem to gILanguage[108] Set psDescription of oCompileItem to gILanguage[109] Set psCaption of oExecuteItem to gILanguage[110] Set psToolTip of oExecuteItem to gILanguage[111] Set psDescription of oExecuteItem to gILanguage[112] Set psCaption of oCmdLineItem to gILanguage[113] Set psToolTip of oCmdLineItem to gILanguage[114] Set psDescription of oCmdLineItem to gILanguage[115] Set psCaption of oSignItem to gILanguage[116] Set psToolTip of oSignItem to gILanguage[117] Set psDescription of oSignItem to gILanguage[118] Set psCaption of oDebugItem to gILanguage[119] Set psToolTip of oDebugItem to gILanguage[120] Set psDescription of oDebugItem to gILanguage[121] Set psCaption of oPrecompileWindowsItem to gILanguage[122] Set psToolTip of oPrecompileWindowsItem to gILanguage[123] Set psDescription of oPrecompileWindowsItem to gILanguage[124] Set psCaption of oPrecompileDFAllEntItem to gILanguage[125] Set psToolTip of oPrecompileDFAllEntItem to gILanguage[126] Set psDescription of oPrecompileDFAllEntItem to gILanguage[127] Set psCaption of oPrecompileAllWebAppItem to gILanguage[128] Set psToolTip of oPrecompileAllWebAppItem to gILanguage[129] Set psDescription of oPrecompileAllWebAppItem to gILanguage[130] Set psCaption of oPrecompileItem to gILanguage[131] Set psToolTip of oPrecompileItem to gILanguage[132] Set psDescription of oPrecompileItem to gILanguage[133] End_Procedure #ENDIF Procedure OnPopupInit Variant vCommandBarControl Handle hCommandBarControls Forward Send OnPopupInit vCommandBarControl hCommandBarControls // String sFile sExt sCurFile sTmp sDesc Handle hoClient Get Client_Id to hoClient // Init Set pbVisible of oPrecompileItem to False Set psCaption of oRunItem to (_T("&Run", 134)) Set psCaption of oCompileItem to (_T("&Compile", 135)) Set psCaption of oExecuteItem to (_T("&Execute", 136)) Set psCaption of oPrecompileItem to (_T("&Pre-Compile", 137)) Set pbEnabled of oRunItem to False Set pbEnabled of oCompileItem to False Set pbEnabled of oExecuteItem to False Set pbEnabled of oDebugItem to False Set pbEnabled of oCmdLineItem to False Set pbEnabled of oSignItem to False // If (gsCurrentProgramFile<>"") Move gsCurrentProgramFile to sFile Get CAFileNameCur of hoClient to sCurFile Move (Right(Uppercase(Trim(sCurFile)),4)) to sExt If (sExt=".SRC") Move sCurFile to sFile If (sFile<>"") Begin #IFDEF TH_TRANSLATION Move (Replace("%1", gILanguage[138], sFile)) to sDesc // Run Set psCaption of oRunItem to sDesc Move (Replace("%1", gILanguage[139], sFile)) to sDesc // Compile Set psCaption of oCompileItem to sDesc #ELSE Set psCaption of oRunItem to ("&Run"*'<'+sFile+'>') Set psCaption of oCompileItem to ("&Compile"*'<'+sCurFile+'>') #ENDIF Move (FileFromPath(sFile)) to sTmp If (sTmp Ne "") Begin Move (Left(sTmp,Length(sTmp)-4)) to sTmp If (Trim(gsCurrentCommandLinePara)) Ne "" Begin Append sTmp " " (Character(34)) gsCurrentCommandLinePara (Character(34)) End Move sTmp to sFile End #IFDEF TH_TRANSLATION Move (Replace("%1", gILanguage[140], sFile)) to sDesc // Execute #ELSE Move ("&Execute"*'<'+sFile+'>') to sDesc #ENDIF Set psCaption of oExecuteItem to sDesc Set pbEnabled of oRunItem to True Set pbEnabled of oCompileItem to True Set pbEnabled of oExecuteItem to True Set pbEnabled of oDebugItem to True Set pbEnabled of oCmdLineItem to True Set pbEnabled of oSignItem to True End // If (sExt=".PKG") Begin Move sCurFile to sFile Set pbVisible of oPrecompileItem to True #IFDEF TH_TRANSLATION Move (Replace("%1", gILanguage[141], sFile)) to sDesc // Pre-compile #ELSE Move ("&Pre-Compile"*'<'+sFile+'>') to sDesc #ENDIF Set psCaption of oPrecompileItem to sDesc End // // Hot Keys Send AddCJKeyStringToMenuItem (oRunItem (Self)) CMD_BuildRun Send AddCJKeyStringToMenuItem (oCompileItem(Self)) CMD_BuildCompileCurrent Send AddCJKeyStringToMenuItem (oExecuteItem(Self)) CMD_BuildExecute Send AddCJKeyStringToMenuItem (oDebugItem (Self)) CMD_BuildDebugRunCurrent // End_Procedure Procedure End_Construct_Object Forward Send End_Construct_Object Get Object_Id to ghoBuildMenu End_Procedure End_Object