| @@ -4,6 +4,26 @@ JUCE breaking changes | |||
| Develop | |||
| ======= | |||
| Change | |||
| ------ | |||
| The live build functionality of the Projucer has been removed. | |||
| Possible Issues | |||
| --------------- | |||
| You will no longer be able to use live build in the Projucer. | |||
| Workaround | |||
| ---------- | |||
| None. | |||
| Rationale | |||
| --------- | |||
| Keeping the live build compatible with the latest compilers on all our | |||
| supported platforms is a very substantial maintenance burden, but very few | |||
| people are using this feature of the Projucer. Removing the live build will | |||
| simplify the code and our release process. | |||
| Change | |||
| ------ | |||
| `Component::createFocusTraverser()` has been renamed to | |||
| @@ -112,37 +112,6 @@ private: | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SimpleMeter) | |||
| }; | |||
| #if JUCE_PROJUCER_LIVE_BUILD | |||
| // Animate the meter in the Projucer live build. | |||
| struct MockSimpleMeter : public Component, | |||
| private Timer | |||
| { | |||
| MockSimpleMeter() | |||
| { | |||
| addAndMakeVisible (meter); | |||
| resized(); | |||
| startTimerHz (100); | |||
| } | |||
| void paint (Graphics&) override {} | |||
| void resized() override | |||
| { | |||
| meter.setBounds (getBounds()); | |||
| } | |||
| void timerCallback() override | |||
| { | |||
| meter.update (std::pow (randomNumberGenerator.nextFloat(), 2)); | |||
| } | |||
| SimpleMeter meter; | |||
| Random randomNumberGenerator; | |||
| }; | |||
| #endif | |||
| //============================================================================== | |||
| // A simple Inter-App Audio plug-in with a gain control and some meters. | |||
| class IAAEffectProcessor : public AudioProcessor | |||
| @@ -99,9 +99,6 @@ OBJECTS_APP := \ | |||
| $(JUCE_OBJDIR)/jucer_JucerDocument_ff8afcc2.o \ | |||
| $(JUCE_OBJDIR)/jucer_ObjectTypes_4406f01c.o \ | |||
| $(JUCE_OBJDIR)/jucer_PaintRoutine_e1e891ee.o \ | |||
| $(JUCE_OBJDIR)/jucer_CompileEngineClient_aee8c99c.o \ | |||
| $(JUCE_OBJDIR)/jucer_CompileEngineServer_5d8914.o \ | |||
| $(JUCE_OBJDIR)/jucer_DownloadCompileEngineThread_19bb4bb3.o \ | |||
| $(JUCE_OBJDIR)/jucer_Modules_e20cbd10.o \ | |||
| $(JUCE_OBJDIR)/jucer_HeaderComponent_1ebf72ba.o \ | |||
| $(JUCE_OBJDIR)/jucer_Project_c131864a.o \ | |||
| @@ -298,21 +295,6 @@ $(JUCE_OBJDIR)/jucer_PaintRoutine_e1e891ee.o: ../../Source/ComponentEditor/jucer | |||
| @echo "Compiling jucer_PaintRoutine.cpp" | |||
| $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" | |||
| $(JUCE_OBJDIR)/jucer_CompileEngineClient_aee8c99c.o: ../../Source/LiveBuildEngine/jucer_CompileEngineClient.cpp | |||
| -$(V_AT)mkdir -p $(JUCE_OBJDIR) | |||
| @echo "Compiling jucer_CompileEngineClient.cpp" | |||
| $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" | |||
| $(JUCE_OBJDIR)/jucer_CompileEngineServer_5d8914.o: ../../Source/LiveBuildEngine/jucer_CompileEngineServer.cpp | |||
| -$(V_AT)mkdir -p $(JUCE_OBJDIR) | |||
| @echo "Compiling jucer_CompileEngineServer.cpp" | |||
| $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" | |||
| $(JUCE_OBJDIR)/jucer_DownloadCompileEngineThread_19bb4bb3.o: ../../Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.cpp | |||
| -$(V_AT)mkdir -p $(JUCE_OBJDIR) | |||
| @echo "Compiling jucer_DownloadCompileEngineThread.cpp" | |||
| $(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<" | |||
| $(JUCE_OBJDIR)/jucer_Modules_e20cbd10.o: ../../Source/Project/Modules/jucer_Modules.cpp | |||
| -$(V_AT)mkdir -p $(JUCE_OBJDIR) | |||
| @echo "Compiling jucer_Modules.cpp" | |||
| @@ -53,7 +53,6 @@ | |||
| 71713DE4716DCEDB45A206E2 /* jucer_OpenDocumentManager.cpp */ = {isa = PBXBuildFile; fileRef = F9111E150CFF155329D44853; }; | |||
| 7D750EF5FCE1E1A461D435BE /* jucer_PaintElementPath.cpp */ = {isa = PBXBuildFile; fileRef = 4AE72953E3B3DF06D3B9BA86; }; | |||
| 83431B7234A78ECFB3C15F63 /* jucer_GeneratedCode.cpp */ = {isa = PBXBuildFile; fileRef = 78D0DBC4798FF040FDB90F6D; }; | |||
| 85E7FCB0516EFF853FA7B380 /* jucer_CompileEngineServer.cpp */ = {isa = PBXBuildFile; fileRef = D2FE76E4CF003856278343CC; }; | |||
| 89116B0BD882B51C63A84425 /* jucer_ResourceEditorPanel.cpp */ = {isa = PBXBuildFile; fileRef = 0EE17BE4154CF1B2EE683894; }; | |||
| 8B4A593B3869815BBAC3EF93 /* AudioUnit.framework */ = {isa = PBXBuildFile; fileRef = 7B3F7ECF6DBF8C8EE5C2CB86; }; | |||
| 8BE478303CDF061B72F219E2 /* jucer_CodeHelpers.cpp */ = {isa = PBXBuildFile; fileRef = F2E4998FB2C7221587A79F8B; }; | |||
| @@ -76,10 +75,8 @@ | |||
| C1B9334AE849F93FB3C56B34 /* AudioToolbox.framework */ = {isa = PBXBuildFile; fileRef = 5A75806B34E4EA6598A6024A; }; | |||
| C2A85091A28C907A4E1E1687 /* jucer_ComponentLayout.cpp */ = {isa = PBXBuildFile; fileRef = 133F1E428260C5ADDF496DF9; }; | |||
| C93569F47B4AC1A8E37992ED /* jucer_ObjectTypes.cpp */ = {isa = PBXBuildFile; fileRef = 9D7689451732AF8333402B3A; }; | |||
| CC6C4D351BA9B473E5F95791 /* jucer_DownloadCompileEngineThread.cpp */ = {isa = PBXBuildFile; fileRef = ADA538034910F52FDD2DC88D; }; | |||
| CDEF9FF2D119476D707305DF /* OpenGL.framework */ = {isa = PBXBuildFile; fileRef = 431D30038CBF67F80E8B3A13; }; | |||
| D0E26EB54B0087C8BE3D541E /* jucer_Icons.cpp */ = {isa = PBXBuildFile; fileRef = 846B2A670C5A19DE0039E11A; }; | |||
| D25EBE02B55DB244BE0D5635 /* jucer_CompileEngineClient.cpp */ = {isa = PBXBuildFile; fileRef = DE3E6B2614229FAD56D50770; }; | |||
| D5C9125F65493CA481F18E53 /* include_juce_cryptography.mm */ = {isa = PBXBuildFile; fileRef = D766BB9D8C32B5560F0493F3; }; | |||
| DD0FF38F7E8DE0220D73671D /* Foundation.framework */ = {isa = PBXBuildFile; fileRef = BF006EF584FB274FF0319E08; }; | |||
| EE26A1C2DAAB609362F407EA /* jucer_PaintElementGroup.cpp */ = {isa = PBXBuildFile; fileRef = 988F5C1E40DED02D8B064253; }; | |||
| @@ -101,7 +98,6 @@ | |||
| 0462692BAA9CD1BE6DFBCC33 /* include_juce_gui_basics.mm */ /* include_juce_gui_basics.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_gui_basics.mm; path = ../../JuceLibraryCode/include_juce_gui_basics.mm; sourceTree = SOURCE_ROOT; }; | |||
| 0543E83BF7D7D9234C396E82 /* jucer_ComponentUndoableAction.h */ /* jucer_ComponentUndoableAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ComponentUndoableAction.h; path = ../../Source/ComponentEditor/Components/jucer_ComponentUndoableAction.h; sourceTree = SOURCE_ROOT; }; | |||
| 055636565C2F512E40114582 /* jucer_ViewportHandler.h */ /* jucer_ViewportHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ViewportHandler.h; path = ../../Source/ComponentEditor/Components/jucer_ViewportHandler.h; sourceTree = SOURCE_ROOT; }; | |||
| 0640E34282A97BF73CC8F1EB /* jucer_ComponentListComponent.h */ /* jucer_ComponentListComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ComponentListComponent.h; path = ../../Source/LiveBuildEngine/UI/jucer_ComponentListComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 079802C6AEE7646010766FE8 /* jucer_AudioPluginFilterTemplate.cpp */ /* jucer_AudioPluginFilterTemplate.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_AudioPluginFilterTemplate.cpp; path = ../../Source/BinaryData/Templates/jucer_AudioPluginFilterTemplate.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 09DE066936CF037E9709ADB1 /* App */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Projucer.app; sourceTree = BUILT_PRODUCTS_DIR; }; | |||
| 0AE75B0ACD368A4C0FBC2CD0 /* jucer_TabbedComponentHandler.h */ /* jucer_TabbedComponentHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_TabbedComponentHandler.h; path = ../../Source/ComponentEditor/Components/jucer_TabbedComponentHandler.h; sourceTree = SOURCE_ROOT; }; | |||
| @@ -114,15 +110,12 @@ | |||
| 124232706D1C8A3CA49E70CD /* jucer_PIPCreatorWindowComponent.h */ /* jucer_PIPCreatorWindowComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_PIPCreatorWindowComponent.h; path = ../../Source/Application/Windows/jucer_PIPCreatorWindowComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 129F2DE0FEF154F8F8C7A74E /* gradle-wrapper.jar */ /* gradle-wrapper.jar */ = {isa = PBXFileReference; lastKnownFileType = file.jar; name = "gradle-wrapper.jar"; path = "../../Source/BinaryData/gradle/gradle-wrapper.jar"; sourceTree = SOURCE_ROOT; }; | |||
| 133F1E428260C5ADDF496DF9 /* jucer_ComponentLayout.cpp */ /* jucer_ComponentLayout.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_ComponentLayout.cpp; path = ../../Source/ComponentEditor/jucer_ComponentLayout.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 159DE1FEE2099398983CDDF0 /* jucer_ErrorList.h */ /* jucer_ErrorList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ErrorList.h; path = ../../Source/LiveBuildEngine/jucer_ErrorList.h; sourceTree = SOURCE_ROOT; }; | |||
| 16751E04B0F3737BDF52CEB4 /* jucer_HeaderComponent.h */ /* jucer_HeaderComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_HeaderComponent.h; path = ../../Source/Project/UI/jucer_HeaderComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 169DD91232C070C4D6470B31 /* jucer_IconButton.h */ /* jucer_IconButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_IconButton.h; path = ../../Source/Utility/UI/jucer_IconButton.h; sourceTree = SOURCE_ROOT; }; | |||
| 182CB1F96890620A202C6524 /* jucer_SourceCodeRange.h */ /* jucer_SourceCodeRange.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_SourceCodeRange.h; path = ../../Source/LiveBuildEngine/jucer_SourceCodeRange.h; sourceTree = SOURCE_ROOT; }; | |||
| 191330B20DAC08B890656EA0 /* jucer_PIPGenerator.cpp */ /* jucer_PIPGenerator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_PIPGenerator.cpp; path = ../../Source/Utility/PIPs/jucer_PIPGenerator.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 1B0F18E1D96F727C062B05FA /* jucer_ProjectContentComponent.cpp */ /* jucer_ProjectContentComponent.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_ProjectContentComponent.cpp; path = ../../Source/Project/UI/jucer_ProjectContentComponent.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 1B5BCD4899A9E295786EB642 /* jucer_OpenDocumentManager.h */ /* jucer_OpenDocumentManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_OpenDocumentManager.h; path = ../../Source/CodeEditor/jucer_OpenDocumentManager.h; sourceTree = SOURCE_ROOT; }; | |||
| 1B9B5A37F079FE3B3CF8FAB6 /* include_juce_graphics.mm */ /* include_juce_graphics.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_graphics.mm; path = ../../JuceLibraryCode/include_juce_graphics.mm; sourceTree = SOURCE_ROOT; }; | |||
| 1C80C7672975C1FF9AAC4A4F /* jucer_ProjectTab.h */ /* jucer_ProjectTab.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ProjectTab.h; path = ../../Source/Project/UI/Sidebar/jucer_ProjectTab.h; sourceTree = SOURCE_ROOT; }; | |||
| 1D7D2E563E8491643C9F2748 /* jucer_StartPageComponent.h */ /* jucer_StartPageComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_StartPageComponent.h; path = ../../Source/Application/StartPage/jucer_StartPageComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 1DCA18E935A35D29D2D9B6A0 /* jucer_ComponentDocument.cpp */ /* jucer_ComponentDocument.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_ComponentDocument.cpp; path = ../../Source/ComponentEditor/Documents/jucer_ComponentDocument.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 1DE5BBC777FB64798D823002 /* include_juce_data_structures.mm */ /* include_juce_data_structures.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_data_structures.mm; path = ../../JuceLibraryCode/include_juce_data_structures.mm; sourceTree = SOURCE_ROOT; }; | |||
| @@ -136,18 +129,15 @@ | |||
| 234251407CD1A499D8A816BB /* jucer_ValueWithDefaultWrapper.h */ /* jucer_ValueWithDefaultWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ValueWithDefaultWrapper.h; path = ../../Source/Utility/Helpers/jucer_ValueWithDefaultWrapper.h; sourceTree = SOURCE_ROOT; }; | |||
| 23A8DE16C0CDB8EED18B008B /* jucer_CommandIDs.h */ /* jucer_CommandIDs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_CommandIDs.h; path = ../../Source/Application/jucer_CommandIDs.h; sourceTree = SOURCE_ROOT; }; | |||
| 23D79A22569BEDF63B57DD36 /* jucer_CodeHelpers.h */ /* jucer_CodeHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_CodeHelpers.h; path = ../../Source/Utility/Helpers/jucer_CodeHelpers.h; sourceTree = SOURCE_ROOT; }; | |||
| 245C81599FB53865A74FC65B /* jucer_ActivityList.h */ /* jucer_ActivityList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ActivityList.h; path = ../../Source/LiveBuildEngine/jucer_ActivityList.h; sourceTree = SOURCE_ROOT; }; | |||
| 247768B490B9D759DDA79359 /* jucer_UserAvatarComponent.h */ /* jucer_UserAvatarComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_UserAvatarComponent.h; path = ../../Source/Project/UI/jucer_UserAvatarComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 24EB4C2412821B8019D6F754 /* jucer_TestComponent.cpp */ /* jucer_TestComponent.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_TestComponent.cpp; path = ../../Source/ComponentEditor/UI/jucer_TestComponent.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 25BE1265FE6C6EA3473A3A0A /* jucer_ResourceFile.h */ /* jucer_ResourceFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ResourceFile.h; path = ../../Source/ProjectSaving/jucer_ResourceFile.h; sourceTree = SOURCE_ROOT; }; | |||
| 269A454F1FF081DA67FFD578 /* jucer_JucerDocument.cpp */ /* jucer_JucerDocument.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_JucerDocument.cpp; path = ../../Source/ComponentEditor/jucer_JucerDocument.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 2BD9B4556479A8A41740BCAE /* jucer_ComponentTemplate.h */ /* jucer_ComponentTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ComponentTemplate.h; path = ../../Source/BinaryData/Templates/jucer_ComponentTemplate.h; sourceTree = SOURCE_ROOT; }; | |||
| 2CD34A70B4032C0426F7AA10 /* jucer_MainWindow.h */ /* jucer_MainWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_MainWindow.h; path = ../../Source/Application/jucer_MainWindow.h; sourceTree = SOURCE_ROOT; }; | |||
| 2DF5A61F3C497537634773DF /* jucer_ActivityListComponent.h */ /* jucer_ActivityListComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ActivityListComponent.h; path = ../../Source/LiveBuildEngine/UI/jucer_ActivityListComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 2EEB1C074162F363C6599282 /* jucer_CommandLine.h */ /* jucer_CommandLine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_CommandLine.h; path = ../../Source/Application/jucer_CommandLine.h; sourceTree = SOURCE_ROOT; }; | |||
| 2F0A7CA808B2FCCC9ED68992 /* jucer_LicenseQueryThread.h */ /* jucer_LicenseQueryThread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_LicenseQueryThread.h; path = ../../Source/Application/UserAccount/jucer_LicenseQueryThread.h; sourceTree = SOURCE_ROOT; }; | |||
| 2F373F97E30AC1A0BFC1FC61 /* jucer_FilePropertyComponent.h */ /* jucer_FilePropertyComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_FilePropertyComponent.h; path = ../../Source/ComponentEditor/Properties/jucer_FilePropertyComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 308084CBEE9F7D405D72A5E1 /* jucer_CompileEngineClient.h */ /* jucer_CompileEngineClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_CompileEngineClient.h; path = ../../Source/LiveBuildEngine/jucer_CompileEngineClient.h; sourceTree = SOURCE_ROOT; }; | |||
| 32C4B61AD995877956B7FA66 /* jucer_InlineComponentTemplate.h */ /* jucer_InlineComponentTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_InlineComponentTemplate.h; path = ../../Source/BinaryData/Templates/jucer_InlineComponentTemplate.h; sourceTree = SOURCE_ROOT; }; | |||
| 32ECBC08D903418CA0825870 /* jucer_ContentViewComponents.h */ /* jucer_ContentViewComponents.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ContentViewComponents.h; path = ../../Source/Project/UI/jucer_ContentViewComponents.h; sourceTree = SOURCE_ROOT; }; | |||
| 332AF94C3275FEA8B878D603 /* jucer_SourceCodeEditor.cpp */ /* jucer_SourceCodeEditor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_SourceCodeEditor.cpp; path = ../../Source/CodeEditor/jucer_SourceCodeEditor.cpp; sourceTree = SOURCE_ROOT; }; | |||
| @@ -159,10 +149,8 @@ | |||
| 364D1A9B113320407A7E57B9 /* JuceHeader.h */ /* JuceHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JuceHeader.h; path = ../../JuceLibraryCode/JuceHeader.h; sourceTree = SOURCE_ROOT; }; | |||
| 36E5FBF64A89D5F2A266A5A7 /* jucer_PaintElementUndoableAction.h */ /* jucer_PaintElementUndoableAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_PaintElementUndoableAction.h; path = ../../Source/ComponentEditor/PaintElements/jucer_PaintElementUndoableAction.h; sourceTree = SOURCE_ROOT; }; | |||
| 39597BD78897CB711AFA945A /* jucer_EditingPanelBase.h */ /* jucer_EditingPanelBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_EditingPanelBase.h; path = ../../Source/ComponentEditor/UI/jucer_EditingPanelBase.h; sourceTree = SOURCE_ROOT; }; | |||
| 3BBFA655E129C2D817EA47C9 /* jucer_ErrorListComponent.h */ /* jucer_ErrorListComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ErrorListComponent.h; path = ../../Source/LiveBuildEngine/UI/jucer_ErrorListComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 3D36F0CEB84B27BD02FC461A /* jucer_LabelPropertyComponent.h */ /* jucer_LabelPropertyComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_LabelPropertyComponent.h; path = ../../Source/Utility/UI/PropertyComponents/jucer_LabelPropertyComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 3D6FD9C0065BF16568EC0AB7 /* jucer_SlidingPanelComponent.h */ /* jucer_SlidingPanelComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_SlidingPanelComponent.h; path = ../../Source/Utility/UI/jucer_SlidingPanelComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 3EA27F52A254912218F4DE94 /* jucer_ProjectBuildInfo.h */ /* jucer_ProjectBuildInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ProjectBuildInfo.h; path = ../../Source/LiveBuildEngine/jucer_ProjectBuildInfo.h; sourceTree = SOURCE_ROOT; }; | |||
| 3F7C5B53347A487C7FBD2223 /* jucer_OpenGLComponentTemplate.h */ /* jucer_OpenGLComponentTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_OpenGLComponentTemplate.h; path = ../../Source/BinaryData/Templates/jucer_OpenGLComponentTemplate.h; sourceTree = SOURCE_ROOT; }; | |||
| 3F8EC008960DBEB2A5D3C3F4 /* jucer_Headers.h */ /* jucer_Headers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_Headers.h; path = ../../Source/Application/jucer_Headers.h; sourceTree = SOURCE_ROOT; }; | |||
| 3F9D4C7F6E5779D4E4AE655D /* jucer_ComponentLayout.h */ /* jucer_ComponentLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ComponentLayout.h; path = ../../Source/ComponentEditor/jucer_ComponentLayout.h; sourceTree = SOURCE_ROOT; }; | |||
| @@ -193,7 +181,6 @@ | |||
| 52E30AD23A8BE69D5766AF6D /* jucer_NewFileWizard.h */ /* jucer_NewFileWizard.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_NewFileWizard.h; path = ../../Source/Utility/Helpers/jucer_NewFileWizard.h; sourceTree = SOURCE_ROOT; }; | |||
| 5432B7B9B2CF2EAEC8B66D5C /* jucer_UtilityFunctions.h */ /* jucer_UtilityFunctions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_UtilityFunctions.h; path = ../../Source/ComponentEditor/jucer_UtilityFunctions.h; sourceTree = SOURCE_ROOT; }; | |||
| 5524B5C9FC6AEAA670B92AA9 /* jucer_ComponentLayoutEditor.h */ /* jucer_ComponentLayoutEditor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ComponentLayoutEditor.h; path = ../../Source/ComponentEditor/UI/jucer_ComponentLayoutEditor.h; sourceTree = SOURCE_ROOT; }; | |||
| 55DEDCEB35AA1FB54C74B375 /* jucer_MessageIDs.h */ /* jucer_MessageIDs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_MessageIDs.h; path = ../../Source/LiveBuildEngine/jucer_MessageIDs.h; sourceTree = SOURCE_ROOT; }; | |||
| 56177921580A4855917E0205 /* jucer_AudioPluginEditorTemplate.h */ /* jucer_AudioPluginEditorTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_AudioPluginEditorTemplate.h; path = ../../Source/BinaryData/Templates/jucer_AudioPluginEditorTemplate.h; sourceTree = SOURCE_ROOT; }; | |||
| 56749E4C72A8F51ACA8F2330 /* export_clion.svg */ /* export_clion.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; name = export_clion.svg; path = ../../Source/BinaryData/Icons/export_clion.svg; sourceTree = SOURCE_ROOT; }; | |||
| 576A92E1E0D8F453EC0FEB34 /* gradlew.bat */ /* gradlew.bat */ = {isa = PBXFileReference; lastKnownFileType = file.bat; name = gradlew.bat; path = ../../Source/BinaryData/gradle/gradlew.bat; sourceTree = SOURCE_ROOT; }; | |||
| @@ -215,7 +202,6 @@ | |||
| 65FAD7F6DF65A72B741C2913 /* jucer_PaintRoutinePanel.h */ /* jucer_PaintRoutinePanel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_PaintRoutinePanel.h; path = ../../Source/ComponentEditor/UI/jucer_PaintRoutinePanel.h; sourceTree = SOURCE_ROOT; }; | |||
| 6678E9B3EEACAD47F438B264 /* RecentFilesMenuTemplate.nib */ /* RecentFilesMenuTemplate.nib */ = {isa = PBXFileReference; lastKnownFileType = file.nib; name = RecentFilesMenuTemplate.nib; path = RecentFilesMenuTemplate.nib; sourceTree = SOURCE_ROOT; }; | |||
| 66B49F08C5EC3E4974825FF8 /* jucer_PaintRoutine.h */ /* jucer_PaintRoutine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_PaintRoutine.h; path = ../../Source/ComponentEditor/jucer_PaintRoutine.h; sourceTree = SOURCE_ROOT; }; | |||
| 68C1949F56295D5871C1F223 /* jucer_LiveBuildTab.h */ /* jucer_LiveBuildTab.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_LiveBuildTab.h; path = ../../Source/Project/UI/Sidebar/jucer_LiveBuildTab.h; sourceTree = SOURCE_ROOT; }; | |||
| 68F41A216E7454E7442AB1F4 /* jucer_TreeItemTypes.h */ /* jucer_TreeItemTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_TreeItemTypes.h; path = ../../Source/Project/UI/Sidebar/jucer_TreeItemTypes.h; sourceTree = SOURCE_ROOT; }; | |||
| 69555CEFC6ED613AA3949298 /* juce_data_structures */ /* juce_data_structures */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_data_structures; path = ../../../../modules/juce_data_structures; sourceTree = SOURCE_ROOT; }; | |||
| 69B478C992FA0B8C885946A6 /* export_linux.svg */ /* export_linux.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; name = export_linux.svg; path = ../../Source/BinaryData/Icons/export_linux.svg; sourceTree = SOURCE_ROOT; }; | |||
| @@ -248,7 +234,6 @@ | |||
| 85A5E3E71BED93B9A3E07681 /* jucer_PositionPropertyBase.h */ /* jucer_PositionPropertyBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_PositionPropertyBase.h; path = ../../Source/ComponentEditor/Properties/jucer_PositionPropertyBase.h; sourceTree = SOURCE_ROOT; }; | |||
| 861E52D9AFECADF079BB1F2C /* jucer_ExporterTreeItems.h */ /* jucer_ExporterTreeItems.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ExporterTreeItems.h; path = ../../Source/Project/UI/Sidebar/jucer_ExporterTreeItems.h; sourceTree = SOURCE_ROOT; }; | |||
| 868B459E02F0877EBE3D56F1 /* jucer_TextEditorHandler.h */ /* jucer_TextEditorHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_TextEditorHandler.h; path = ../../Source/ComponentEditor/Components/jucer_TextEditorHandler.h; sourceTree = SOURCE_ROOT; }; | |||
| 8A82061A978B03745485C3AC /* jucer_LiveBuildCodeEditor.h */ /* jucer_LiveBuildCodeEditor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_LiveBuildCodeEditor.h; path = ../../Source/CodeEditor/jucer_LiveBuildCodeEditor.h; sourceTree = SOURCE_ROOT; }; | |||
| 8C52A3DDA62A746AA7A68535 /* jucer_Main.cpp */ /* jucer_Main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_Main.cpp; path = ../../Source/Application/jucer_Main.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 8D178CAEE6D89DE33233313F /* jucer_ElementSiblingComponent.h */ /* jucer_ElementSiblingComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ElementSiblingComponent.h; path = ../../Source/ComponentEditor/PaintElements/jucer_ElementSiblingComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 8D9A9A373E4621F7CBFCCCEF /* jucer_ContentCompTemplate.cpp */ /* jucer_ContentCompTemplate.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_ContentCompTemplate.cpp; path = ../../Source/BinaryData/Templates/jucer_ContentCompTemplate.cpp; sourceTree = SOURCE_ROOT; }; | |||
| @@ -257,7 +242,6 @@ | |||
| 8F30A53C7FE4BC65171FB3E2 /* jucer_JucerDocument.h */ /* jucer_JucerDocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_JucerDocument.h; path = ../../Source/ComponentEditor/jucer_JucerDocument.h; sourceTree = SOURCE_ROOT; }; | |||
| 8F4D281E98808204E2846A7D /* export_xcode.svg */ /* export_xcode.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; name = export_xcode.svg; path = ../../Source/BinaryData/Icons/export_xcode.svg; sourceTree = SOURCE_ROOT; }; | |||
| 8F67F3C0492EAFEBDBBC12DB /* jucer_NewCppFileTemplate.cpp */ /* jucer_NewCppFileTemplate.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_NewCppFileTemplate.cpp; path = ../../Source/BinaryData/Templates/jucer_NewCppFileTemplate.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 8F685EFEFD6EE399058DE842 /* jucer_DownloadCompileEngineThread.h */ /* jucer_DownloadCompileEngineThread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_DownloadCompileEngineThread.h; path = ../../Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.h; sourceTree = SOURCE_ROOT; }; | |||
| 8F731F1F98BAB42F1C3B96AA /* jucer_ComponentTypeHandler.cpp */ /* jucer_ComponentTypeHandler.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_ComponentTypeHandler.cpp; path = ../../Source/ComponentEditor/Components/jucer_ComponentTypeHandler.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 8F7BE18698ADCEF51CDE4A5C /* CoreMIDI.framework */ /* CoreMIDI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; }; | |||
| 8FEF6F5EA676B824C021EB6F /* wizard_AnimatedApp.svg */ /* wizard_AnimatedApp.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; name = wizard_AnimatedApp.svg; path = ../../Source/BinaryData/Icons/wizard_AnimatedApp.svg; sourceTree = SOURCE_ROOT; }; | |||
| @@ -267,7 +251,6 @@ | |||
| 92A66A8BD87F98EB6B4FB6D0 /* jucer_ProjectContentComponent.h */ /* jucer_ProjectContentComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ProjectContentComponent.h; path = ../../Source/Project/UI/jucer_ProjectContentComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| 94146B40B41BF0AACF4359DD /* jucer_LicenseState.h */ /* jucer_LicenseState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_LicenseState.h; path = ../../Source/Application/UserAccount/jucer_LicenseState.h; sourceTree = SOURCE_ROOT; }; | |||
| 951128CA33CCDEF570436B1C /* Icon.icns */ /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = file.icns; name = Icon.icns; path = Icon.icns; sourceTree = SOURCE_ROOT; }; | |||
| 95EAB6EC9B724538B93910D4 /* jucer_TabComponents.h */ /* jucer_TabComponents.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_TabComponents.h; path = ../../Source/Project/UI/Sidebar/jucer_TabComponents.h; sourceTree = SOURCE_ROOT; }; | |||
| 983CFBA01CA8811F30FA7F4C /* jucer_MiscUtilities.h */ /* jucer_MiscUtilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_MiscUtilities.h; path = ../../Source/Utility/Helpers/jucer_MiscUtilities.h; sourceTree = SOURCE_ROOT; }; | |||
| 988F5C1E40DED02D8B064253 /* jucer_PaintElementGroup.cpp */ /* jucer_PaintElementGroup.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_PaintElementGroup.cpp; path = ../../Source/ComponentEditor/PaintElements/jucer_PaintElementGroup.cpp; sourceTree = SOURCE_ROOT; }; | |||
| 9914F905BFCFBE5F76619670 /* jucer_ColouredElement.h */ /* jucer_ColouredElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ColouredElement.h; path = ../../Source/ComponentEditor/PaintElements/jucer_ColouredElement.h; sourceTree = SOURCE_ROOT; }; | |||
| @@ -285,7 +268,6 @@ | |||
| 9F01BA9942D038EA8B5289A8 /* QTKit.framework */ /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = System/Library/Frameworks/QTKit.framework; sourceTree = SDKROOT; }; | |||
| 9F2D3E5FC10F7C3270908E97 /* jucer_ButtonDocument.h */ /* jucer_ButtonDocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ButtonDocument.h; path = ../../Source/ComponentEditor/Documents/jucer_ButtonDocument.h; sourceTree = SOURCE_ROOT; }; | |||
| 9F959ECF8CD9B7314AE604A9 /* jucer_LabelHandler.h */ /* jucer_LabelHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_LabelHandler.h; path = ../../Source/ComponentEditor/Components/jucer_LabelHandler.h; sourceTree = SOURCE_ROOT; }; | |||
| A081306A9E95CA114B81910F /* jucer_CompileEngineSettings.h */ /* jucer_CompileEngineSettings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_CompileEngineSettings.h; path = ../../Source/LiveBuildEngine/jucer_CompileEngineSettings.h; sourceTree = SOURCE_ROOT; }; | |||
| A0BBBFBA13A1308B3CD725D5 /* jucer_ComponentLayoutPanel.h */ /* jucer_ComponentLayoutPanel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ComponentLayoutPanel.h; path = ../../Source/ComponentEditor/UI/jucer_ComponentLayoutPanel.h; sourceTree = SOURCE_ROOT; }; | |||
| A0ECDAF137029C445910D3ED /* PIPAudioProcessor.cpp.in */ /* PIPAudioProcessor.cpp.in */ = {isa = PBXFileReference; lastKnownFileType = file.in; name = PIPAudioProcessor.cpp.in; path = ../../../Build/CMake/PIPAudioProcessor.cpp.in; sourceTree = SOURCE_ROOT; }; | |||
| A160AEF56553A658E6EA6A8E /* jucer_MainTemplate_Window.cpp */ /* jucer_MainTemplate_Window.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_MainTemplate_Window.cpp; path = ../../Source/BinaryData/Templates/jucer_MainTemplate_Window.cpp; sourceTree = SOURCE_ROOT; }; | |||
| @@ -293,16 +275,11 @@ | |||
| A49503B646A7BD2BEEFC5CBD /* jucer_HyperlinkButtonHandler.h */ /* jucer_HyperlinkButtonHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_HyperlinkButtonHandler.h; path = ../../Source/ComponentEditor/Components/jucer_HyperlinkButtonHandler.h; sourceTree = SOURCE_ROOT; }; | |||
| A509BC22854D50E4C786EB32 /* jucer_FileGroupInformationComponent.h */ /* jucer_FileGroupInformationComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_FileGroupInformationComponent.h; path = ../../Source/Project/UI/jucer_FileGroupInformationComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| A66F17E7472E5C19AFE98E46 /* jucer_MainConsoleAppTemplate.cpp */ /* jucer_MainConsoleAppTemplate.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_MainConsoleAppTemplate.cpp; path = ../../Source/BinaryData/Templates/jucer_MainConsoleAppTemplate.cpp; sourceTree = SOURCE_ROOT; }; | |||
| A978DFE87D9BB5EFE5B3DAAC /* jucer_CompileEngineDLL.h */ /* jucer_CompileEngineDLL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_CompileEngineDLL.h; path = ../../Source/LiveBuildEngine/jucer_CompileEngineDLL.h; sourceTree = SOURCE_ROOT; }; | |||
| A9954DC7F876A7006743ACB6 /* jucer_DiagnosticMessage.h */ /* jucer_DiagnosticMessage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_DiagnosticMessage.h; path = ../../Source/LiveBuildEngine/jucer_DiagnosticMessage.h; sourceTree = SOURCE_ROOT; }; | |||
| AA1C44E89D792DDC4867B2C8 /* juce_cryptography */ /* juce_cryptography */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_cryptography; path = ../../../../modules/juce_cryptography; sourceTree = SOURCE_ROOT; }; | |||
| AAF90697C0F171EFC3984A5D /* jucer_ContentComponents.h */ /* jucer_ContentComponents.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ContentComponents.h; path = ../../Source/Application/StartPage/jucer_ContentComponents.h; sourceTree = SOURCE_ROOT; }; | |||
| ADA538034910F52FDD2DC88D /* jucer_DownloadCompileEngineThread.cpp */ /* jucer_DownloadCompileEngineThread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_DownloadCompileEngineThread.cpp; path = ../../Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.cpp; sourceTree = SOURCE_ROOT; }; | |||
| ADD6A3CF5D7DE55E57E8E38B /* jucer_CppHelpers.h */ /* jucer_CppHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_CppHelpers.h; path = ../../Source/LiveBuildEngine/jucer_CppHelpers.h; sourceTree = SOURCE_ROOT; }; | |||
| AECE3914F5119A3D586A5635 /* include_juce_gui_extra.mm */ /* include_juce_gui_extra.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_gui_extra.mm; path = ../../JuceLibraryCode/include_juce_gui_extra.mm; sourceTree = SOURCE_ROOT; }; | |||
| AEFE3BA0C31EC78A5767A10E /* wizard_DLL.svg */ /* wizard_DLL.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; name = wizard_DLL.svg; path = ../../Source/BinaryData/Icons/wizard_DLL.svg; sourceTree = SOURCE_ROOT; }; | |||
| B1C2F8ED14BF914CD1882708 /* wizard_Openfile.svg */ /* wizard_Openfile.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; name = wizard_Openfile.svg; path = ../../Source/BinaryData/Icons/wizard_Openfile.svg; sourceTree = SOURCE_ROOT; }; | |||
| B24E3F34C3C4EE54A60C35CC /* jucer_LiveCodeBuilderDLL.h */ /* jucer_LiveCodeBuilderDLL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_LiveCodeBuilderDLL.h; path = ../../Source/LiveBuildEngine/jucer_LiveCodeBuilderDLL.h; sourceTree = SOURCE_ROOT; }; | |||
| B2CB95B3F44C3CC5735051A3 /* jucer_JustificationProperty.h */ /* jucer_JustificationProperty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_JustificationProperty.h; path = ../../Source/ComponentEditor/Properties/jucer_JustificationProperty.h; sourceTree = SOURCE_ROOT; }; | |||
| B3528C08B84CBC950252EA69 /* jucer_ModulesInformationComponent.h */ /* jucer_ModulesInformationComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ModulesInformationComponent.h; path = ../../Source/Project/UI/jucer_ModulesInformationComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| B403AF75EAF361ED74EE476E /* jucer_FileHelpers.cpp */ /* jucer_FileHelpers.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_FileHelpers.cpp; path = ../../Source/Utility/Helpers/jucer_FileHelpers.cpp; sourceTree = SOURCE_ROOT; }; | |||
| @@ -312,7 +289,6 @@ | |||
| B97D60D2531CFD0D8555BA5C /* jucer_PaintElementText.h */ /* jucer_PaintElementText.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_PaintElementText.h; path = ../../Source/ComponentEditor/PaintElements/jucer_PaintElementText.h; sourceTree = SOURCE_ROOT; }; | |||
| B9B130F596953116393138DC /* jucer_SourceCodeEditor.h */ /* jucer_SourceCodeEditor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_SourceCodeEditor.h; path = ../../Source/CodeEditor/jucer_SourceCodeEditor.h; sourceTree = SOURCE_ROOT; }; | |||
| BA159A3B7D129771F5C15EA3 /* juce_core */ /* juce_core */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_core; path = ../../../../modules/juce_core; sourceTree = SOURCE_ROOT; }; | |||
| BA186B51EE4884CD8E3F2741 /* jucer_CompileEngineServer.h */ /* jucer_CompileEngineServer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_CompileEngineServer.h; path = ../../Source/LiveBuildEngine/jucer_CompileEngineServer.h; sourceTree = SOURCE_ROOT; }; | |||
| BAC43B20E14A340CCF14119C /* jucer_Project.cpp */ /* jucer_Project.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_Project.cpp; path = ../../Source/Project/jucer_Project.cpp; sourceTree = SOURCE_ROOT; }; | |||
| BC3B310D42C489E8B8D93327 /* jucer_DocumentEditorComponent.cpp */ /* jucer_DocumentEditorComponent.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_DocumentEditorComponent.cpp; path = ../../Source/CodeEditor/jucer_DocumentEditorComponent.cpp; sourceTree = SOURCE_ROOT; }; | |||
| BC623CC67AC58297BF6B4C70 /* jucer_TestComponent.h */ /* jucer_TestComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_TestComponent.h; path = ../../Source/ComponentEditor/UI/jucer_TestComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| @@ -336,7 +312,6 @@ | |||
| C76271530EB4458B6146D463 /* jucer_PIPGenerator.h */ /* jucer_PIPGenerator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_PIPGenerator.h; path = ../../Source/Utility/PIPs/jucer_PIPGenerator.h; sourceTree = SOURCE_ROOT; }; | |||
| CC1C5F8E5DE34223FEC59673 /* jucer_AudioPluginFilterTemplate.h */ /* jucer_AudioPluginFilterTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_AudioPluginFilterTemplate.h; path = ../../Source/BinaryData/Templates/jucer_AudioPluginFilterTemplate.h; sourceTree = SOURCE_ROOT; }; | |||
| CCD62DB0A19A985A4B9D7F32 /* jucer_ProjectExport_Android.h */ /* jucer_ProjectExport_Android.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ProjectExport_Android.h; path = ../../Source/ProjectSaving/jucer_ProjectExport_Android.h; sourceTree = SOURCE_ROOT; }; | |||
| CCEA34A55813C7C4E58254F5 /* jucer_BuildTabStatusComponent.h */ /* jucer_BuildTabStatusComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_BuildTabStatusComponent.h; path = ../../Source/LiveBuildEngine/UI/jucer_BuildTabStatusComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| CD267A28C16C4E79EB749005 /* gpl_logo.svg */ /* gpl_logo.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; name = gpl_logo.svg; path = ../../Source/BinaryData/Icons/gpl_logo.svg; sourceTree = SOURCE_ROOT; }; | |||
| CF6C8BD0DA3D8CD4E99EBADA /* WebKit.framework */ /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; | |||
| D00F311BFC3C2625C457CB9B /* Carbon.framework */ /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; | |||
| @@ -344,8 +319,6 @@ | |||
| D05BD91B6105827B010E1C20 /* juce_gui_extra */ /* juce_gui_extra */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_gui_extra; path = ../../../../modules/juce_gui_extra; sourceTree = SOURCE_ROOT; }; | |||
| D1739728A79A2062418B8EF0 /* wizard_StaticLibrary.svg */ /* wizard_StaticLibrary.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; name = wizard_StaticLibrary.svg; path = ../../Source/BinaryData/Icons/wizard_StaticLibrary.svg; sourceTree = SOURCE_ROOT; }; | |||
| D1F9B0E9F5D54FE48BEB46EA /* Cocoa.framework */ /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; | |||
| D251114072E67CA86D9913D6 /* jucer_ClassDatabase.h */ /* jucer_ClassDatabase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ClassDatabase.h; path = ../../Source/LiveBuildEngine/jucer_ClassDatabase.h; sourceTree = SOURCE_ROOT; }; | |||
| D2FE76E4CF003856278343CC /* jucer_CompileEngineServer.cpp */ /* jucer_CompileEngineServer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_CompileEngineServer.cpp; path = ../../Source/LiveBuildEngine/jucer_CompileEngineServer.cpp; sourceTree = SOURCE_ROOT; }; | |||
| D4EB334E5186D1584EC63CA4 /* jucer_AudioComponentSimpleTemplate.h */ /* jucer_AudioComponentSimpleTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_AudioComponentSimpleTemplate.h; path = ../../Source/BinaryData/Templates/jucer_AudioComponentSimpleTemplate.h; sourceTree = SOURCE_ROOT; }; | |||
| D5795F8CAC5876714DAB355F /* jucer_AnimatedComponentTemplate.h */ /* jucer_AnimatedComponentTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_AnimatedComponentTemplate.h; path = ../../Source/BinaryData/Templates/jucer_AnimatedComponentTemplate.h; sourceTree = SOURCE_ROOT; }; | |||
| D5EF5961B1F0E3FAED32E30A /* jucer_ProjectExport_CLion.h */ /* jucer_ProjectExport_CLion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ProjectExport_CLion.h; path = ../../Source/ProjectSaving/jucer_ProjectExport_CLion.h; sourceTree = SOURCE_ROOT; }; | |||
| @@ -357,12 +330,10 @@ | |||
| DA4D0CC5149F7C0FBDAF34A2 /* jucer_PaintElementPath.h */ /* jucer_PaintElementPath.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_PaintElementPath.h; path = ../../Source/ComponentEditor/PaintElements/jucer_PaintElementPath.h; sourceTree = SOURCE_ROOT; }; | |||
| DB9C8E35DF815B803CB4A9CF /* include_juce_core.mm */ /* include_juce_core.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_core.mm; path = ../../JuceLibraryCode/include_juce_core.mm; sourceTree = SOURCE_ROOT; }; | |||
| DDC382008FFD9F9E0B2B0EDD /* jucer_SVGPathDataWindowComponent.h */ /* jucer_SVGPathDataWindowComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_SVGPathDataWindowComponent.h; path = ../../Source/Application/Windows/jucer_SVGPathDataWindowComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| DE3E6B2614229FAD56D50770 /* jucer_CompileEngineClient.cpp */ /* jucer_CompileEngineClient.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_CompileEngineClient.cpp; path = ../../Source/LiveBuildEngine/jucer_CompileEngineClient.cpp; sourceTree = SOURCE_ROOT; }; | |||
| DE4A987B2D5529990A6AA9D4 /* jucer_AboutWindowComponent.h */ /* jucer_AboutWindowComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_AboutWindowComponent.h; path = ../../Source/Application/Windows/jucer_AboutWindowComponent.h; sourceTree = SOURCE_ROOT; }; | |||
| DFBEB8E086832AEB0FBEADF0 /* jucer_StoredSettings.h */ /* jucer_StoredSettings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_StoredSettings.h; path = ../../Source/Settings/jucer_StoredSettings.h; sourceTree = SOURCE_ROOT; }; | |||
| E111A336FE13C033EAA0A1D1 /* jucer_NewCppFileTemplate.h */ /* jucer_NewCppFileTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_NewCppFileTemplate.h; path = ../../Source/BinaryData/Templates/jucer_NewCppFileTemplate.h; sourceTree = SOURCE_ROOT; }; | |||
| E13A54A6D3A1895EACE53E51 /* jucer_ResourceFile.cpp */ /* jucer_ResourceFile.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_ResourceFile.cpp; path = ../../Source/ProjectSaving/jucer_ResourceFile.cpp; sourceTree = SOURCE_ROOT; }; | |||
| E1535CDF4258E7D4AB70B5E5 /* jucer_ClientServerMessages.h */ /* jucer_ClientServerMessages.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ClientServerMessages.h; path = ../../Source/LiveBuildEngine/jucer_ClientServerMessages.h; sourceTree = SOURCE_ROOT; }; | |||
| E1577F8617C75B91D7399812 /* jucer_ImageButtonHandler.h */ /* jucer_ImageButtonHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_ImageButtonHandler.h; path = ../../Source/ComponentEditor/Components/jucer_ImageButtonHandler.h; sourceTree = SOURCE_ROOT; }; | |||
| E186BC01A1B1529937A46485 /* jucer_FileHelpers.h */ /* jucer_FileHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = jucer_FileHelpers.h; path = ../../Source/Utility/Helpers/jucer_FileHelpers.h; sourceTree = SOURCE_ROOT; }; | |||
| E266DE67FF319D56F63193A6 /* Info-App.plist */ /* Info-App.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-App.plist"; path = "Info-App.plist"; sourceTree = SOURCE_ROOT; }; | |||
| @@ -525,42 +496,13 @@ | |||
| name = Documents; | |||
| sourceTree = "<group>"; | |||
| }; | |||
| 20B39D53B7DAAB53C7533532 /* LiveBuildEngine */ = { | |||
| isa = PBXGroup; | |||
| children = ( | |||
| 9014CA5F3B8D23E883D6975E, | |||
| 245C81599FB53865A74FC65B, | |||
| D251114072E67CA86D9913D6, | |||
| E1535CDF4258E7D4AB70B5E5, | |||
| DE3E6B2614229FAD56D50770, | |||
| 308084CBEE9F7D405D72A5E1, | |||
| A978DFE87D9BB5EFE5B3DAAC, | |||
| D2FE76E4CF003856278343CC, | |||
| BA186B51EE4884CD8E3F2741, | |||
| A081306A9E95CA114B81910F, | |||
| ADD6A3CF5D7DE55E57E8E38B, | |||
| A9954DC7F876A7006743ACB6, | |||
| ADA538034910F52FDD2DC88D, | |||
| 8F685EFEFD6EE399058DE842, | |||
| 159DE1FEE2099398983CDDF0, | |||
| B24E3F34C3C4EE54A60C35CC, | |||
| 55DEDCEB35AA1FB54C74B375, | |||
| 3EA27F52A254912218F4DE94, | |||
| 182CB1F96890620A202C6524, | |||
| ); | |||
| name = LiveBuildEngine; | |||
| sourceTree = "<group>"; | |||
| }; | |||
| 236D186F5A6536C59D6E751C /* Sidebar */ = { | |||
| isa = PBXGroup; | |||
| children = ( | |||
| 861E52D9AFECADF079BB1F2C, | |||
| 4974E7808F9B57E9A627F878, | |||
| 68C1949F56295D5871C1F223, | |||
| 5E4EB84A7983AB31366A3490, | |||
| 1C80C7672975C1FF9AAC4A4F, | |||
| E3BADF21095BC23DE2CB454F, | |||
| 95EAB6EC9B724538B93910D4, | |||
| 68F41A216E7454E7442AB1F4, | |||
| ); | |||
| name = Sidebar; | |||
| @@ -775,17 +717,6 @@ | |||
| name = "JUCE Modules"; | |||
| sourceTree = "<group>"; | |||
| }; | |||
| 9014CA5F3B8D23E883D6975E /* UI */ = { | |||
| isa = PBXGroup; | |||
| children = ( | |||
| 2DF5A61F3C497537634773DF, | |||
| CCEA34A55813C7C4E58254F5, | |||
| 0640E34282A97BF73CC8F1EB, | |||
| 3BBFA655E129C2D817EA47C9, | |||
| ); | |||
| name = UI; | |||
| sourceTree = "<group>"; | |||
| }; | |||
| 92ABB8016546F41128399E9D /* Products */ = { | |||
| isa = PBXGroup; | |||
| children = ( | |||
| @@ -906,7 +837,6 @@ | |||
| DC3A4B0AD79334BA8A7E0661, | |||
| F1B44F007A02A0FAE4DC8D79, | |||
| F6BD840F9A06F2DA891E2CB8, | |||
| 20B39D53B7DAAB53C7533532, | |||
| 89E9055A179B4C2019B4E1AE, | |||
| 4DCC5D64BBE8DE85360A3D57, | |||
| EC535A977A1A114BC5DAE7B3, | |||
| @@ -1000,7 +930,6 @@ | |||
| BC3B310D42C489E8B8D93327, | |||
| 51BC758EF5D33197CF543E67, | |||
| 35CAE8930F2885F9322D22D5, | |||
| 8A82061A978B03745485C3AC, | |||
| F9111E150CFF155329D44853, | |||
| 1B5BCD4899A9E295786EB642, | |||
| 332AF94C3275FEA8B878D603, | |||
| @@ -1151,9 +1080,6 @@ | |||
| 209FCCC2155A1FCB7E11E20D, | |||
| C93569F47B4AC1A8E37992ED, | |||
| 1B988E139004D8E2850EB656, | |||
| D25EBE02B55DB244BE0D5635, | |||
| 85E7FCB0516EFF853FA7B380, | |||
| CC6C4D351BA9B473E5F95791, | |||
| 0E783907C6214ADD59EC95DC, | |||
| 05A08E366EBF8D650974E695, | |||
| 30B921C38DCEE787B294B746, | |||
| @@ -213,9 +213,6 @@ | |||
| <ClCompile Include="..\..\Source\ComponentEditor\jucer_JucerDocument.cpp"/> | |||
| <ClCompile Include="..\..\Source\ComponentEditor\jucer_ObjectTypes.cpp"/> | |||
| <ClCompile Include="..\..\Source\ComponentEditor\jucer_PaintRoutine.cpp"/> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineClient.cpp"/> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineServer.cpp"/> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_DownloadCompileEngineThread.cpp"/> | |||
| <ClCompile Include="..\..\Source\Project\Modules\jucer_Modules.cpp"/> | |||
| <ClCompile Include="..\..\Source\Project\UI\jucer_HeaderComponent.cpp"/> | |||
| <ClCompile Include="..\..\Source\Project\UI\jucer_ProjectContentComponent.cpp"> | |||
| @@ -1547,7 +1544,6 @@ | |||
| <ClInclude Include="..\..\Source\BinaryData\Templates\jucer_PIPTemplate.h"/> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_DocumentEditorComponent.h"/> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_ItemPreviewComponent.h"/> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_LiveBuildCodeEditor.h"/> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_OpenDocumentManager.h"/> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_SourceCodeEditor.h"/> | |||
| <ClInclude Include="..\..\Source\ComponentEditor\Components\jucer_ButtonHandler.h"/> | |||
| @@ -1614,35 +1610,13 @@ | |||
| <ClInclude Include="..\..\Source\ComponentEditor\jucer_ObjectTypes.h"/> | |||
| <ClInclude Include="..\..\Source\ComponentEditor\jucer_PaintRoutine.h"/> | |||
| <ClInclude Include="..\..\Source\ComponentEditor\jucer_UtilityFunctions.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ActivityListComponent.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_BuildTabStatusComponent.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ComponentListComponent.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ErrorListComponent.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ActivityList.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ClassDatabase.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ClientServerMessages.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineClient.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineDLL.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineServer.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineSettings.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CppHelpers.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_DiagnosticMessage.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_DownloadCompileEngineThread.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ErrorList.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_LiveCodeBuilderDLL.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_MessageIDs.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ProjectBuildInfo.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_SourceCodeRange.h"/> | |||
| <ClInclude Include="..\..\Source\Project\Modules\jucer_AvailableModulesList.h"/> | |||
| <ClInclude Include="..\..\Source\Project\Modules\jucer_ModuleDescription.h"/> | |||
| <ClInclude Include="..\..\Source\Project\Modules\jucer_Modules.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ExporterTreeItems.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_FileTreeItems.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_LiveBuildTab.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ModuleTreeItems.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ProjectTab.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ProjectTreeItemBase.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_TabComponents.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_TreeItemTypes.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\jucer_ContentViewComponents.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\jucer_FileGroupInformationComponent.h"/> | |||
| @@ -47,12 +47,6 @@ | |||
| <Filter Include="Projucer\ComponentEditor"> | |||
| <UniqueIdentifier>{5F21E507-E5E8-0A74-F1AE-874BB67C26CC}</UniqueIdentifier> | |||
| </Filter> | |||
| <Filter Include="Projucer\LiveBuildEngine\UI"> | |||
| <UniqueIdentifier>{E880260F-D9FB-64B6-244B-6F06B70FE9EE}</UniqueIdentifier> | |||
| </Filter> | |||
| <Filter Include="Projucer\LiveBuildEngine"> | |||
| <UniqueIdentifier>{0A3B9446-F50B-3D4E-230F-7ED493541A07}</UniqueIdentifier> | |||
| </Filter> | |||
| <Filter Include="Projucer\Project\Modules"> | |||
| <UniqueIdentifier>{F5C79836-30DE-9DC7-9392-DAAB3F04C18E}</UniqueIdentifier> | |||
| </Filter> | |||
| @@ -466,15 +460,6 @@ | |||
| <ClCompile Include="..\..\Source\ComponentEditor\jucer_PaintRoutine.cpp"> | |||
| <Filter>Projucer\ComponentEditor</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineClient.cpp"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineServer.cpp"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_DownloadCompileEngineThread.cpp"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\Source\Project\Modules\jucer_Modules.cpp"> | |||
| <Filter>Projucer\Project\Modules</Filter> | |||
| </ClCompile> | |||
| @@ -2031,9 +2016,6 @@ | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_ItemPreviewComponent.h"> | |||
| <Filter>Projucer\CodeEditor</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_LiveBuildCodeEditor.h"> | |||
| <Filter>Projucer\CodeEditor</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_OpenDocumentManager.h"> | |||
| <Filter>Projucer\CodeEditor</Filter> | |||
| </ClInclude> | |||
| @@ -2232,63 +2214,6 @@ | |||
| <ClInclude Include="..\..\Source\ComponentEditor\jucer_UtilityFunctions.h"> | |||
| <Filter>Projucer\ComponentEditor</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ActivityListComponent.h"> | |||
| <Filter>Projucer\LiveBuildEngine\UI</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_BuildTabStatusComponent.h"> | |||
| <Filter>Projucer\LiveBuildEngine\UI</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ComponentListComponent.h"> | |||
| <Filter>Projucer\LiveBuildEngine\UI</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ErrorListComponent.h"> | |||
| <Filter>Projucer\LiveBuildEngine\UI</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ActivityList.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ClassDatabase.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ClientServerMessages.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineClient.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineDLL.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineServer.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineSettings.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CppHelpers.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_DiagnosticMessage.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_DownloadCompileEngineThread.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ErrorList.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_LiveCodeBuilderDLL.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_MessageIDs.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ProjectBuildInfo.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_SourceCodeRange.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\Modules\jucer_AvailableModulesList.h"> | |||
| <Filter>Projucer\Project\Modules</Filter> | |||
| </ClInclude> | |||
| @@ -2304,21 +2229,12 @@ | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_FileTreeItems.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_LiveBuildTab.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ModuleTreeItems.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ProjectTab.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ProjectTreeItemBase.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_TabComponents.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_TreeItemTypes.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| @@ -213,9 +213,6 @@ | |||
| <ClCompile Include="..\..\Source\ComponentEditor\jucer_JucerDocument.cpp"/> | |||
| <ClCompile Include="..\..\Source\ComponentEditor\jucer_ObjectTypes.cpp"/> | |||
| <ClCompile Include="..\..\Source\ComponentEditor\jucer_PaintRoutine.cpp"/> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineClient.cpp"/> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineServer.cpp"/> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_DownloadCompileEngineThread.cpp"/> | |||
| <ClCompile Include="..\..\Source\Project\Modules\jucer_Modules.cpp"/> | |||
| <ClCompile Include="..\..\Source\Project\UI\jucer_HeaderComponent.cpp"/> | |||
| <ClCompile Include="..\..\Source\Project\UI\jucer_ProjectContentComponent.cpp"> | |||
| @@ -1547,7 +1544,6 @@ | |||
| <ClInclude Include="..\..\Source\BinaryData\Templates\jucer_PIPTemplate.h"/> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_DocumentEditorComponent.h"/> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_ItemPreviewComponent.h"/> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_LiveBuildCodeEditor.h"/> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_OpenDocumentManager.h"/> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_SourceCodeEditor.h"/> | |||
| <ClInclude Include="..\..\Source\ComponentEditor\Components\jucer_ButtonHandler.h"/> | |||
| @@ -1614,35 +1610,13 @@ | |||
| <ClInclude Include="..\..\Source\ComponentEditor\jucer_ObjectTypes.h"/> | |||
| <ClInclude Include="..\..\Source\ComponentEditor\jucer_PaintRoutine.h"/> | |||
| <ClInclude Include="..\..\Source\ComponentEditor\jucer_UtilityFunctions.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ActivityListComponent.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_BuildTabStatusComponent.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ComponentListComponent.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ErrorListComponent.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ActivityList.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ClassDatabase.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ClientServerMessages.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineClient.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineDLL.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineServer.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineSettings.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CppHelpers.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_DiagnosticMessage.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_DownloadCompileEngineThread.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ErrorList.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_LiveCodeBuilderDLL.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_MessageIDs.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ProjectBuildInfo.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_SourceCodeRange.h"/> | |||
| <ClInclude Include="..\..\Source\Project\Modules\jucer_AvailableModulesList.h"/> | |||
| <ClInclude Include="..\..\Source\Project\Modules\jucer_ModuleDescription.h"/> | |||
| <ClInclude Include="..\..\Source\Project\Modules\jucer_Modules.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ExporterTreeItems.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_FileTreeItems.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_LiveBuildTab.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ModuleTreeItems.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ProjectTab.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ProjectTreeItemBase.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_TabComponents.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_TreeItemTypes.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\jucer_ContentViewComponents.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\jucer_FileGroupInformationComponent.h"/> | |||
| @@ -47,12 +47,6 @@ | |||
| <Filter Include="Projucer\ComponentEditor"> | |||
| <UniqueIdentifier>{5F21E507-E5E8-0A74-F1AE-874BB67C26CC}</UniqueIdentifier> | |||
| </Filter> | |||
| <Filter Include="Projucer\LiveBuildEngine\UI"> | |||
| <UniqueIdentifier>{E880260F-D9FB-64B6-244B-6F06B70FE9EE}</UniqueIdentifier> | |||
| </Filter> | |||
| <Filter Include="Projucer\LiveBuildEngine"> | |||
| <UniqueIdentifier>{0A3B9446-F50B-3D4E-230F-7ED493541A07}</UniqueIdentifier> | |||
| </Filter> | |||
| <Filter Include="Projucer\Project\Modules"> | |||
| <UniqueIdentifier>{F5C79836-30DE-9DC7-9392-DAAB3F04C18E}</UniqueIdentifier> | |||
| </Filter> | |||
| @@ -466,15 +460,6 @@ | |||
| <ClCompile Include="..\..\Source\ComponentEditor\jucer_PaintRoutine.cpp"> | |||
| <Filter>Projucer\ComponentEditor</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineClient.cpp"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineServer.cpp"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_DownloadCompileEngineThread.cpp"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\Source\Project\Modules\jucer_Modules.cpp"> | |||
| <Filter>Projucer\Project\Modules</Filter> | |||
| </ClCompile> | |||
| @@ -2031,9 +2016,6 @@ | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_ItemPreviewComponent.h"> | |||
| <Filter>Projucer\CodeEditor</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_LiveBuildCodeEditor.h"> | |||
| <Filter>Projucer\CodeEditor</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_OpenDocumentManager.h"> | |||
| <Filter>Projucer\CodeEditor</Filter> | |||
| </ClInclude> | |||
| @@ -2232,63 +2214,6 @@ | |||
| <ClInclude Include="..\..\Source\ComponentEditor\jucer_UtilityFunctions.h"> | |||
| <Filter>Projucer\ComponentEditor</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ActivityListComponent.h"> | |||
| <Filter>Projucer\LiveBuildEngine\UI</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_BuildTabStatusComponent.h"> | |||
| <Filter>Projucer\LiveBuildEngine\UI</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ComponentListComponent.h"> | |||
| <Filter>Projucer\LiveBuildEngine\UI</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ErrorListComponent.h"> | |||
| <Filter>Projucer\LiveBuildEngine\UI</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ActivityList.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ClassDatabase.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ClientServerMessages.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineClient.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineDLL.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineServer.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineSettings.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CppHelpers.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_DiagnosticMessage.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_DownloadCompileEngineThread.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ErrorList.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_LiveCodeBuilderDLL.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_MessageIDs.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ProjectBuildInfo.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_SourceCodeRange.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\Modules\jucer_AvailableModulesList.h"> | |||
| <Filter>Projucer\Project\Modules</Filter> | |||
| </ClInclude> | |||
| @@ -2304,21 +2229,12 @@ | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_FileTreeItems.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_LiveBuildTab.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ModuleTreeItems.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ProjectTab.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ProjectTreeItemBase.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_TabComponents.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_TreeItemTypes.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| @@ -213,9 +213,6 @@ | |||
| <ClCompile Include="..\..\Source\ComponentEditor\jucer_JucerDocument.cpp"/> | |||
| <ClCompile Include="..\..\Source\ComponentEditor\jucer_ObjectTypes.cpp"/> | |||
| <ClCompile Include="..\..\Source\ComponentEditor\jucer_PaintRoutine.cpp"/> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineClient.cpp"/> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineServer.cpp"/> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_DownloadCompileEngineThread.cpp"/> | |||
| <ClCompile Include="..\..\Source\Project\Modules\jucer_Modules.cpp"/> | |||
| <ClCompile Include="..\..\Source\Project\UI\jucer_HeaderComponent.cpp"/> | |||
| <ClCompile Include="..\..\Source\Project\UI\jucer_ProjectContentComponent.cpp"> | |||
| @@ -1547,7 +1544,6 @@ | |||
| <ClInclude Include="..\..\Source\BinaryData\Templates\jucer_PIPTemplate.h"/> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_DocumentEditorComponent.h"/> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_ItemPreviewComponent.h"/> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_LiveBuildCodeEditor.h"/> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_OpenDocumentManager.h"/> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_SourceCodeEditor.h"/> | |||
| <ClInclude Include="..\..\Source\ComponentEditor\Components\jucer_ButtonHandler.h"/> | |||
| @@ -1614,35 +1610,13 @@ | |||
| <ClInclude Include="..\..\Source\ComponentEditor\jucer_ObjectTypes.h"/> | |||
| <ClInclude Include="..\..\Source\ComponentEditor\jucer_PaintRoutine.h"/> | |||
| <ClInclude Include="..\..\Source\ComponentEditor\jucer_UtilityFunctions.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ActivityListComponent.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_BuildTabStatusComponent.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ComponentListComponent.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ErrorListComponent.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ActivityList.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ClassDatabase.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ClientServerMessages.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineClient.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineDLL.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineServer.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineSettings.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CppHelpers.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_DiagnosticMessage.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_DownloadCompileEngineThread.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ErrorList.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_LiveCodeBuilderDLL.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_MessageIDs.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ProjectBuildInfo.h"/> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_SourceCodeRange.h"/> | |||
| <ClInclude Include="..\..\Source\Project\Modules\jucer_AvailableModulesList.h"/> | |||
| <ClInclude Include="..\..\Source\Project\Modules\jucer_ModuleDescription.h"/> | |||
| <ClInclude Include="..\..\Source\Project\Modules\jucer_Modules.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ExporterTreeItems.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_FileTreeItems.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_LiveBuildTab.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ModuleTreeItems.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ProjectTab.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ProjectTreeItemBase.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_TabComponents.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_TreeItemTypes.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\jucer_ContentViewComponents.h"/> | |||
| <ClInclude Include="..\..\Source\Project\UI\jucer_FileGroupInformationComponent.h"/> | |||
| @@ -47,12 +47,6 @@ | |||
| <Filter Include="Projucer\ComponentEditor"> | |||
| <UniqueIdentifier>{5F21E507-E5E8-0A74-F1AE-874BB67C26CC}</UniqueIdentifier> | |||
| </Filter> | |||
| <Filter Include="Projucer\LiveBuildEngine\UI"> | |||
| <UniqueIdentifier>{E880260F-D9FB-64B6-244B-6F06B70FE9EE}</UniqueIdentifier> | |||
| </Filter> | |||
| <Filter Include="Projucer\LiveBuildEngine"> | |||
| <UniqueIdentifier>{0A3B9446-F50B-3D4E-230F-7ED493541A07}</UniqueIdentifier> | |||
| </Filter> | |||
| <Filter Include="Projucer\Project\Modules"> | |||
| <UniqueIdentifier>{F5C79836-30DE-9DC7-9392-DAAB3F04C18E}</UniqueIdentifier> | |||
| </Filter> | |||
| @@ -466,15 +460,6 @@ | |||
| <ClCompile Include="..\..\Source\ComponentEditor\jucer_PaintRoutine.cpp"> | |||
| <Filter>Projucer\ComponentEditor</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineClient.cpp"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineServer.cpp"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\Source\LiveBuildEngine\jucer_DownloadCompileEngineThread.cpp"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="..\..\Source\Project\Modules\jucer_Modules.cpp"> | |||
| <Filter>Projucer\Project\Modules</Filter> | |||
| </ClCompile> | |||
| @@ -2031,9 +2016,6 @@ | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_ItemPreviewComponent.h"> | |||
| <Filter>Projucer\CodeEditor</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_LiveBuildCodeEditor.h"> | |||
| <Filter>Projucer\CodeEditor</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\CodeEditor\jucer_OpenDocumentManager.h"> | |||
| <Filter>Projucer\CodeEditor</Filter> | |||
| </ClInclude> | |||
| @@ -2232,63 +2214,6 @@ | |||
| <ClInclude Include="..\..\Source\ComponentEditor\jucer_UtilityFunctions.h"> | |||
| <Filter>Projucer\ComponentEditor</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ActivityListComponent.h"> | |||
| <Filter>Projucer\LiveBuildEngine\UI</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_BuildTabStatusComponent.h"> | |||
| <Filter>Projucer\LiveBuildEngine\UI</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ComponentListComponent.h"> | |||
| <Filter>Projucer\LiveBuildEngine\UI</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\UI\jucer_ErrorListComponent.h"> | |||
| <Filter>Projucer\LiveBuildEngine\UI</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ActivityList.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ClassDatabase.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ClientServerMessages.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineClient.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineDLL.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineServer.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CompileEngineSettings.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_CppHelpers.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_DiagnosticMessage.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_DownloadCompileEngineThread.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ErrorList.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_LiveCodeBuilderDLL.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_MessageIDs.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_ProjectBuildInfo.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\LiveBuildEngine\jucer_SourceCodeRange.h"> | |||
| <Filter>Projucer\LiveBuildEngine</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\Modules\jucer_AvailableModulesList.h"> | |||
| <Filter>Projucer\Project\Modules</Filter> | |||
| </ClInclude> | |||
| @@ -2304,21 +2229,12 @@ | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_FileTreeItems.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_LiveBuildTab.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ModuleTreeItems.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ProjectTab.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_ProjectTreeItemBase.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_TabComponents.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="..\..\Source\Project\UI\Sidebar\jucer_TreeItemTypes.h"> | |||
| <Filter>Projucer\Project\UI\Sidebar</Filter> | |||
| </ClInclude> | |||
| @@ -66,9 +66,6 @@ target_sources(Projucer PRIVATE | |||
| Source/ComponentEditor/jucer_JucerDocument.cpp | |||
| Source/ComponentEditor/jucer_ObjectTypes.cpp | |||
| Source/ComponentEditor/jucer_PaintRoutine.cpp | |||
| Source/LiveBuildEngine/jucer_CompileEngineClient.cpp | |||
| Source/LiveBuildEngine/jucer_CompileEngineServer.cpp | |||
| Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.cpp | |||
| Source/Project/Modules/jucer_Modules.cpp | |||
| Source/Project/UI/jucer_HeaderComponent.cpp | |||
| Source/Project/jucer_Project.cpp | |||
| @@ -301,8 +301,6 @@ | |||
| resource="0" file="Source/CodeEditor/jucer_DocumentEditorComponent.h"/> | |||
| <FILE id="uKOPR9" name="jucer_ItemPreviewComponent.h" compile="0" resource="0" | |||
| file="Source/CodeEditor/jucer_ItemPreviewComponent.h"/> | |||
| <FILE id="SHg96q" name="jucer_LiveBuildCodeEditor.h" compile="0" resource="0" | |||
| file="Source/CodeEditor/jucer_LiveBuildCodeEditor.h"/> | |||
| <FILE id="iHU8kh" name="jucer_OpenDocumentManager.cpp" compile="1" | |||
| resource="0" file="Source/CodeEditor/jucer_OpenDocumentManager.cpp"/> | |||
| <FILE id="Bz5yDH" name="jucer_OpenDocumentManager.h" compile="0" resource="0" | |||
| @@ -496,54 +494,6 @@ | |||
| <FILE id="pl4vjj" name="jucer_UtilityFunctions.h" compile="0" resource="0" | |||
| file="Source/ComponentEditor/jucer_UtilityFunctions.h"/> | |||
| </GROUP> | |||
| <GROUP id="{1F4F21DC-6856-2C06-EEC5-39EE3B95C206}" name="LiveBuildEngine"> | |||
| <GROUP id="{A09CCB6F-E688-7D17-BF10-AE3C7916AACA}" name="UI"> | |||
| <FILE id="ESpwdA" name="jucer_ActivityListComponent.h" compile="0" | |||
| resource="0" file="Source/LiveBuildEngine/UI/jucer_ActivityListComponent.h"/> | |||
| <FILE id="uHJDl5" name="jucer_BuildTabStatusComponent.h" compile="0" | |||
| resource="0" file="Source/LiveBuildEngine/UI/jucer_BuildTabStatusComponent.h"/> | |||
| <FILE id="R6e43N" name="jucer_ComponentListComponent.h" compile="0" | |||
| resource="0" file="Source/LiveBuildEngine/UI/jucer_ComponentListComponent.h"/> | |||
| <FILE id="XQw8IS" name="jucer_ErrorListComponent.h" compile="0" resource="0" | |||
| file="Source/LiveBuildEngine/UI/jucer_ErrorListComponent.h"/> | |||
| </GROUP> | |||
| <FILE id="Q5k906" name="jucer_ActivityList.h" compile="0" resource="0" | |||
| file="Source/LiveBuildEngine/jucer_ActivityList.h"/> | |||
| <FILE id="XWb7H2" name="jucer_ClassDatabase.h" compile="0" resource="0" | |||
| file="Source/LiveBuildEngine/jucer_ClassDatabase.h"/> | |||
| <FILE id="ze2gZc" name="jucer_ClientServerMessages.h" compile="0" resource="0" | |||
| file="Source/LiveBuildEngine/jucer_ClientServerMessages.h"/> | |||
| <FILE id="DbgXxU" name="jucer_CompileEngineClient.cpp" compile="1" | |||
| resource="0" file="Source/LiveBuildEngine/jucer_CompileEngineClient.cpp"/> | |||
| <FILE id="cIQAZS" name="jucer_CompileEngineClient.h" compile="0" resource="0" | |||
| file="Source/LiveBuildEngine/jucer_CompileEngineClient.h"/> | |||
| <FILE id="rPpmYH" name="jucer_CompileEngineDLL.h" compile="0" resource="0" | |||
| file="Source/LiveBuildEngine/jucer_CompileEngineDLL.h"/> | |||
| <FILE id="fAas0g" name="jucer_CompileEngineServer.cpp" compile="1" | |||
| resource="0" file="Source/LiveBuildEngine/jucer_CompileEngineServer.cpp"/> | |||
| <FILE id="RraER0" name="jucer_CompileEngineServer.h" compile="0" resource="0" | |||
| file="Source/LiveBuildEngine/jucer_CompileEngineServer.h"/> | |||
| <FILE id="hKqvP1" name="jucer_CompileEngineSettings.h" compile="0" | |||
| resource="0" file="Source/LiveBuildEngine/jucer_CompileEngineSettings.h"/> | |||
| <FILE id="YlfzAt" name="jucer_CppHelpers.h" compile="0" resource="0" | |||
| file="Source/LiveBuildEngine/jucer_CppHelpers.h"/> | |||
| <FILE id="yW3rHq" name="jucer_DiagnosticMessage.h" compile="0" resource="0" | |||
| file="Source/LiveBuildEngine/jucer_DiagnosticMessage.h"/> | |||
| <FILE id="v0coQ0" name="jucer_DownloadCompileEngineThread.cpp" compile="1" | |||
| resource="0" file="Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.cpp"/> | |||
| <FILE id="vs5P8J" name="jucer_DownloadCompileEngineThread.h" compile="0" | |||
| resource="0" file="Source/LiveBuildEngine/jucer_DownloadCompileEngineThread.h"/> | |||
| <FILE id="rhXBjT" name="jucer_ErrorList.h" compile="0" resource="0" | |||
| file="Source/LiveBuildEngine/jucer_ErrorList.h"/> | |||
| <FILE id="w6cwIQ" name="jucer_LiveCodeBuilderDLL.h" compile="0" resource="0" | |||
| file="Source/LiveBuildEngine/jucer_LiveCodeBuilderDLL.h"/> | |||
| <FILE id="Cm6ctH" name="jucer_MessageIDs.h" compile="0" resource="0" | |||
| file="Source/LiveBuildEngine/jucer_MessageIDs.h"/> | |||
| <FILE id="TwC93V" name="jucer_ProjectBuildInfo.h" compile="0" resource="0" | |||
| file="Source/LiveBuildEngine/jucer_ProjectBuildInfo.h"/> | |||
| <FILE id="d0I7nM" name="jucer_SourceCodeRange.h" compile="0" resource="0" | |||
| file="Source/LiveBuildEngine/jucer_SourceCodeRange.h"/> | |||
| </GROUP> | |||
| <GROUP id="{6653587F-C475-46AA-E7CF-1D0DFA0FEAA9}" name="Project"> | |||
| <GROUP id="{F2E7D5CA-F002-2635-DA2C-898FA5EA2936}" name="Modules"> | |||
| <FILE id="w7QIJd" name="jucer_AvailableModulesList.h" compile="0" resource="0" | |||
| @@ -560,16 +510,10 @@ | |||
| file="Source/Project/UI/Sidebar/jucer_ExporterTreeItems.h"/> | |||
| <FILE id="zrho6r" name="jucer_FileTreeItems.h" compile="0" resource="0" | |||
| file="Source/Project/UI/Sidebar/jucer_FileTreeItems.h"/> | |||
| <FILE id="g0b0eE" name="jucer_LiveBuildTab.h" compile="0" resource="0" | |||
| file="Source/Project/UI/Sidebar/jucer_LiveBuildTab.h"/> | |||
| <FILE id="HAByBK" name="jucer_ModuleTreeItems.h" compile="0" resource="0" | |||
| file="Source/Project/UI/Sidebar/jucer_ModuleTreeItems.h"/> | |||
| <FILE id="rmISUI" name="jucer_ProjectTab.h" compile="0" resource="0" | |||
| file="Source/Project/UI/Sidebar/jucer_ProjectTab.h"/> | |||
| <FILE id="Htgucp" name="jucer_ProjectTreeItemBase.h" compile="0" resource="0" | |||
| file="Source/Project/UI/Sidebar/jucer_ProjectTreeItemBase.h"/> | |||
| <FILE id="kIPfPL" name="jucer_TabComponents.h" compile="0" resource="0" | |||
| file="Source/Project/UI/Sidebar/jucer_TabComponents.h"/> | |||
| <FILE id="jr8KTF" name="jucer_TreeItemTypes.h" compile="0" resource="0" | |||
| file="Source/Project/UI/Sidebar/jucer_TreeItemTypes.h"/> | |||
| </GROUP> | |||
| @@ -55,56 +55,42 @@ struct ProjucerApplication::MainMenuModel : public MenuBarModel | |||
| //============================================================================== | |||
| void ProjucerApplication::initialise (const String& commandLine) | |||
| { | |||
| if (commandLine.trimStart().startsWith ("--server")) | |||
| { | |||
| initialiseLogger ("Compiler_Log_"); | |||
| LookAndFeel::setDefaultLookAndFeel (&lookAndFeel); | |||
| #if JUCE_MAC | |||
| Process::setDockIconVisible (false); | |||
| #endif | |||
| initialiseLogger ("IDE_Log_"); | |||
| Logger::writeToLog (SystemStats::getOperatingSystemName()); | |||
| Logger::writeToLog ("CPU: " + String (SystemStats::getCpuSpeedInMegahertz()) | |||
| + "MHz Cores: " + String (SystemStats::getNumCpus()) | |||
| + " " + String (SystemStats::getMemorySizeInMegabytes()) + "MB"); | |||
| server = createClangServer (commandLine); | |||
| } | |||
| else | |||
| { | |||
| initialiseLogger ("IDE_Log_"); | |||
| Logger::writeToLog (SystemStats::getOperatingSystemName()); | |||
| Logger::writeToLog ("CPU: " + String (SystemStats::getCpuSpeedInMegahertz()) | |||
| + "MHz Cores: " + String (SystemStats::getNumCpus()) | |||
| + " " + String (SystemStats::getMemorySizeInMegabytes()) + "MB"); | |||
| isRunningCommandLine = commandLine.isNotEmpty() | |||
| && ! commandLine.startsWith ("-NSDocumentRevisionsDebugMode"); | |||
| isRunningCommandLine = commandLine.isNotEmpty() | |||
| && ! commandLine.startsWith ("-NSDocumentRevisionsDebugMode"); | |||
| settings = std::make_unique<StoredSettings>(); | |||
| settings = std::make_unique<StoredSettings>(); | |||
| if (isRunningCommandLine) | |||
| { | |||
| auto appReturnCode = performCommandLine (ArgumentList ("Projucer", commandLine)); | |||
| if (appReturnCode != commandLineNotPerformed) | |||
| { | |||
| setApplicationReturnValue (appReturnCode); | |||
| quit(); | |||
| return; | |||
| } | |||
| isRunningCommandLine = false; | |||
| } | |||
| if (isRunningCommandLine) | |||
| { | |||
| auto appReturnCode = performCommandLine (ArgumentList ("Projucer", commandLine)); | |||
| if (sendCommandLineToPreexistingInstance()) | |||
| if (appReturnCode != commandLineNotPerformed) | |||
| { | |||
| DBG ("Another instance is running - quitting..."); | |||
| setApplicationReturnValue (appReturnCode); | |||
| quit(); | |||
| return; | |||
| } | |||
| doBasicApplicationSetup(); | |||
| isRunningCommandLine = false; | |||
| } | |||
| // do further initialisation in a moment when the message loop has started | |||
| triggerAsyncUpdate(); | |||
| if (sendCommandLineToPreexistingInstance()) | |||
| { | |||
| DBG ("Another instance is running - quitting..."); | |||
| quit(); | |||
| return; | |||
| } | |||
| doBasicApplicationSetup(); | |||
| // do further initialisation in a moment when the message loop has started | |||
| triggerAsyncUpdate(); | |||
| } | |||
| bool ProjucerApplication::initialiseLogger (const char* filePrefix) | |||
| @@ -143,8 +129,6 @@ void ProjucerApplication::handleAsyncUpdate() | |||
| rescanJUCEPathModules(); | |||
| rescanUserPathModules(); | |||
| openDocumentManager.registerType (new ProjucerAppClasses::LiveBuildCodeEditorDocument::Type(), 2); | |||
| menuModel.reset (new MainMenuModel()); | |||
| #if JUCE_MAC | |||
| @@ -171,7 +155,6 @@ void ProjucerApplication::doBasicApplicationSetup() | |||
| licenseController = std::make_unique<LicenseController>(); | |||
| LookAndFeel::setDefaultLookAndFeel (&lookAndFeel); | |||
| initCommandManager(); | |||
| childProcessCache = std::make_unique<ChildProcessCache>(); | |||
| icons = std::make_unique<Icons>(); | |||
| } | |||
| @@ -185,12 +168,6 @@ static void deleteTemporaryFiles() | |||
| void ProjucerApplication::shutdown() | |||
| { | |||
| if (server != nullptr) | |||
| { | |||
| destroyClangServer (server); | |||
| Logger::writeToLog ("Server shutdown cleanly"); | |||
| } | |||
| utf8Window.reset(); | |||
| svgPathWindow.reset(); | |||
| aboutWindow.reset(); | |||
| @@ -201,8 +178,6 @@ void ProjucerApplication::shutdown() | |||
| mainWindowList.forceCloseAllWindows(); | |||
| openDocumentManager.clear(); | |||
| childProcessCache.reset(); | |||
| #if JUCE_MAC | |||
| MenuBarModel::setMacMainMenu (nullptr); | |||
| #endif | |||
| @@ -242,11 +217,7 @@ struct AsyncQuitRetrier : private Timer | |||
| void ProjucerApplication::systemRequestedQuit() | |||
| { | |||
| if (server != nullptr) | |||
| { | |||
| sendQuitMessageToIDE (server); | |||
| } | |||
| else if (ModalComponentManager::getInstance()->cancelAllModalComponents()) | |||
| if (ModalComponentManager::getInstance()->cancelAllModalComponents()) | |||
| { | |||
| new AsyncQuitRetrier(); | |||
| } | |||
| @@ -275,7 +246,7 @@ String ProjucerApplication::getVersionDescription() const | |||
| void ProjucerApplication::anotherInstanceStarted (const String& commandLine) | |||
| { | |||
| if (server == nullptr && ! commandLine.trim().startsWithChar ('-')) | |||
| if (! commandLine.trim().startsWithChar ('-')) | |||
| { | |||
| ArgumentList list ({}, commandLine); | |||
| @@ -316,9 +287,8 @@ MenuBarModel* ProjucerApplication::getMenuModel() | |||
| StringArray ProjucerApplication::getMenuNames() | |||
| { | |||
| StringArray currentMenuNames { "File", "Edit", "View", "Build", "Window", "Document", "GUI Editor", "Tools", "Help" }; | |||
| StringArray currentMenuNames { "File", "Edit", "View", "Window", "Document", "GUI Editor", "Tools", "Help" }; | |||
| if (! isLiveBuildEnabled()) currentMenuNames.removeString ("Build"); | |||
| if (! isGUIEditorEnabled()) currentMenuNames.removeString ("GUI Editor"); | |||
| return currentMenuNames; | |||
| @@ -335,10 +305,6 @@ PopupMenu ProjucerApplication::createMenu (const String& menuName) | |||
| if (menuName == "View") | |||
| return createViewMenu(); | |||
| if (menuName == "Build") | |||
| if (isLiveBuildEnabled()) | |||
| return createBuildMenu(); | |||
| if (menuName == "Window") | |||
| return createWindowMenu(); | |||
| @@ -437,8 +403,6 @@ PopupMenu ProjucerApplication::createViewMenu() | |||
| { | |||
| PopupMenu menu; | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::showProjectSettings); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::showProjectTab); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::showBuildTab); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::showFileExplorerPanel); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::showModulesPanel); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::showExportersPanel); | |||
| @@ -450,25 +414,6 @@ PopupMenu ProjucerApplication::createViewMenu() | |||
| return menu; | |||
| } | |||
| PopupMenu ProjucerApplication::createBuildMenu() | |||
| { | |||
| PopupMenu menu; | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::toggleBuildEnabled); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::buildNow); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::toggleContinuousBuild); | |||
| menu.addSeparator(); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::launchApp); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::killApp); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::cleanAll); | |||
| menu.addSeparator(); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::reinstantiateComp); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::showWarnings); | |||
| menu.addSeparator(); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::nextError); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::prevError); | |||
| return menu; | |||
| } | |||
| void ProjucerApplication::createColourSchemeItems (PopupMenu& menu) | |||
| { | |||
| { | |||
| @@ -569,7 +514,6 @@ PopupMenu ProjucerApplication::createToolsMenu() | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::showSVGPathTool); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::showTranslationTool); | |||
| menu.addSeparator(); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::enableLiveBuild); | |||
| menu.addCommandItem (commandManager.get(), CommandIDs::enableGUIEditor); | |||
| return menu; | |||
| } | |||
| @@ -964,7 +908,6 @@ void ProjucerApplication::getAllCommands (Array <CommandID>& commands) | |||
| CommandIDs::showGlobalPathsWindow, | |||
| CommandIDs::showUTF8Tool, | |||
| CommandIDs::showSVGPathTool, | |||
| CommandIDs::enableLiveBuild, | |||
| CommandIDs::enableGUIEditor, | |||
| CommandIDs::showAboutWindow, | |||
| CommandIDs::checkForNewVersion, | |||
| @@ -1041,13 +984,6 @@ void ProjucerApplication::getCommandInfo (CommandID commandID, ApplicationComman | |||
| result.setInfo ("SVG Path Converter", "Shows the SVG->Path data conversion utility", CommandCategories::general, 0); | |||
| break; | |||
| case CommandIDs::enableLiveBuild: | |||
| result.setInfo ("Live-Build Enabled", | |||
| "Enables or disables the live-build functionality", | |||
| CommandCategories::general, | |||
| (isLiveBuildEnabled() ? ApplicationCommandInfo::isTicked : 0)); | |||
| break; | |||
| case CommandIDs::enableGUIEditor: | |||
| result.setInfo ("GUI Editor Enabled", | |||
| "Enables or disables the GUI editor functionality", | |||
| @@ -1120,7 +1056,6 @@ bool ProjucerApplication::perform (const InvocationInfo& info) | |||
| case CommandIDs::clearRecentFiles: clearRecentFiles(); break; | |||
| case CommandIDs::showUTF8Tool: showUTF8ToolWindow(); break; | |||
| case CommandIDs::showSVGPathTool: showSVGPathDataToolWindow(); break; | |||
| case CommandIDs::enableLiveBuild: enableOrDisableLiveBuild(); break; | |||
| case CommandIDs::enableGUIEditor: enableOrDisableGUIEditor(); break; | |||
| case CommandIDs::showGlobalPathsWindow: showPathsWindow (false); break; | |||
| case CommandIDs::showAboutWindow: showAboutWindow(); break; | |||
| @@ -1213,7 +1148,7 @@ bool ProjucerApplication::closeAllDocuments (OpenDocumentManager::SaveIfNeeded a | |||
| bool ProjucerApplication::closeAllMainWindows() | |||
| { | |||
| return server != nullptr || mainWindowList.askAllWindowsToClose(); | |||
| return mainWindowList.askAllWindowsToClose(); | |||
| } | |||
| void ProjucerApplication::closeAllMainWindowsAndQuitIfNeeded() | |||
| @@ -1256,16 +1191,6 @@ void ProjucerApplication::showSVGPathDataToolWindow() | |||
| 500, 500, 300, 300, 1000, 1000); | |||
| } | |||
| bool ProjucerApplication::isLiveBuildEnabled() const | |||
| { | |||
| return getGlobalProperties().getBoolValue (Ids::liveBuildEnabled); | |||
| } | |||
| void ProjucerApplication::enableOrDisableLiveBuild() | |||
| { | |||
| getGlobalProperties().setValue (Ids::liveBuildEnabled, ! isLiveBuildEnabled()); | |||
| } | |||
| bool ProjucerApplication::isGUIEditorEnabled() const | |||
| { | |||
| return getGlobalProperties().getBoolValue (Ids::guiEditorEnabled); | |||
| @@ -32,8 +32,6 @@ | |||
| #include "../CodeEditor/jucer_SourceCodeEditor.h" | |||
| #include "../Utility/UI/jucer_ProjucerLookAndFeel.h" | |||
| struct ChildProcessCache; | |||
| //============================================================================== | |||
| class ProjucerApplication : public JUCEApplication, | |||
| private AsyncUpdater | |||
| @@ -65,7 +63,6 @@ public: | |||
| void getCommandInfo (CommandID commandID, ApplicationCommandInfo&) override; | |||
| bool perform (const InvocationInfo&) override; | |||
| bool isLiveBuildEnabled() const; | |||
| bool isGUIEditorEnabled() const; | |||
| //============================================================================== | |||
| @@ -107,7 +104,6 @@ public: | |||
| std::unique_ptr<ApplicationCommandManager> commandManager; | |||
| bool isRunningCommandLine = false; | |||
| std::unique_ptr<ChildProcessCache> childProcessCache; | |||
| private: | |||
| //============================================================================== | |||
| @@ -133,7 +129,6 @@ private: | |||
| PopupMenu createFileMenu(); | |||
| PopupMenu createEditMenu(); | |||
| PopupMenu createViewMenu(); | |||
| PopupMenu createBuildMenu(); | |||
| void createColourSchemeItems (PopupMenu&); | |||
| PopupMenu createWindowMenu(); | |||
| PopupMenu createDocumentMenu(); | |||
| @@ -168,7 +163,6 @@ private: | |||
| void doLoginOrLogout(); | |||
| void showLoginForm(); | |||
| void enableOrDisableLiveBuild(); | |||
| void enableOrDisableGUIEditor(); | |||
| //============================================================================== | |||
| @@ -207,7 +201,6 @@ private: | |||
| //============================================================================== | |||
| std::unique_ptr<LicenseController> licenseController; | |||
| void* server = nullptr; | |||
| std::unique_ptr<TooltipWindow> tooltipWindow; | |||
| AvailableModulesList jucePathModulesList, userPathsModulesList; | |||
| @@ -56,12 +56,9 @@ namespace CommandIDs | |||
| showAboutWindow = 0x300024, | |||
| checkForNewVersion = 0x300025, | |||
| enableNewVersionCheck = 0x300026, | |||
| enableLiveBuild = 0x300027, | |||
| enableGUIEditor = 0x300028, | |||
| enableGUIEditor = 0x300027, | |||
| showProjectSettings = 0x300030, | |||
| showProjectTab = 0x300031, | |||
| showBuildTab = 0x300032, | |||
| showFileExplorerPanel = 0x300033, | |||
| showModulesPanel = 0x300034, | |||
| showExportersPanel = 0x300035, | |||
| @@ -83,24 +80,12 @@ namespace CommandIDs | |||
| findNext = 0x300052, | |||
| findPrevious = 0x300053, | |||
| cleanAll = 0x300060, | |||
| toggleBuildEnabled = 0x300061, | |||
| showWarnings = 0x300062, | |||
| reinstantiateComp = 0x300063, | |||
| launchApp = 0x300064, | |||
| killApp = 0x300065, | |||
| buildNow = 0x300066, | |||
| toggleContinuousBuild = 0x300067, | |||
| enableSnapToGrid = 0x300070, | |||
| zoomIn = 0x300071, | |||
| zoomOut = 0x300072, | |||
| zoomNormal = 0x300073, | |||
| spaceBarDrag = 0x300074, | |||
| nextError = 0x300080, | |||
| prevError = 0x300081, | |||
| loginLogout = 0x300090, | |||
| showForum = 0x300100, | |||
| @@ -27,9 +27,3 @@ | |||
| #include <JuceHeader.h> | |||
| #include "jucer_CommonHeaders.h" | |||
| #if JUCE_DEBUG | |||
| #define RUN_CLANG_IN_CHILD_PROCESS 1 | |||
| #else | |||
| #define RUN_CLANG_IN_CHILD_PROCESS 1 | |||
| #endif | |||
| @@ -39,27 +39,6 @@ | |||
| #include "Windows/jucer_PIPCreatorWindowComponent.h" | |||
| #include "Windows/jucer_FloatingToolWindow.h" | |||
| #include "../LiveBuildEngine/jucer_MessageIDs.h" | |||
| #include "../LiveBuildEngine/jucer_CppHelpers.h" | |||
| #include "../LiveBuildEngine/jucer_SourceCodeRange.h" | |||
| #include "../LiveBuildEngine/jucer_ClassDatabase.h" | |||
| #include "../LiveBuildEngine/jucer_DiagnosticMessage.h" | |||
| #include "../LiveBuildEngine/jucer_CompileEngineDLL.h" | |||
| #include "../LiveBuildEngine/jucer_CompileEngineClient.h" | |||
| #include "../LiveBuildEngine/UI/jucer_ActivityListComponent.h" | |||
| #include "../LiveBuildEngine/UI/jucer_BuildTabStatusComponent.h" | |||
| #include "../LiveBuildEngine/UI/jucer_ComponentListComponent.h" | |||
| #include "../LiveBuildEngine/jucer_CompileEngineServer.h" | |||
| JUCE_IMPLEMENT_SINGLETON (CompileEngineDLL) | |||
| struct ProjucerAppClasses | |||
| { | |||
| #include "../CodeEditor/jucer_LiveBuildCodeEditor.h" | |||
| #include "../LiveBuildEngine/UI/jucer_ErrorListComponent.h" | |||
| }; | |||
| #include "jucer_CommandLine.h" | |||
| #include "../Project/UI/jucer_ProjectContentComponent.cpp" | |||
| @@ -376,15 +376,8 @@ void MainWindow::setupTemporaryPIPProject (PIPGenerator& generator) | |||
| currentProject->setTemporaryDirectory (generator.getOutputDirectory()); | |||
| ProjectSaver liveBuildSaver (*currentProject); | |||
| liveBuildSaver.saveContentNeededForLiveBuild(); | |||
| if (auto* pcc = getProjectContentComponent()) | |||
| { | |||
| pcc->invokeDirectly (CommandIDs::toggleBuildEnabled, true); | |||
| pcc->invokeDirectly (CommandIDs::buildNow, true); | |||
| pcc->invokeDirectly (CommandIDs::toggleContinuousBuild, true); | |||
| auto fileToDisplay = generator.getPIPFile(); | |||
| if (fileToDisplay != File()) | |||
| @@ -1,742 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| class LiveBuildCodeEditorDocument; | |||
| //============================================================================== | |||
| class LiveBuildCodeEditor : public CppCodeEditorComponent, | |||
| private Timer | |||
| { | |||
| public: | |||
| LiveBuildCodeEditor (LiveBuildCodeEditorDocument& edDoc, CodeDocument& doc) | |||
| : CppCodeEditorComponent (edDoc.getFile(), doc), | |||
| editorDoc (edDoc), | |||
| classList (*this, edDoc) | |||
| { | |||
| } | |||
| ~LiveBuildCodeEditor() override | |||
| { | |||
| for (int i = getNumChildComponents(); --i >= 0;) | |||
| if (auto* c = dynamic_cast<DiagnosticOverlayComponent*> (getChildComponent (i))) | |||
| delete c; | |||
| } | |||
| CompileEngineChildProcess::Ptr getChildProcess() const | |||
| { | |||
| return editorDoc.getChildProcess(); | |||
| } | |||
| Component* addDiagnosticOverlay (CodeDocument::Position start, CodeDocument::Position end, | |||
| DiagnosticMessage::Type diagType) | |||
| { | |||
| auto* d = new DiagnosticOverlayComponent (*this, start, end, diagType); | |||
| addAndMakeVisible (d); | |||
| return d; | |||
| } | |||
| private: | |||
| LiveBuildCodeEditorDocument& editorDoc; | |||
| //============================================================================== | |||
| struct OverlayComponent : public Component, | |||
| private GenericCodeEditorComponent::Listener, | |||
| private CodeDocument::Listener | |||
| { | |||
| OverlayComponent (CodeDocument::Position start, | |||
| CodeDocument::Position end) | |||
| : startPosition (start), | |||
| endPosition (end) | |||
| { | |||
| startPosition.setPositionMaintained (true); | |||
| endPosition.setPositionMaintained (true); | |||
| } | |||
| ~OverlayComponent() override | |||
| { | |||
| setEditor (nullptr); | |||
| } | |||
| void setEditor (GenericCodeEditorComponent* editor) | |||
| { | |||
| if (editor != codeEditor) | |||
| { | |||
| if (codeEditor != nullptr) | |||
| { | |||
| codeEditor->removeListener (this); | |||
| codeEditor->getDocument().removeListener (this); | |||
| codeEditor->removeChildComponent (this); | |||
| } | |||
| codeEditor = editor; | |||
| if (codeEditor != nullptr) | |||
| { | |||
| codeEditor->addListener (this); | |||
| codeEditor->getDocument().addListener (this); | |||
| codeEditor->addAndMakeVisible (this); | |||
| } | |||
| if (editor != nullptr) | |||
| updatePosition(); | |||
| } | |||
| } | |||
| void codeEditorViewportMoved (CodeEditorComponent& editor) override | |||
| { | |||
| setEditor (dynamic_cast<GenericCodeEditorComponent*> (&editor)); | |||
| updatePosition(); | |||
| } | |||
| void codeDocumentTextInserted (const String&, int) override { updatePosition(); } | |||
| void codeDocumentTextDeleted (int, int) override { updatePosition(); } | |||
| void parentSizeChanged() override | |||
| { | |||
| updatePosition(); | |||
| } | |||
| virtual void updatePosition() = 0; | |||
| Component::SafePointer<GenericCodeEditorComponent> codeEditor; | |||
| CodeDocument::Position startPosition, endPosition; | |||
| }; | |||
| //============================================================================== | |||
| struct LaunchClassOverlayComponent : public OverlayComponent | |||
| { | |||
| LaunchClassOverlayComponent (GenericCodeEditorComponent& editor, | |||
| CodeDocument::Position start, CodeDocument::Position end, | |||
| const String className) | |||
| : OverlayComponent (start, end), | |||
| launchButton (className.fromLastOccurrenceOf ("::", false, false)), | |||
| name (className) | |||
| { | |||
| setAlwaysOnTop (true); | |||
| setEditor (&editor); | |||
| addAndMakeVisible (launchButton); | |||
| } | |||
| void updatePosition() override | |||
| { | |||
| if (codeEditor != nullptr) | |||
| { | |||
| jassert (isVisible()); | |||
| const auto charArea = codeEditor->getCharacterBounds (startPosition); | |||
| const int height = charArea.getHeight() + 8; | |||
| Font f ((float) height * 0.7f); | |||
| const int width = jmin (height * 2 + f.getStringWidth (launchButton.getName()), | |||
| jmax (120, codeEditor->proportionOfWidth (0.2f))); | |||
| setBounds (codeEditor->getWidth() - width - 10, charArea.getY() - 4, | |||
| width, height); | |||
| } | |||
| } | |||
| void resized() override | |||
| { | |||
| launchButton.setBounds (getLocalBounds()); | |||
| } | |||
| struct LaunchButton : public Button | |||
| { | |||
| LaunchButton (const String& nm) : Button (nm) | |||
| { | |||
| setMouseCursor (MouseCursor::PointingHandCursor); | |||
| } | |||
| void paintButton (Graphics& g, bool isMouseOverButton, bool isButtonDown) override | |||
| { | |||
| Colour background (findColour (CodeEditorComponent::backgroundColourId) | |||
| .contrasting() | |||
| .overlaidWith (Colours::yellow.withAlpha (0.5f)) | |||
| .withAlpha (0.4f)); | |||
| g.setColour (background); | |||
| g.fillRoundedRectangle (getLocalBounds().toFloat(), 3.0f); | |||
| const Path& path = getIcons().play; | |||
| Colour col (background.contrasting (Colours::lightgreen, 0.6f)); | |||
| Rectangle<int> r (getLocalBounds().reduced (getHeight() / 5)); | |||
| Icon (path, col.withAlpha (isButtonDown ? 1.0f : (isMouseOverButton ? 0.8f : 0.5f))) | |||
| .draw (g, r.removeFromLeft (getHeight()).toFloat(), false); | |||
| g.setColour (Colours::white); | |||
| g.setFont ((float) getHeight() * 0.7f); | |||
| g.drawFittedText (getName(), r, Justification::centredLeft, 1); | |||
| } | |||
| void clicked() override | |||
| { | |||
| if (auto* l = findParentComponentOfClass<LaunchClassOverlayComponent>()) | |||
| l->launch(); | |||
| } | |||
| using Button::clicked; | |||
| }; | |||
| void launch() | |||
| { | |||
| if (auto* e = findParentComponentOfClass<LiveBuildCodeEditor>()) | |||
| e->launch (name); | |||
| } | |||
| private: | |||
| LaunchButton launchButton; | |||
| String name; | |||
| }; | |||
| struct ComponentClassList : private Timer | |||
| { | |||
| ComponentClassList (GenericCodeEditorComponent& e, LiveBuildCodeEditorDocument& edDoc) | |||
| : owner (e), | |||
| childProcess (edDoc.getChildProcess()), | |||
| file (edDoc.getFile()) | |||
| { | |||
| startTimer (600); | |||
| } | |||
| ~ComponentClassList() override | |||
| { | |||
| deleteOverlays(); | |||
| } | |||
| void timerCallback() override | |||
| { | |||
| Array<WeakReference<ClassDatabase::Class>> newClasses; | |||
| if (childProcess != nullptr) | |||
| const_cast <ClassDatabase::ClassList&> (childProcess->getComponentList()).globalNamespace.findClassesDeclaredInFile (newClasses, file); | |||
| for (int i = newClasses.size(); --i >= 0;) | |||
| { | |||
| auto& c = newClasses.getReference (i); | |||
| if (c == nullptr || ! c->getInstantiationFlags().canBeInstantiated()) | |||
| newClasses.remove (i); | |||
| } | |||
| if (newClasses != classes) | |||
| { | |||
| classes = newClasses; | |||
| deleteOverlays(); | |||
| for (auto c : classes) | |||
| { | |||
| if (c != nullptr) | |||
| { | |||
| CodeDocument::Position pos (owner.getDocument(), c->getClassDeclarationRange().range.getStart()); | |||
| overlays.add (new LaunchClassOverlayComponent (owner, pos, pos, c->getName())); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| void deleteOverlays() | |||
| { | |||
| for (auto& o : overlays) | |||
| o.deleteAndZero(); | |||
| overlays.clear(); | |||
| } | |||
| GenericCodeEditorComponent& owner; | |||
| CompileEngineChildProcess::Ptr childProcess; | |||
| File file; | |||
| Array<WeakReference<ClassDatabase::Class>> classes; | |||
| Array<Component::SafePointer<Component>> overlays; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComponentClassList) | |||
| }; | |||
| ComponentClassList classList; | |||
| //============================================================================== | |||
| struct DiagnosticOverlayComponent : public OverlayComponent | |||
| { | |||
| DiagnosticOverlayComponent (GenericCodeEditorComponent& editor, | |||
| CodeDocument::Position start, CodeDocument::Position end, | |||
| DiagnosticMessage::Type diagType) | |||
| : OverlayComponent (start, end), diagnosticType (diagType) | |||
| { | |||
| setInterceptsMouseClicks (false, false); | |||
| setEditor (&editor); | |||
| } | |||
| void updatePosition() override | |||
| { | |||
| if (codeEditor != nullptr) | |||
| { | |||
| jassert (isVisible()); | |||
| const auto charStartRect = codeEditor->getCharacterBounds (startPosition); | |||
| const auto charEndRect = codeEditor->getCharacterBounds (endPosition); | |||
| auto charHeight = charStartRect.getHeight(); | |||
| const auto editorBounds = codeEditor->getBounds(); | |||
| arrowXMin = static_cast<int> (jmin (charStartRect.getX(), charEndRect.getX())); | |||
| arrowXMax = static_cast<int> (jmax (charStartRect.getX() + charStartRect.getWidth(), charEndRect.getX() + charEndRect.getWidth())); | |||
| lineYMin = charStartRect.getY(); | |||
| lineOffset = charHeight; | |||
| setBounds (0, lineYMin, editorBounds.getWidth(), lineOffset + charHeight); | |||
| repaint(); | |||
| } | |||
| } | |||
| void paint (Graphics& g) override | |||
| { | |||
| const auto diagColour = diagnosticType == DiagnosticMessage::Type::error ? Colours::red | |||
| : Colour (200, 200, 64); | |||
| g.setColour (diagColour.withAlpha (0.2f)); | |||
| g.fillRect (getLocalBounds().withTrimmedBottom (lineOffset)); | |||
| Path path; | |||
| const float bottomY = (float) getHeight() - ((float) lineOffset / 2.0f); | |||
| path.addTriangle ((float) arrowXMin, bottomY, | |||
| (float) (arrowXMax + arrowXMin) / 2.0f, (float) lineOffset, | |||
| (float) arrowXMax, bottomY); | |||
| g.setColour (diagColour.withAlpha (0.8f)); | |||
| g.fillPath (path); | |||
| } | |||
| private: | |||
| int arrowXMin, arrowXMax; | |||
| int lineYMin, lineOffset; | |||
| const DiagnosticMessage::Type diagnosticType; | |||
| }; | |||
| //============================================================================== | |||
| void timerCallback() override | |||
| { | |||
| if (isMouseButtonDownAnywhere()) | |||
| return; | |||
| MouseInputSource mouse = Desktop::getInstance().getMainMouseSource(); | |||
| Component* underMouse = mouse.getComponentUnderMouse(); | |||
| if (underMouse != nullptr | |||
| && (dynamic_cast<ControlsComponent*> (underMouse) != nullptr | |||
| || underMouse->findParentComponentOfClass<ControlsComponent>() != nullptr)) | |||
| return; | |||
| overlay.reset(); | |||
| if (hasKeyboardFocus (true) && underMouse != nullptr | |||
| && (underMouse == this || underMouse->isParentOf (this))) | |||
| { | |||
| Point<int> mousePos = getLocalPoint (nullptr, mouse.getScreenPosition()).toInt(); | |||
| CodeDocument::Position start, end; | |||
| getDocument().findTokenContaining (getPositionAt (mousePos.x, mousePos.y), start, end); | |||
| if (end.getPosition() > start.getPosition()) | |||
| { | |||
| Range<int> selection = optimiseSelection ({ start.getPosition(), end.getPosition() }); | |||
| String text = getTextInRange (selection).toLowerCase(); | |||
| if (isIntegerLiteral (text) || isFloatLiteral (text)) | |||
| overlay.reset (new LiteralHighlightOverlay (*this, selection, mightBeColourValue (text))); | |||
| } | |||
| } | |||
| startTimerHz (10); | |||
| } | |||
| void hideOverlay() | |||
| { | |||
| stopTimer(); | |||
| overlay.reset(); | |||
| } | |||
| void focusLost (FocusChangeType) override | |||
| { | |||
| if (CompileEngineChildProcess::Ptr childProcess = getChildProcess()) | |||
| childProcess->flushEditorChanges(); | |||
| } | |||
| void mouseMove (const MouseEvent& e) override | |||
| { | |||
| if (overlay == nullptr) | |||
| startTimer (100); | |||
| CppCodeEditorComponent::mouseMove (e); | |||
| } | |||
| void mouseDrag (const MouseEvent& e) override | |||
| { | |||
| if (e.getDistanceFromDragStart() > 0) | |||
| hideOverlay(); | |||
| CppCodeEditorComponent::mouseDrag (e); | |||
| } | |||
| void mouseDown (const MouseEvent& e) override | |||
| { | |||
| CppCodeEditorComponent::mouseDown (e); | |||
| } | |||
| void mouseUp (const MouseEvent& e) override | |||
| { | |||
| CppCodeEditorComponent::mouseUp (e); | |||
| } | |||
| bool keyPressed (const KeyPress& key) override | |||
| { | |||
| hideOverlay(); | |||
| return CppCodeEditorComponent::keyPressed (key); | |||
| } | |||
| static bool isIntegerLiteral (const String& text) { return CppParserHelpers::parseSingleToken (text) == CPlusPlusCodeTokeniser::tokenType_integer; } | |||
| static bool isFloatLiteral (const String& text) { return CppParserHelpers::parseSingleToken (text) == CPlusPlusCodeTokeniser::tokenType_float; } | |||
| static bool mightBeColourValue (const String& text) | |||
| { | |||
| return isIntegerLiteral (text) | |||
| && text.trim().startsWith ("0x") | |||
| && text.trim().length() > 7; | |||
| } | |||
| Range<int> optimiseSelection (Range<int> selection) | |||
| { | |||
| String text (getTextInRange (selection)); | |||
| if (CharacterFunctions::isDigit (text[0]) || text[0] == '.') | |||
| if (getTextInRange (Range<int> (selection.getStart() - 1, selection.getStart())) == "-") | |||
| selection.setStart (selection.getStart() - 1); | |||
| selection.setStart (selection.getStart() + (text.length() - text.trimStart().length())); | |||
| selection.setEnd (selection.getEnd() - (text.length() - text.trimEnd().length())); | |||
| return selection; | |||
| } | |||
| void launch (const String& name) | |||
| { | |||
| if (CompileEngineChildProcess::Ptr p = getChildProcess()) | |||
| if (auto* cls = p->getComponentList().globalNamespace.findClass (name)) | |||
| p->openPreview (*cls); | |||
| } | |||
| //============================================================================== | |||
| class ControlsComponent : public Component, | |||
| private ChangeListener | |||
| { | |||
| public: | |||
| ControlsComponent (CodeDocument& doc, const Range<int>& selection, | |||
| CompileEngineChildProcess::Ptr cp, bool showColourSelector) | |||
| : document (doc), | |||
| start (doc, selection.getStart()), | |||
| end (doc, selection.getEnd()), | |||
| childProcess (cp) | |||
| { | |||
| slider.setTextBoxStyle (Slider::NoTextBox, true, 0, 0); | |||
| slider.setWantsKeyboardFocus (false); | |||
| slider.setMouseClickGrabsKeyboardFocus (false); | |||
| setWantsKeyboardFocus (false); | |||
| setMouseClickGrabsKeyboardFocus (false); | |||
| addAndMakeVisible (&slider); | |||
| updateRange(); | |||
| slider.onValueChange = [this] { updateSliderValue(); }; | |||
| slider.onDragEnd = [this] { updateRange(); }; | |||
| if (showColourSelector) | |||
| { | |||
| updateColourSelector(); | |||
| selector.setWantsKeyboardFocus (false); | |||
| selector.setMouseClickGrabsKeyboardFocus (false); | |||
| addAndMakeVisible (&selector); | |||
| setSize (400, sliderHeight + 400); | |||
| selector.addChangeListener (this); | |||
| } | |||
| else | |||
| { | |||
| setSize (400, sliderHeight); | |||
| } | |||
| end.setPositionMaintained (true); | |||
| } | |||
| void updateRange() | |||
| { | |||
| double v = getValue(); | |||
| if (isFloat()) | |||
| slider.setRange (v - 10, v + 10); | |||
| else | |||
| slider.setRange (v - 100, v + 100); | |||
| slider.setValue (v, dontSendNotification); | |||
| } | |||
| private: | |||
| Slider slider; | |||
| ColourSelector selector; | |||
| CodeDocument& document; | |||
| CodeDocument::Position start, end; | |||
| CompileEngineChildProcess::Ptr childProcess; | |||
| static const int sliderHeight = 26; | |||
| void paint (Graphics& g) override | |||
| { | |||
| g.setColour (LiteralHighlightOverlay::getBackgroundColour()); | |||
| g.fillRoundedRectangle (getLocalBounds().toFloat(), 8.0f); | |||
| } | |||
| void updateSliderValue() | |||
| { | |||
| const String oldText (document.getTextBetween (start, end)); | |||
| const String newText (CppParserHelpers::getReplacementStringInSameFormat (oldText, slider.getValue())); | |||
| if (oldText != newText) | |||
| document.replaceSection (start.getPosition(), end.getPosition(), newText); | |||
| if (childProcess != nullptr) | |||
| childProcess->flushEditorChanges(); | |||
| updateColourSelector(); | |||
| } | |||
| void changeListenerCallback (ChangeBroadcaster*) override | |||
| { | |||
| setNewColour (selector.getCurrentColour()); | |||
| } | |||
| void updateColourSelector() | |||
| { | |||
| selector.setCurrentColour (getCurrentColour()); | |||
| } | |||
| Colour getCurrentColour() const | |||
| { | |||
| int64 val; | |||
| if (CppParserHelpers::parseInt (document.getTextBetween (start, end), val)) | |||
| return Colour ((uint32) val); | |||
| return Colours::white; | |||
| } | |||
| void setNewColour (const Colour& c) | |||
| { | |||
| const String oldText (document.getTextBetween (start, end)); | |||
| const String newText (CppParserHelpers::getReplacementStringInSameFormat (oldText, (int64) c.getARGB())); | |||
| if (oldText != newText) | |||
| document.replaceSection (start.getPosition(), end.getPosition(), newText); | |||
| if (childProcess != nullptr) | |||
| childProcess->flushEditorChanges(); | |||
| } | |||
| void resized() override | |||
| { | |||
| Rectangle<int> r (getLocalBounds()); | |||
| slider.setBounds (r.removeFromTop (sliderHeight)); | |||
| r.removeFromTop (10); | |||
| if (selector.isVisible()) | |||
| selector.setBounds (r); | |||
| } | |||
| double getValue() const | |||
| { | |||
| const String text (document.getTextBetween (start, end)); | |||
| if (text.containsChar ('.')) | |||
| { | |||
| double f; | |||
| if (CppParserHelpers::parseFloat (text, f)) | |||
| return f; | |||
| } | |||
| else | |||
| { | |||
| int64 val; | |||
| if (CppParserHelpers::parseInt (text, val)) | |||
| return (double) val; | |||
| } | |||
| jassertfalse; | |||
| return 0; | |||
| } | |||
| bool isFloat() const | |||
| { | |||
| return document.getTextBetween (start, end).containsChar ('.'); | |||
| } | |||
| }; | |||
| //============================================================================== | |||
| struct LiteralHighlightOverlay : public Component, | |||
| private CodeDocument::Listener | |||
| { | |||
| LiteralHighlightOverlay (LiveBuildCodeEditor& e, Range<int> section, bool showColourSelector) | |||
| : owner (e), | |||
| start (e.getDocument(), section.getStart()), | |||
| end (e.getDocument(), section.getEnd()), | |||
| controls (e.getDocument(), section, e.getChildProcess(), showColourSelector) | |||
| { | |||
| if (e.hasKeyboardFocus (true)) | |||
| previouslyFocused = Component::getCurrentlyFocusedComponent(); | |||
| start.setPositionMaintained (true); | |||
| end.setPositionMaintained (true); | |||
| setInterceptsMouseClicks (false, false); | |||
| if (Component* parent = owner.findParentComponentOfClass<ProjectContentComponent>()) | |||
| parent->addAndMakeVisible (controls); | |||
| else | |||
| jassertfalse; | |||
| owner.addAndMakeVisible (this); | |||
| toBack(); | |||
| updatePosition(); | |||
| owner.getDocument().addListener (this); | |||
| } | |||
| ~LiteralHighlightOverlay() override | |||
| { | |||
| if (auto* p = getParentComponent()) | |||
| { | |||
| p->removeChildComponent (this); | |||
| if (previouslyFocused != nullptr && ! previouslyFocused->hasKeyboardFocus (true)) | |||
| previouslyFocused->grabKeyboardFocus(); | |||
| } | |||
| owner.getDocument().removeListener (this); | |||
| } | |||
| void paint (Graphics& g) override | |||
| { | |||
| g.setColour (getBackgroundColour()); | |||
| Rectangle<int> r (getLocalBounds()); | |||
| g.fillRect (r.removeFromTop (borderSize)); | |||
| g.fillRect (r.removeFromLeft (borderSize)); | |||
| g.fillRect (r.removeFromRight (borderSize)); | |||
| } | |||
| void updatePosition() | |||
| { | |||
| Rectangle<int> area = owner.getCharacterBounds (start) | |||
| .getUnion (owner.getCharacterBounds (end.movedBy (-1))) | |||
| .expanded (borderSize) | |||
| .withTrimmedBottom (borderSize); | |||
| setBounds (getParentComponent()->getLocalArea (&owner, area)); | |||
| area.setPosition (area.getX() - controls.getWidth() / 2, area.getBottom()); | |||
| area.setSize (controls.getWidth(), controls.getHeight()); | |||
| controls.setBounds (controls.getParentComponent()->getLocalArea (&owner, area)); | |||
| } | |||
| void codeDocumentTextInserted (const String&, int) override { updatePosition(); } | |||
| void codeDocumentTextDeleted (int, int) override { updatePosition(); } | |||
| LiveBuildCodeEditor& owner; | |||
| CodeDocument::Position start, end; | |||
| ControlsComponent controls; | |||
| Component::SafePointer<Component> previouslyFocused; | |||
| static const int borderSize = 4; | |||
| static Colour getBackgroundColour() { return Colour (0xcb5c7879); } | |||
| }; | |||
| std::unique_ptr<LiteralHighlightOverlay> overlay; | |||
| }; | |||
| //============================================================================== | |||
| class LiveBuildCodeEditorDocument : public SourceCodeDocument | |||
| { | |||
| public: | |||
| LiveBuildCodeEditorDocument (Project* projectToUse, const File& file) | |||
| : SourceCodeDocument (projectToUse, file) | |||
| { | |||
| if (projectToUse != nullptr) | |||
| if (CompileEngineChildProcess::Ptr childProcess = getChildProcess()) | |||
| childProcess->editorOpened (file, getCodeDocument()); | |||
| } | |||
| struct Type : public SourceCodeDocument::Type | |||
| { | |||
| Document* openFile (Project* proj, const File& file) override | |||
| { | |||
| return new LiveBuildCodeEditorDocument (proj, file); | |||
| } | |||
| }; | |||
| std::unique_ptr<Component> createEditor() override | |||
| { | |||
| auto e = fileNeedsCppSyntaxHighlighting (getFile()) ? std::make_unique<SourceCodeEditor> (this, new LiveBuildCodeEditor (*this, getCodeDocument())) | |||
| : std::make_unique<SourceCodeEditor> (this, getCodeDocument()); | |||
| applyLastState (*(e->editor)); | |||
| JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wredundant-move") | |||
| return std::move (e); | |||
| JUCE_END_IGNORE_WARNINGS_GCC_LIKE | |||
| } | |||
| // override save() to make a few more attempts at saving if it fails, since on Windows | |||
| // the compiler can interfere with things saving.. | |||
| bool save() override | |||
| { | |||
| for (int i = 5; --i >= 0;) | |||
| { | |||
| if (SourceCodeDocument::save()) // should already re-try for up to half a second | |||
| return true; | |||
| Thread::sleep (100); | |||
| } | |||
| return false; | |||
| } | |||
| CompileEngineChildProcess::Ptr getChildProcess() const | |||
| { | |||
| return ProjucerApplication::getApp().childProcessCache->getExisting (*project); | |||
| } | |||
| }; | |||
| @@ -1,358 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| //============================================================================== | |||
| class ErrorListComp : public TreePanelBase, | |||
| private ChangeListener | |||
| { | |||
| public: | |||
| ErrorListComp (ErrorList& el) | |||
| : TreePanelBase (nullptr, String()), | |||
| errorList (el) | |||
| { | |||
| setName ("Errors and Warnings"); | |||
| setEmptyTreeMessage ("(No Messages)"); | |||
| tree.setMultiSelectEnabled (false); | |||
| tree.setRootItemVisible (false); | |||
| setRoot (new ErrorRootTreeItem (errorList)); | |||
| errorList.addChangeListener (this); | |||
| errorListChanged(); | |||
| } | |||
| ~ErrorListComp() override | |||
| { | |||
| errorList.removeChangeListener (this); | |||
| } | |||
| void errorListChanged() | |||
| { | |||
| static_cast<ErrorRootTreeItem*> (rootItem.get())->refreshSubItems(); | |||
| } | |||
| void moveBy (const int delta) | |||
| { | |||
| if (delta < 0) | |||
| if (TreeViewItem* selected = tree.getSelectedItem (0)) | |||
| if (selected->getRowNumberInTree() <= 1) | |||
| return; | |||
| tree.moveSelectedRow (delta); | |||
| if (dynamic_cast<ErrorMessageTreeItem*> (tree.getSelectedItem (0)) == nullptr) | |||
| tree.moveSelectedRow (delta); | |||
| } | |||
| void showNext() { moveBy (1); } | |||
| void showPrevious() { moveBy (-1); } | |||
| private: | |||
| TreeView list; | |||
| ErrorList& errorList; | |||
| struct ErrorMessageTreeItem; | |||
| void changeListenerCallback (ChangeBroadcaster*) override | |||
| { | |||
| errorListChanged(); | |||
| } | |||
| static void limitNumberOfSubItems (TreeViewItem& item, const int maxSubItems) | |||
| { | |||
| while (item.getNumSubItems() > maxSubItems) | |||
| item.removeSubItem (item.getNumSubItems() - 1); | |||
| } | |||
| //============================================================================== | |||
| class ErrorRootTreeItem : public JucerTreeViewBase | |||
| { | |||
| public: | |||
| ErrorRootTreeItem (ErrorList& el) : errorList (el) {} | |||
| String getRenamingName() const override { return getDisplayName(); } | |||
| String getDisplayName() const override { return "Errors and Warnings"; } | |||
| void setName (const String&) override {} | |||
| bool isMissing() const override { return false; } | |||
| Icon getIcon() const override { return Icon (getIcons().bug, getContentColour (true)); } | |||
| bool canBeSelected() const override { return true; } | |||
| bool mightContainSubItems() override { return true; } | |||
| String getUniqueName() const override { return "errors"; } | |||
| void refreshSubItems() | |||
| { | |||
| Array<DiagnosticMessage> errors; | |||
| errorList.takeCopy (errors); | |||
| StringArray files; | |||
| for (const auto& m : errors) | |||
| { | |||
| files.addIfNotAlreadyThere (m.mainFile); | |||
| if (m.associatedDiagnostic != nullptr) | |||
| files.addIfNotAlreadyThere (m.associatedDiagnostic->mainFile); | |||
| } | |||
| limitNumberOfSubItems (*this, files.size()); | |||
| int i = 0; | |||
| for (const auto& f : files) | |||
| { | |||
| if (i >= getNumSubItems() || static_cast<CompileUnitTreeItem*> (getSubItem (i))->compileUnit != f) | |||
| { | |||
| limitNumberOfSubItems (*this, i); | |||
| addSubItem (new CompileUnitTreeItem (f)); | |||
| } | |||
| static_cast<CompileUnitTreeItem*> (getSubItem (i))->refresh (errors); | |||
| ++i; | |||
| } | |||
| } | |||
| private: | |||
| ErrorList& errorList; | |||
| }; | |||
| //============================================================================== | |||
| struct CompileUnitTreeItem : public JucerTreeViewBase | |||
| { | |||
| CompileUnitTreeItem (const String& filename) : compileUnit (filename) {} | |||
| void setName (const String&) override {} | |||
| void addSubItems() override {} | |||
| bool isMissing() const override { return false; } | |||
| Icon getIcon() const override { return Icon (getIcons().bug, getContentColour (true)); } | |||
| bool canBeSelected() const override { return true; } | |||
| bool mightContainSubItems() override { return true; } | |||
| String getUniqueName() const override { return String::toHexString (compileUnit.hashCode64()); } | |||
| String getRenamingName() const override { return getDisplayName(); } | |||
| String getDisplayName() const override | |||
| { | |||
| if (File::isAbsolutePath (compileUnit)) | |||
| { | |||
| File f (compileUnit); | |||
| return f.exists() ? f.getFileName() : compileUnit; | |||
| } | |||
| if (! compileUnit.isEmpty()) | |||
| return compileUnit; | |||
| return String ("Global"); | |||
| } | |||
| void showOverlays() | |||
| { | |||
| for (int i = 0; i < getNumSubItems(); ++i) | |||
| if (auto* e = dynamic_cast<ErrorMessageTreeItem*> (getSubItem (i))) | |||
| e->showOverlays(); | |||
| } | |||
| ErrorMessageTreeItem* getItemForError (const DiagnosticMessage& m) const | |||
| { | |||
| for (int i = 0; i < getNumSubItems(); ++i) | |||
| if (auto* item = dynamic_cast<ErrorMessageTreeItem*> (getSubItem(i))) | |||
| if (item->message == m) | |||
| return item; | |||
| return nullptr; | |||
| } | |||
| void refresh (const Array<DiagnosticMessage>& allErrors) | |||
| { | |||
| clearSubItems(); | |||
| for (const auto& error : allErrors) | |||
| if (error.mainFile == compileUnit && error.associatedDiagnostic == nullptr) | |||
| addSubItem (new ErrorMessageTreeItem (error)); | |||
| for (const auto& error : allErrors) | |||
| if (error.mainFile == compileUnit && error.associatedDiagnostic != nullptr) | |||
| if (ErrorMessageTreeItem* parent = getItemForError (*error.associatedDiagnostic)) | |||
| parent->addSubItem (new ErrorMessageTreeItem (error)); | |||
| } | |||
| void showDocument() override | |||
| { | |||
| if (ProjectContentComponent* pcc = getProjectContentComponent()) | |||
| if (File::isAbsolutePath (compileUnit) && File (compileUnit).exists()) | |||
| pcc->showEditorForFile (File (compileUnit), true); | |||
| } | |||
| String compileUnit; | |||
| }; | |||
| //============================================================================== | |||
| struct ErrorMessageTreeItem : public JucerTreeViewBase | |||
| { | |||
| ErrorMessageTreeItem (const DiagnosticMessage& m) | |||
| : message (m), itemHeight (25) | |||
| { | |||
| setOpenness (Openness::opennessClosed); | |||
| uniqueID << message.message << ':' << message.range.toString(); | |||
| } | |||
| ~ErrorMessageTreeItem() override | |||
| { | |||
| overlay.deleteAndZero(); | |||
| } | |||
| String getRenamingName() const override { return getDisplayName(); } | |||
| String getDisplayName() const override { return message.message; } | |||
| void setName (const String&) override {} | |||
| bool isMissing() const override { return false; } | |||
| Icon getIcon() const override { return Icon (message.isNote() ? getIcons().info | |||
| : getIcons().warning, getContentColour (true)); } | |||
| bool canBeSelected() const override { return true; } | |||
| bool mightContainSubItems() override { return getNumSubItems() != 0; } | |||
| String getUniqueName() const override { return uniqueID; } | |||
| void paintContent (Graphics& g, Rectangle<int> area) override | |||
| { | |||
| jassert (area.getWidth() >= 0); | |||
| AttributedString s (message.message); | |||
| s.setFont (Font (12.0f)); | |||
| s.setColour (getContentColour (false)); | |||
| s.setJustification (Justification::centredLeft); | |||
| text.createLayout (s, (float) area.getWidth()); | |||
| const auto newHeight = 2 + jmax (25, (int) text.getHeight()); | |||
| if (itemHeight != newHeight) | |||
| { | |||
| itemHeight = newHeight; | |||
| treeHasChanged(); | |||
| } | |||
| text.draw (g, area.toFloat()); | |||
| } | |||
| Colour getContentColour (bool isIcon) const override | |||
| { | |||
| if (isIcon) | |||
| { | |||
| if (isSelected()) | |||
| return getOwnerView()->findColour (defaultHighlightedTextColourId); | |||
| if (message.isError()) | |||
| return Colours::red; | |||
| if (message.isWarning()) | |||
| return Colours::yellow; | |||
| return getOwnerView()->findColour (treeIconColourId); | |||
| } | |||
| return getOwnerView()->findColour (isSelected() ? defaultHighlightedTextColourId | |||
| : defaultTextColourId); | |||
| } | |||
| void showPopupMenu (Point<int> p) override | |||
| { | |||
| PopupMenu menu; | |||
| menu.addItem (1, "Copy"); | |||
| launchPopupMenu (menu, p); | |||
| } | |||
| void handlePopupMenuResult (int resultCode) override | |||
| { | |||
| if (resultCode == 1) | |||
| SystemClipboard::copyTextToClipboard (message.toString()); | |||
| } | |||
| int getItemHeight() const override | |||
| { | |||
| return itemHeight; | |||
| } | |||
| SourceCodeEditor* getEditor() | |||
| { | |||
| if (auto* pcc = getProjectContentComponent()) | |||
| { | |||
| const auto file = File::createFileWithoutCheckingPath (message.range.file); | |||
| if (message.range.isValid() && file.exists() && pcc->showEditorForFile (file, false)) | |||
| return dynamic_cast<SourceCodeEditor*> (pcc->getEditorComponent()); | |||
| } | |||
| return nullptr; | |||
| } | |||
| void showDocument() override | |||
| { | |||
| if (SourceCodeEditor* ed = getEditor()) | |||
| { | |||
| ed->grabKeyboardFocus(); | |||
| ed->highlight (message.range.range, false); | |||
| if (auto cu = findCompileUnitParent()) | |||
| cu->showOverlays(); | |||
| } | |||
| } | |||
| CompileUnitTreeItem* findCompileUnitParent() | |||
| { | |||
| for (TreeViewItem* p = getParentItem(); p != nullptr; p = p->getParentItem()) | |||
| if (auto cu = dynamic_cast<CompileUnitTreeItem*> (p)) | |||
| return cu; | |||
| return nullptr; | |||
| } | |||
| void showOverlays() | |||
| { | |||
| overlay.deleteAndZero(); | |||
| if (ProjectContentComponent* pcc = getProjectContentComponent()) | |||
| { | |||
| if (auto* ed = dynamic_cast<SourceCodeEditor*> (pcc->getEditorComponent())) | |||
| { | |||
| auto start = CodeDocument::Position (ed->editor->getDocument(), message.range.range.getStart()); | |||
| auto end = CodeDocument::Position (ed->editor->getDocument(), message.range.range.getEnd()); | |||
| if (auto* ce = dynamic_cast<LiveBuildCodeEditor*> (ed->editor.get())) | |||
| overlay = ce->addDiagnosticOverlay (start, end, message.type); | |||
| } | |||
| } | |||
| for (int i = 0; i < getNumSubItems(); ++i) | |||
| if (auto* e = dynamic_cast<ErrorMessageTreeItem*> (getSubItem (i))) | |||
| e->showOverlays(); | |||
| } | |||
| DiagnosticMessage message; | |||
| private: | |||
| String uniqueID; | |||
| TextLayout text; | |||
| int itemHeight; | |||
| Component::SafePointer<Component> overlay; | |||
| }; | |||
| }; | |||
| @@ -1,111 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| //============================================================================== | |||
| struct ActivityList : public ChangeBroadcaster | |||
| { | |||
| ActivityList() {} | |||
| void setList (const StringArray& newList) | |||
| { | |||
| checkThread(); | |||
| if (activities != newList) | |||
| { | |||
| const bool wasEmpty = isEmpty(); | |||
| activities = newList; | |||
| sendChangeMessage(); | |||
| if (wasEmpty != isEmpty()) | |||
| ProjucerApplication::getCommandManager().commandStatusChanged(); | |||
| } | |||
| } | |||
| void clear() | |||
| { | |||
| setList (StringArray()); | |||
| } | |||
| StringArray getActivities() const | |||
| { | |||
| checkThread(); | |||
| StringArray s; | |||
| for (auto a : activities) | |||
| s.add (a.upToFirstOccurrenceOf ("|||", false, false)); | |||
| return s; | |||
| } | |||
| bool isEmpty() const noexcept | |||
| { | |||
| return activities.size() == 0; | |||
| } | |||
| int getNumActivities() const | |||
| { | |||
| checkThread(); | |||
| return activities.size(); | |||
| } | |||
| struct Listener | |||
| { | |||
| virtual ~Listener() {} | |||
| virtual void classListChanged (const ClassDatabase::ClassList&) = 0; | |||
| }; | |||
| void addListener (Listener* l) | |||
| { | |||
| checkThread(); | |||
| listeners.add (l); | |||
| } | |||
| void removeListener (Listener* l) | |||
| { | |||
| checkThread(); | |||
| listeners.remove (l); | |||
| } | |||
| void sendClassListChangedMessage (const ClassDatabase::ClassList& newList) | |||
| { | |||
| checkThread(); | |||
| listeners.call ([&] (Listener& l) { l.classListChanged (newList); }); | |||
| } | |||
| private: | |||
| StringArray activities; | |||
| ListenerList<Listener> listeners; | |||
| static void checkThread() | |||
| { | |||
| JUCE_ASSERT_MESSAGE_THREAD | |||
| } | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ActivityList) | |||
| }; | |||
| @@ -1,731 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| //============================================================================== | |||
| struct ClassDatabase | |||
| { | |||
| //============================================================================== | |||
| struct MemberInfo | |||
| { | |||
| enum CodeLocationType | |||
| { | |||
| declaration = 0, | |||
| addedToParent, | |||
| setBoundsParamX, | |||
| setBoundsParamY, | |||
| setBoundsParamW, | |||
| setBoundsParamH, | |||
| // WARNING! When you change any of these, also update the copy that lives in the live editing code | |||
| numCodeLocationTypes | |||
| }; | |||
| MemberInfo() {} | |||
| MemberInfo (const MemberInfo& other) | |||
| : name (other.name), type (other.type) | |||
| { | |||
| for (int i = 0; i < numCodeLocationTypes; ++i) | |||
| locations[i] = other.locations[i]; | |||
| } | |||
| MemberInfo (const String& nm, const String& ty) | |||
| : name (nm), type (ty) | |||
| { | |||
| } | |||
| MemberInfo (const ValueTree& v) | |||
| : name (v [Ids::name].toString()), | |||
| type (v [Ids::class_].toString()) | |||
| { | |||
| for (int i = 0; i < numCodeLocationTypes; ++i) | |||
| locations[i] = v [getIdentifierForCodeLocationType (i)].toString(); | |||
| } | |||
| const String& getName() const { return name; } | |||
| const String& getType() const { return type; } | |||
| const SourceCodeRange& getLocation (CodeLocationType t) const | |||
| { | |||
| return locations[t]; | |||
| } | |||
| void setLocation (CodeLocationType t, const SourceCodeRange& range) | |||
| { | |||
| locations[t] = range; | |||
| } | |||
| void mergeWith (const MemberInfo& other) | |||
| { | |||
| jassert (name == other.name); | |||
| if (other.type.isNotEmpty()) | |||
| type = other.type; | |||
| for (int i = 0; i < numCodeLocationTypes; ++i) | |||
| if (other.locations[i].isValid()) | |||
| locations[i] = other.locations[i]; | |||
| } | |||
| void nudgeAllCodeRanges (const String& file, const int insertPoint, const int delta) | |||
| { | |||
| for (int i = 0; i < numCodeLocationTypes; ++i) | |||
| locations[i].nudge (file, insertPoint, delta); | |||
| } | |||
| void fileContentChanged (const String& file) | |||
| { | |||
| for (int i = 0; i < numCodeLocationTypes; ++i) | |||
| locations[i].fileContentChanged (file); | |||
| } | |||
| ValueTree toValueTree() const | |||
| { | |||
| ValueTree m (Ids::MEMBER); | |||
| m.setProperty (Ids::name, name, nullptr); | |||
| m.setProperty (Ids::class_, type, nullptr); | |||
| for (int i = 0; i < numCodeLocationTypes; ++i) | |||
| locations[i].writeToValueTree (m, getIdentifierForCodeLocationType (i)); | |||
| return m; | |||
| } | |||
| private: | |||
| String name, type; | |||
| SourceCodeRange locations [numCodeLocationTypes]; | |||
| static Identifier getIdentifierForCodeLocationType (int typeIndex) | |||
| { | |||
| // (These need to remain in order) | |||
| static_assert (setBoundsParamX + 1 == setBoundsParamY && setBoundsParamY + 1 == setBoundsParamW | |||
| && setBoundsParamW + 1 == setBoundsParamH, ""); | |||
| static const Identifier ids[] = | |||
| { | |||
| "declaration", | |||
| "addedToParent", | |||
| "setBoundsParamX", | |||
| "setBoundsParamY", | |||
| "setBoundsParamW", | |||
| "setBoundsParamH" | |||
| }; | |||
| return ids [typeIndex]; | |||
| } | |||
| }; | |||
| //============================================================================== | |||
| struct MethodInfo | |||
| { | |||
| MethodInfo() {} | |||
| MethodInfo (const MethodInfo& other) | |||
| : name (other.name), returnType (other.returnType), | |||
| declaration (other.declaration), definition (other.definition), | |||
| numArgs (other.numArgs), flags (other.flags) | |||
| { | |||
| } | |||
| String name, returnType; | |||
| SourceCodeRange declaration, definition; | |||
| int numArgs, flags; | |||
| enum | |||
| { | |||
| isConstructor = 1, | |||
| isDefaultConstructor = 2, | |||
| isTemplated = 4, | |||
| isPublic = 8 | |||
| }; | |||
| MethodInfo (const ValueTree& v) | |||
| : name (v[Ids::name].toString()), | |||
| returnType (v[Ids::returnType].toString()), | |||
| declaration (v[Ids::declaration].toString()), | |||
| definition (v[Ids::definition].toString()), | |||
| numArgs (v[Ids::numArgs]), | |||
| flags (v[Ids::flags]) | |||
| { | |||
| } | |||
| ValueTree toValueTree() const | |||
| { | |||
| ValueTree m (Ids::METHOD); | |||
| m.setProperty (Ids::name, name, nullptr); | |||
| m.setProperty (Ids::returnType, returnType, nullptr); | |||
| m.setProperty (Ids::numArgs, numArgs, nullptr); | |||
| m.setProperty (Ids::flags, flags, nullptr); | |||
| declaration.writeToValueTree (m, Ids::declaration); | |||
| definition.writeToValueTree (m, Ids::definition); | |||
| return m; | |||
| } | |||
| void nudgeAllCodeRanges (const String& file, const int insertPoint, const int delta) | |||
| { | |||
| declaration.nudge (file, insertPoint, delta); | |||
| definition.nudge (file, insertPoint, delta); | |||
| } | |||
| void fileContentChanged (const String& file) | |||
| { | |||
| declaration.fileContentChanged (file); | |||
| definition.fileContentChanged (file); | |||
| } | |||
| }; | |||
| //============================================================================== | |||
| struct InstantiationFlags | |||
| { | |||
| InstantiationFlags() | |||
| : isAbstract (false), | |||
| inAnonymousNamespace (false), | |||
| noDefaultConstructor (false) | |||
| {} | |||
| bool canBeInstantiated() const noexcept | |||
| { | |||
| return ! (isAbstract || inAnonymousNamespace || noDefaultConstructor); | |||
| } | |||
| String getReasonForUnavailability() const | |||
| { | |||
| if (isAbstract) return "This class is abstract"; | |||
| if (noDefaultConstructor) return "This class has no default constructor"; | |||
| if (inAnonymousNamespace) return "This class is declared inside an anonymous namespace"; | |||
| return String(); | |||
| } | |||
| bool isDisallowed (const InstantiationFlags& disallowedFlags) const | |||
| { | |||
| return ! ((disallowedFlags.isAbstract && isAbstract) | |||
| || (disallowedFlags.inAnonymousNamespace && inAnonymousNamespace) | |||
| || (disallowedFlags.noDefaultConstructor && noDefaultConstructor)); | |||
| } | |||
| bool isAbstract; | |||
| bool inAnonymousNamespace; | |||
| bool noDefaultConstructor; | |||
| }; | |||
| //============================================================================== | |||
| struct Class | |||
| { | |||
| Class() {} | |||
| ~Class() {} | |||
| Class (const Class& other) | |||
| : className (other.className), members (other.members), | |||
| methods (other.methods), classDeclaration (other.classDeclaration), | |||
| instantiationFlags (other.instantiationFlags) | |||
| { | |||
| } | |||
| Class (const String& name, const InstantiationFlags& flags, | |||
| const Array<MemberInfo>& m, | |||
| const Array<MethodInfo>& meth, | |||
| const SourceCodeRange& classDeclarationRange) | |||
| : className (name), | |||
| members (m), methods (meth), | |||
| classDeclaration (classDeclarationRange), | |||
| instantiationFlags (flags) | |||
| { | |||
| } | |||
| Class& operator= (const Class& other) | |||
| { | |||
| className = other.className; | |||
| members = other.members; | |||
| methods = other.methods; | |||
| classDeclaration = other.classDeclaration; | |||
| instantiationFlags = other.instantiationFlags; | |||
| return *this; | |||
| } | |||
| const String& getName() const noexcept { return className; } | |||
| const InstantiationFlags& getInstantiationFlags() const | |||
| { | |||
| return instantiationFlags; | |||
| } | |||
| void setInstantiationFlags (const InstantiationFlags& newFlags) | |||
| { | |||
| instantiationFlags = newFlags; | |||
| } | |||
| const SourceCodeRange& getClassDeclarationRange() const | |||
| { | |||
| return classDeclaration; | |||
| } | |||
| const MemberInfo* findMember (const String& memberName) const | |||
| { | |||
| for (auto& m : members) | |||
| if (m.getName() == memberName) | |||
| return &m; | |||
| return nullptr; | |||
| } | |||
| MemberInfo* findMember (const String& memberName) | |||
| { | |||
| return const_cast<MemberInfo*> (static_cast<const Class&>(*this).findMember (memberName)); | |||
| } | |||
| const MethodInfo* getDefaultConstructor() const | |||
| { | |||
| for (const MethodInfo& m : methods) | |||
| if ((m.flags & MethodInfo::isDefaultConstructor) != 0) | |||
| return &m; | |||
| return nullptr; | |||
| } | |||
| const MethodInfo* getConstructor() const | |||
| { | |||
| if (const MethodInfo* m = getDefaultConstructor()) | |||
| return m; | |||
| for (const MethodInfo& m : methods) | |||
| if ((m.flags & MethodInfo::isConstructor) != 0) | |||
| return &m; | |||
| return nullptr; | |||
| } | |||
| const MethodInfo* getResizedMethod() const | |||
| { | |||
| for (const MethodInfo& m : methods) | |||
| if (m.name == "resized" && m.numArgs == 0) | |||
| return &m; | |||
| return nullptr; | |||
| } | |||
| File getMainSourceFile() const | |||
| { | |||
| if (const MethodInfo* m = getResizedMethod()) | |||
| if (m->definition.isValid()) | |||
| return m->definition.file; | |||
| if (const MethodInfo* m = getConstructor()) | |||
| if (m->definition.isValid()) | |||
| return m->definition.file; | |||
| for (auto& m : methods) | |||
| if (m.definition.isValid() && File (m.definition.file).hasFileExtension ("cpp;mm")) | |||
| return m.definition.file; | |||
| for (auto& m : methods) | |||
| if ((m.flags & MethodInfo::isConstructor) != 0 && m.definition.isValid()) | |||
| return m.definition.file; | |||
| for (auto& m : methods) | |||
| if (m.definition.isValid() && File (m.definition.file).exists()) | |||
| return m.definition.file; | |||
| return {}; | |||
| } | |||
| Array<File> getAllSourceFiles() const | |||
| { | |||
| Array<File> files; | |||
| for (const MethodInfo& m : methods) | |||
| { | |||
| files.addIfNotAlreadyThere (m.declaration.file); | |||
| files.addIfNotAlreadyThere (m.definition.file); | |||
| } | |||
| return files; | |||
| } | |||
| bool isDeclaredInFile (const File& file) const | |||
| { | |||
| return file == classDeclaration.file; | |||
| } | |||
| void mergeWith (const Class& other) | |||
| { | |||
| jassert (*this == other); | |||
| if (other.classDeclaration.isValid()) | |||
| classDeclaration = other.classDeclaration; | |||
| for (auto& m : other.members) | |||
| { | |||
| if (auto* existing = findMember (m.getName())) | |||
| existing->mergeWith (m); | |||
| else | |||
| members.add (m); | |||
| } | |||
| } | |||
| void nudgeAllCodeRanges (const String& file, int index, int delta) | |||
| { | |||
| for (MemberInfo& m : members) m.nudgeAllCodeRanges (file, index, delta); | |||
| for (MethodInfo& m : methods) m.nudgeAllCodeRanges (file, index, delta); | |||
| classDeclaration.nudge (file, index, delta); | |||
| } | |||
| void fileContentChanged (const String& file) | |||
| { | |||
| for (MemberInfo& m : members) m.fileContentChanged (file); | |||
| for (MethodInfo& m : methods) m.fileContentChanged (file); | |||
| classDeclaration.fileContentChanged (file); | |||
| } | |||
| Class (const ValueTree& v) | |||
| { | |||
| className = v[Ids::name]; | |||
| instantiationFlags.isAbstract = v[Ids::abstract]; | |||
| instantiationFlags.inAnonymousNamespace = v[Ids::anonymous]; | |||
| instantiationFlags.noDefaultConstructor = v[Ids::noDefConstructor]; | |||
| classDeclaration = v [Ids::classDecl].toString(); | |||
| for (int i = 0; i < v.getNumChildren(); ++i) | |||
| members.add (MemberInfo (v.getChild(i))); | |||
| } | |||
| ValueTree toValueTree() const | |||
| { | |||
| ValueTree v (Ids::CLASS); | |||
| v.setProperty (Ids::name, className, nullptr); | |||
| v.setProperty (Ids::abstract, instantiationFlags.isAbstract, nullptr); | |||
| v.setProperty (Ids::anonymous, instantiationFlags.inAnonymousNamespace, nullptr); | |||
| v.setProperty (Ids::noDefConstructor, instantiationFlags.noDefaultConstructor, nullptr); | |||
| classDeclaration.writeToValueTree (v, Ids::classDecl); | |||
| for (const MemberInfo& m : members) | |||
| v.appendChild (m.toValueTree(), nullptr); | |||
| return v; | |||
| } | |||
| bool operator== (const Class& other) const noexcept { return className == other.className; } | |||
| bool operator!= (const Class& other) const noexcept { return ! operator== (other); } | |||
| bool operator< (const Class& other) const noexcept { return className < other.className; } | |||
| const Array<MemberInfo>& getMembers() const { return members; } | |||
| private: | |||
| String className; | |||
| Array<MemberInfo> members; | |||
| Array<MethodInfo> methods; | |||
| SourceCodeRange classDeclaration; | |||
| InstantiationFlags instantiationFlags; | |||
| JUCE_LEAK_DETECTOR (Class) | |||
| JUCE_DECLARE_WEAK_REFERENCEABLE (Class) | |||
| }; | |||
| //============================================================================== | |||
| struct Namespace | |||
| { | |||
| Namespace() : name ("Global Namespace") {} | |||
| Namespace (const String& n, const String& full) : name (n), fullName (full) {} | |||
| bool isEmpty() const noexcept | |||
| { | |||
| for (const auto& n : namespaces) | |||
| if (! n.isEmpty()) | |||
| return false; | |||
| return components.size() == 0; | |||
| } | |||
| int getTotalClassesAndNamespaces() const | |||
| { | |||
| int total = components.size(); | |||
| for (const auto& n : namespaces) | |||
| total += n.getTotalClassesAndNamespaces(); | |||
| return total; | |||
| } | |||
| void add (const Class& c, const String::CharPointerType& localName) | |||
| { | |||
| auto nextDoubleColon = CharacterFunctions::find (localName, CharPointer_ASCII ("::")); | |||
| if (nextDoubleColon.isEmpty()) | |||
| merge (c); | |||
| else | |||
| getOrCreateNamespace (String (localName, nextDoubleColon))->add (c, nextDoubleColon + 2); | |||
| } | |||
| bool containsRecursively (const Class& c) const | |||
| { | |||
| if (components.contains (c)) | |||
| return true; | |||
| for (const auto& n : namespaces) | |||
| if (n.containsRecursively (c)) | |||
| return true; | |||
| return false; | |||
| } | |||
| const Class* findClass (const String& className) const | |||
| { | |||
| for (auto& c : components) | |||
| if (c.getName() == className) | |||
| return &c; | |||
| for (auto& n : namespaces) | |||
| if (auto* c = n.findClass (className)) | |||
| return c; | |||
| return nullptr; | |||
| } | |||
| const MemberInfo* findClassMemberInfo (const String& className, const String& memberName) const | |||
| { | |||
| if (auto* classInfo = findClass (className)) | |||
| return classInfo->findMember (memberName); | |||
| return nullptr; | |||
| } | |||
| void findClassesDeclaredInFile (Array<WeakReference<Class>>& results, const File& file) | |||
| { | |||
| for (int i = 0; i < components.size(); ++i) | |||
| { | |||
| auto& c = components.getReference (i); | |||
| if (c.isDeclaredInFile (file)) | |||
| results.add (&c); | |||
| } | |||
| for (int i = 0; i < namespaces.size(); ++i) | |||
| namespaces.getReference (i).findClassesDeclaredInFile (results, file); | |||
| } | |||
| void merge (const Namespace& other) | |||
| { | |||
| if (components.size() == 0) | |||
| { | |||
| components = other.components; | |||
| } | |||
| else | |||
| { | |||
| for (const auto& c : other.components) | |||
| merge (c); | |||
| } | |||
| for (const auto& n : other.namespaces) | |||
| getOrCreateNamespace (n.name)->merge (n); | |||
| } | |||
| void merge (const Class& c) | |||
| { | |||
| const int existing = components.indexOf (c); | |||
| if (existing < 0) | |||
| components.add (c); | |||
| else | |||
| components.getReference (existing).mergeWith (c); | |||
| } | |||
| Namespace* findNamespace (const String& targetName) | |||
| { | |||
| for (int i = 0; i < namespaces.size(); ++i) | |||
| { | |||
| auto& n = namespaces.getReference (i); | |||
| if (n.name == targetName) | |||
| return &n; | |||
| } | |||
| return nullptr; | |||
| } | |||
| Namespace* createNamespace (const String& newName) | |||
| { | |||
| namespaces.add (Namespace (newName, fullName + "::" + newName)); | |||
| return findNamespace (newName); | |||
| } | |||
| Namespace* getOrCreateNamespace (const String& newName) | |||
| { | |||
| if (auto* existing = findNamespace (newName)) | |||
| return existing; | |||
| return createNamespace (newName); | |||
| } | |||
| void addInstantiableClasses (SortedSet<Class>& classes) const | |||
| { | |||
| for (const auto& c : components) | |||
| if (c.getInstantiationFlags().canBeInstantiated()) | |||
| classes.add (c); | |||
| for (const auto& n : namespaces) | |||
| n.addInstantiableClasses (classes); | |||
| } | |||
| void swapWith (Namespace& other) noexcept | |||
| { | |||
| name.swapWith (other.name); | |||
| components.swapWith (other.components); | |||
| namespaces.swapWith (other.namespaces); | |||
| } | |||
| void nudgeAllCodeRanges (const String& file, int index, int delta) | |||
| { | |||
| for (int i = 0; i < components.size(); ++i) | |||
| components.getReference (i).nudgeAllCodeRanges (file, index, delta); | |||
| for (int i = 0; i < namespaces.size(); ++i) | |||
| namespaces.getReference (i).nudgeAllCodeRanges (file, index, delta); | |||
| } | |||
| void fileContentChanged (const String& file) | |||
| { | |||
| for (int i = 0; i < components.size(); ++i) | |||
| components.getReference (i).fileContentChanged (file); | |||
| for (int i = 0; i < namespaces.size(); ++i) | |||
| namespaces.getReference (i).fileContentChanged (file); | |||
| } | |||
| bool matches (const Namespace& other) const | |||
| { | |||
| if (name == other.name | |||
| && components == other.components | |||
| && namespaces.size() == other.namespaces.size()) | |||
| { | |||
| for (int i = namespaces.size(); --i >= 0;) | |||
| if (! namespaces.getReference (i).matches (other.namespaces.getReference (i))) | |||
| return false; | |||
| return true; | |||
| } | |||
| return false; | |||
| } | |||
| void getAllClassNames (StringArray& results, const InstantiationFlags& disallowedFlags) const | |||
| { | |||
| for (const auto& c : components) | |||
| if (c.getInstantiationFlags().isDisallowed (disallowedFlags)) | |||
| results.add (c.getName()); | |||
| for (const auto& n : namespaces) | |||
| n.getAllClassNames (results, disallowedFlags); | |||
| } | |||
| ValueTree toValueTree() const | |||
| { | |||
| ValueTree v (Ids::CLASSLIST); | |||
| v.setProperty (Ids::name, name, nullptr); | |||
| for (const auto& c : components) v.appendChild (c.toValueTree(), nullptr); | |||
| for (const auto& n : namespaces) v.appendChild (n.toValueTree(), nullptr); | |||
| return v; | |||
| } | |||
| void loadFromValueTree (const ValueTree& v) | |||
| { | |||
| name = v[Ids::name]; | |||
| for (int i = 0; i < v.getNumChildren(); ++i) | |||
| { | |||
| const ValueTree c (v.getChild(i)); | |||
| if (c.hasType (Ids::CLASS)) | |||
| components.add (Class (c)); | |||
| else if (c.hasType (Ids::CLASSLIST)) | |||
| createNamespace (c[Ids::name])->loadFromValueTree (c); | |||
| } | |||
| } | |||
| bool operator== (const Namespace& other) const noexcept { return name == other.name; } | |||
| bool operator!= (const Namespace& other) const noexcept { return ! operator== (other); } | |||
| bool operator< (const Namespace& other) const noexcept { return name < other.name; } | |||
| String name, fullName; | |||
| SortedSet<Class> components; | |||
| SortedSet<Namespace> namespaces; | |||
| JUCE_LEAK_DETECTOR (Namespace) | |||
| }; | |||
| struct ClassList | |||
| { | |||
| ClassList() {} | |||
| void clear() | |||
| { | |||
| Namespace newNamespace; | |||
| globalNamespace.swapWith (newNamespace); | |||
| } | |||
| void registerComp (const Class& comp) | |||
| { | |||
| globalNamespace.add (comp, comp.getName().getCharPointer()); | |||
| } | |||
| void merge (const ClassList& other) | |||
| { | |||
| globalNamespace.merge (other.globalNamespace); | |||
| } | |||
| void swapWith (ClassList& other) noexcept | |||
| { | |||
| globalNamespace.swapWith (other.globalNamespace); | |||
| } | |||
| //============================================================================== | |||
| ValueTree toValueTree() const | |||
| { | |||
| return globalNamespace.toValueTree(); | |||
| } | |||
| static ClassList fromValueTree (const ValueTree& v) | |||
| { | |||
| ClassList l; | |||
| l.globalNamespace.loadFromValueTree (v); | |||
| return l; | |||
| } | |||
| Namespace globalNamespace; | |||
| bool operator== (const ClassList& other) const noexcept { return globalNamespace.matches (other.globalNamespace); } | |||
| bool operator!= (const ClassList& other) const noexcept { return ! operator== (other); } | |||
| private: | |||
| JUCE_LEAK_DETECTOR (ClassList) | |||
| }; | |||
| }; | |||
| @@ -1,295 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| //============================================================================== | |||
| struct MessageHandler | |||
| { | |||
| virtual ~MessageHandler() {} | |||
| virtual bool sendMessage (const ValueTree&) = 0; | |||
| static MemoryBlock convertMessage (const ValueTree& tree) | |||
| { | |||
| MemoryOutputStream out; | |||
| tree.writeToStream (out); | |||
| return out.getMemoryBlock(); | |||
| } | |||
| static ValueTree convertMessage (const MemoryBlock& rawData) | |||
| { | |||
| return ValueTree::readFromData (rawData.getData(), rawData.getSize()); | |||
| } | |||
| }; | |||
| //============================================================================== | |||
| static inline Rectangle<int> varToRect (const var& v) | |||
| { | |||
| if (const Array<var>* obj = v.getArray()) | |||
| { | |||
| if (obj->size() == 4) | |||
| { | |||
| int intArray[4]; | |||
| for (int i = 0; i < 4; ++i) | |||
| { | |||
| const var& p = obj->getReference (i); | |||
| if (p.isInt() || p.isDouble() || p.isInt64()) | |||
| intArray[i] = static_cast<int> (p); | |||
| else | |||
| return Rectangle<int>(); | |||
| } | |||
| return Rectangle<int> (intArray[0], intArray[1], intArray[2], intArray[3]); | |||
| } | |||
| } | |||
| return Rectangle<int>(); | |||
| } | |||
| static inline var rectToVar (const Rectangle<int>& rect) | |||
| { | |||
| Array<var> retval; | |||
| retval.add (var (rect.getX())); | |||
| retval.add (var (rect.getY())); | |||
| retval.add (var (rect.getWidth())); | |||
| retval.add (var (rect.getHeight())); | |||
| return var (retval); | |||
| } | |||
| //============================================================================== | |||
| namespace MessageTypes | |||
| { | |||
| inline bool send (MessageHandler& target, const ValueTree& v) | |||
| { | |||
| bool result = target.sendMessage (v); | |||
| if (! result) | |||
| Logger::outputDebugString ("*** Message failed: " + v.getType().toString()); | |||
| return result; | |||
| } | |||
| inline bool sendPing (MessageHandler& target) | |||
| { | |||
| return send (target, ValueTree (PING)); | |||
| } | |||
| //============================================================================== | |||
| // client -> server | |||
| inline void sendOpenPreview (MessageHandler& target, const ClassDatabase::Class& comp, Rectangle<int> mainWindowRect) | |||
| { | |||
| ValueTree v (OPEN_PREVIEW); | |||
| v.setProperty (Ids::name, comp.getName(), nullptr); | |||
| v.setProperty (Ids::bounds, rectToVar (mainWindowRect), nullptr); | |||
| send (target, v); | |||
| } | |||
| inline void sendReinstantiate (MessageHandler& target) | |||
| { | |||
| send (target, ValueTree (RELOAD)); | |||
| } | |||
| inline void sendFileChanges (MessageHandler& target, const Array<CodeChange>& changes, const File& file) | |||
| { | |||
| ValueTree changesMessage (MessageTypes::LIVE_FILE_CHANGES); | |||
| changesMessage.setProperty (Ids::file, file.getFullPathName(), nullptr); | |||
| for (const CodeChange& change : changes) | |||
| { | |||
| ValueTree v (CHANGE); | |||
| v.setProperty (Ids::start, change.range.getStart(), nullptr); | |||
| v.setProperty (Ids::end, change.range.getEnd(), nullptr); | |||
| v.setProperty (Ids::text, change.text, nullptr); | |||
| changesMessage.appendChild (v, nullptr); | |||
| } | |||
| send (target, changesMessage); | |||
| } | |||
| inline Array<CodeChange> getChangeArray (const ValueTree& changes) | |||
| { | |||
| Array<CodeChange> result; | |||
| for (int i = 0; i < changes.getNumChildren(); ++i) | |||
| { | |||
| const ValueTree& v = changes.getChild (i); | |||
| result.add (CodeChange (Range<int> (v[Ids::start], v[Ids::end]), v[Ids::text])); | |||
| } | |||
| return result; | |||
| } | |||
| inline void sendFileContentFullUpdate (MessageHandler& target, const File& file, const String& text) | |||
| { | |||
| ValueTree v (LIVE_FILE_UPDATE); | |||
| v.setProperty (Ids::file, file.getFullPathName(), nullptr); | |||
| v.setProperty (Ids::text, text, nullptr); | |||
| send (target, v); | |||
| } | |||
| inline void sendHandleFileReset (MessageHandler& target, const File& file) | |||
| { | |||
| ValueTree v (LIVE_FILE_RESET); | |||
| v.setProperty (Ids::file, file.getFullPathName(), nullptr); | |||
| send (target, v); | |||
| } | |||
| inline void sendNewBuild (MessageHandler& target, const ProjectBuildInfo& build) | |||
| { | |||
| send (target, build.tree); | |||
| } | |||
| inline void sendCleanAll (MessageHandler& target) | |||
| { | |||
| send (target, ValueTree (CLEAN_ALL)); | |||
| } | |||
| inline void sendNewDiagnosticList (MessageHandler& target, const ValueTree& list) | |||
| { | |||
| send (target, list); | |||
| } | |||
| inline void sendEmptyDiagnosticList (MessageHandler& target) | |||
| { | |||
| send (target, ValueTree (MessageTypes::DIAGNOSTIC_LIST)); | |||
| } | |||
| inline void sendProcessActivationState (MessageHandler& target, bool isNowActive) | |||
| { | |||
| ValueTree v (FOREGROUND); | |||
| v.setProperty (Ids::parentActive, isNowActive, nullptr); | |||
| send (target, v); | |||
| } | |||
| inline void sendLaunchApp (MessageHandler& target) { send (target, ValueTree (LAUNCH_APP)); } | |||
| inline void sendQuit (MessageHandler& target) { send (target, ValueTree (QUIT_SERVER)); } | |||
| inline void sendShouldCloseIDE (MessageHandler& target) { send (target, ValueTree (QUIT_IDE)); } | |||
| //============================================================================== | |||
| // server -> client | |||
| inline void sendNewClassList (MessageHandler& target, const ClassDatabase::ClassList& classes) | |||
| { | |||
| send (target, classes.toValueTree()); | |||
| } | |||
| inline void sendCrash (MessageHandler& target, const String& message) | |||
| { | |||
| ValueTree v (CRASH); | |||
| v.setProperty (Ids::message, message, nullptr); | |||
| send (target, v); | |||
| } | |||
| inline void sendSystemHeadersMissing (MessageHandler& target) | |||
| { | |||
| send (target, ValueTree (MISSING_SYSTEM_HEADERS)); | |||
| } | |||
| inline void sendBuildFailed (MessageHandler& target) | |||
| { | |||
| send (target, ValueTree (BUILD_FAILED)); | |||
| } | |||
| inline void sendNewActivityList (MessageHandler& target, const StringArray& list) | |||
| { | |||
| ValueTree v (ACTIVITY_LIST); | |||
| v.setProperty (Ids::list, concatenateListOfStrings (list), nullptr); | |||
| send (target, v); | |||
| } | |||
| inline void sendChangeCode (MessageHandler& target, const String& location, const String& newText) | |||
| { | |||
| if (location.isNotEmpty()) | |||
| { | |||
| ValueTree v (CHANGE_CODE); | |||
| v.setProperty (Ids::position, location, nullptr); | |||
| v.setProperty (Ids::text, newText, nullptr); | |||
| send (target, v); | |||
| } | |||
| } | |||
| inline void sendHighlightCode (MessageHandler& target, const String& location) | |||
| { | |||
| if (location.isNotEmpty()) | |||
| { | |||
| ValueTree v (HIGHLIGHT_CODE); | |||
| v.setProperty (Ids::position, location, nullptr); | |||
| send (target, v); | |||
| } | |||
| } | |||
| inline void sendAppLaunched (MessageHandler& target) { send (target, ValueTree (LAUNCHED)); } | |||
| inline void sendAppQuit (MessageHandler& target) { send (target, ValueTree (APPQUIT)); } | |||
| inline void sendKeyPress (MessageHandler& target, const String& className, const String& keyDesc) | |||
| { | |||
| ValueTree v (KEY); | |||
| v.setProperty (Ids::class_, className, nullptr); | |||
| v.setProperty (Ids::key, keyDesc, nullptr); | |||
| send (target, v); | |||
| } | |||
| //============================================================================== | |||
| template <class MessageHandlerType> | |||
| static void dispatchToClient (MessageHandlerType& target, const ValueTree& v) | |||
| { | |||
| if (v.hasType (DIAGNOSTIC_LIST)) target.handleNewDiagnosticList (v); | |||
| else if (v.hasType (ACTIVITY_LIST)) target.handleActivityListChanged (separateJoinedStrings (v [Ids::list])); | |||
| else if (v.hasType (Ids::CLASSLIST)) target.handleClassListChanged (v); | |||
| else if (v.hasType (BUILD_FAILED)) target.handleBuildFailed(); | |||
| else if (v.hasType (CHANGE_CODE)) target.handleChangeCode (v [Ids::position].toString(), v [Ids::text]); | |||
| else if (v.hasType (HIGHLIGHT_CODE)) target.handleHighlightCode (v [Ids::position].toString()); | |||
| else if (v.hasType (LAUNCHED)) target.handleAppLaunched(); | |||
| else if (v.hasType (APPQUIT)) target.handleAppQuit(); | |||
| else if (v.hasType (PING)) target.handlePing(); | |||
| else if (v.hasType (CRASH)) target.handleCrash (v [Ids::message]); | |||
| else if (v.hasType (KEY)) target.handleKeyPress (v[Ids::class_], KeyPress::createFromDescription (v[Ids::key])); | |||
| else if (v.hasType (QUIT_IDE)) target.handleCloseIDE(); | |||
| else if (v.hasType (MISSING_SYSTEM_HEADERS)) target.handleMissingSystemHeaders(); | |||
| else jassertfalse; | |||
| } | |||
| template <class MessageHandlerType> | |||
| static void dispatchToServer (MessageHandlerType& target, const ValueTree& v) | |||
| { | |||
| if (v.hasType (CLEAN_ALL)) target.handleCleanAll(); | |||
| else if (v.hasType (BUILDINFO)) target.handleNewBuildSettings (ProjectBuildInfo (v)); | |||
| else if (v.hasType (OPEN_PREVIEW)) target.handleOpenPreview (v[Ids::name], varToRect (v[Ids::bounds])); | |||
| else if (v.hasType (RELOAD)) target.handleReinstantiatePreviews(); | |||
| else if (v.hasType (LAUNCH_APP)) target.handleLaunchApp(); | |||
| else if (v.hasType (LIVE_FILE_CHANGES)) target.handleLiveFileChanges (v[Ids::file].toString(), getChangeArray (v)); | |||
| else if (v.hasType (LIVE_FILE_UPDATE)) target.handleLiveFileFullUpdate (v[Ids::file].toString(), v[Ids::text]); | |||
| else if (v.hasType (LIVE_FILE_RESET)) target.handleResetLiveFileContent (v[Ids::file].toString()); | |||
| else if (v.hasType (FOREGROUND)) target.handleProcessActivationState (v[Ids::parentActive]); | |||
| else if (v.hasType (PING)) target.handlePing(); | |||
| else jassertfalse; | |||
| } | |||
| } | |||
| @@ -1,907 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #include "../Application/jucer_Headers.h" | |||
| #include "../Application/jucer_Application.h" | |||
| #include "../ProjectSaving/jucer_ProjectExporter.h" | |||
| #include "jucer_MessageIDs.h" | |||
| #include "jucer_CppHelpers.h" | |||
| #include "jucer_SourceCodeRange.h" | |||
| #include "jucer_ClassDatabase.h" | |||
| #include "jucer_DiagnosticMessage.h" | |||
| #include "jucer_ProjectBuildInfo.h" | |||
| #include "jucer_ClientServerMessages.h" | |||
| #include "jucer_CompileEngineClient.h" | |||
| #include "jucer_CompileEngineServer.h" | |||
| #include "jucer_CompileEngineSettings.h" | |||
| #include "../Project/UI/jucer_ProjectContentComponent.h" | |||
| #ifndef RUN_CLANG_IN_CHILD_PROCESS | |||
| #error | |||
| #endif | |||
| //============================================================================== | |||
| static File getProjucerTempFolder() noexcept | |||
| { | |||
| #if JUCE_MAC | |||
| return { "~/Library/Caches/com.juce.projucer" }; | |||
| #else | |||
| return File::getSpecialLocation (File::tempDirectory).getChildFile ("com.juce.projucer"); | |||
| #endif | |||
| } | |||
| static File getCacheLocationForProject (Project& project) noexcept | |||
| { | |||
| auto cacheFolderName = project.getProjectFilenameRootString() + "_" + project.getProjectUIDString(); | |||
| #if JUCE_DEBUG | |||
| cacheFolderName += "_debug"; | |||
| #endif | |||
| return getProjucerTempFolder().getChildFile ("Intermediate Files").getChildFile (cacheFolderName); | |||
| } | |||
| //============================================================================== | |||
| class ClientIPC : public MessageHandler, | |||
| private InterprocessConnection, | |||
| private Timer | |||
| { | |||
| public: | |||
| explicit ClientIPC (CompileEngineChildProcess& cp) | |||
| : InterprocessConnection (true), owner (cp) | |||
| { | |||
| launchServer(); | |||
| } | |||
| ~ClientIPC() | |||
| { | |||
| #if RUN_CLANG_IN_CHILD_PROCESS | |||
| if (childProcess.isRunning()) | |||
| { | |||
| #if JUCE_DEBUG | |||
| killServerPolitely(); | |||
| #else | |||
| // in release builds we don't want to wait | |||
| // for the server to clean up and shut down | |||
| killServerWithoutMercy(); | |||
| #endif | |||
| } | |||
| #endif | |||
| } | |||
| void launchServer() | |||
| { | |||
| DBG ("Client: Launching Server..."); | |||
| auto pipeName = "ipc_" + String::toHexString (Random().nextInt64()); | |||
| auto command = createCommandLineForLaunchingServer (pipeName, owner.project.getProjectUIDString(), | |||
| getCacheLocationForProject (owner.project)); | |||
| #if RUN_CLANG_IN_CHILD_PROCESS | |||
| if (! childProcess.start (command)) | |||
| jassertfalse; | |||
| #else | |||
| server = createClangServer (command); | |||
| #endif | |||
| for (int i = 0; i < 20; ++i) | |||
| { | |||
| if (connectToPipe (pipeName, 10000)) | |||
| { | |||
| MessageTypes::sendPing (*this); | |||
| break; | |||
| } | |||
| Thread::sleep (50); | |||
| } | |||
| jassert (isConnected()); | |||
| startTimer (serverKeepAliveTimeout); | |||
| } | |||
| void killServerPolitely() | |||
| { | |||
| DBG ("Client: Killing Server..."); | |||
| MessageTypes::sendQuit (*this); | |||
| disconnect(); | |||
| stopTimer(); | |||
| #if RUN_CLANG_IN_CHILD_PROCESS | |||
| childProcess.waitForProcessToFinish (5000); | |||
| #endif | |||
| killServerWithoutMercy(); | |||
| } | |||
| void killServerWithoutMercy() | |||
| { | |||
| disconnect(); | |||
| stopTimer(); | |||
| #if RUN_CLANG_IN_CHILD_PROCESS | |||
| childProcess.kill(); | |||
| #else | |||
| destroyClangServer (server); | |||
| server = nullptr; | |||
| #endif | |||
| } | |||
| void connectionMade() | |||
| { | |||
| DBG ("Client: connected"); | |||
| stopTimer(); | |||
| } | |||
| void connectionLost() | |||
| { | |||
| DBG ("Client: disconnected"); | |||
| startTimer (100); | |||
| } | |||
| bool sendMessage (const ValueTree& m) | |||
| { | |||
| return InterprocessConnection::sendMessage (MessageHandler::convertMessage (m)); | |||
| } | |||
| void messageReceived (const MemoryBlock& message) | |||
| { | |||
| #if RUN_CLANG_IN_CHILD_PROCESS | |||
| startTimer (serverKeepAliveTimeout); | |||
| #else | |||
| stopTimer(); | |||
| #endif | |||
| MessageTypes::dispatchToClient (owner, MessageHandler::convertMessage (message)); | |||
| } | |||
| enum { serverKeepAliveTimeout = 10000 }; | |||
| private: | |||
| CompileEngineChildProcess& owner; | |||
| #if RUN_CLANG_IN_CHILD_PROCESS | |||
| ChildProcess childProcess; | |||
| #else | |||
| void* server; | |||
| #endif | |||
| void timerCallback() | |||
| { | |||
| stopTimer(); | |||
| owner.handleCrash (String()); | |||
| } | |||
| }; | |||
| //============================================================================== | |||
| class CompileEngineChildProcess::ChildProcess : private ValueTree::Listener, | |||
| private Timer | |||
| { | |||
| public: | |||
| ChildProcess (CompileEngineChildProcess& proc, Project& p) | |||
| : owner (proc), project (p) | |||
| { | |||
| projectRoot = project.getProjectRoot(); | |||
| restartServer(); | |||
| projectRoot.addListener (this); | |||
| openedOk = true; | |||
| } | |||
| ~ChildProcess() override | |||
| { | |||
| projectRoot.removeListener (this); | |||
| if (isRunningApp && server != nullptr) | |||
| server->killServerWithoutMercy(); | |||
| } | |||
| void restartServer() | |||
| { | |||
| server.reset (new ClientIPC (owner)); | |||
| sendRebuild(); | |||
| } | |||
| void sendRebuild() | |||
| { | |||
| stopTimer(); | |||
| ProjectBuildInfo build; | |||
| if (! doesProjectMatchSavedHeaderState (project)) | |||
| { | |||
| MessageTypes::sendNewBuild (*server, build); | |||
| owner.errorList.resetToError ("Project structure does not match the saved headers! " | |||
| "Please re-save your project to enable compilation"); | |||
| return; | |||
| } | |||
| if (areAnyModulesMissing (project)) | |||
| { | |||
| MessageTypes::sendNewBuild (*server, build); | |||
| owner.errorList.resetToError ("Some of your JUCE modules can't be found! " | |||
| "Please check that all the module paths are correct"); | |||
| return; | |||
| } | |||
| build.setSystemIncludes (getSystemIncludePaths()); | |||
| build.setUserIncludes (getUserIncludes()); | |||
| build.setGlobalDefs (getGlobalDefs()); | |||
| build.setCompileFlags (project.getCompileEngineSettings().getExtraCompilerFlagsString()); | |||
| build.setExtraDLLs (getExtraDLLs()); | |||
| build.setJuceModulesFolder (project.getEnabledModules().getDefaultModulesFolder().getFullPathName()); | |||
| build.setUtilsCppInclude (project.getAppIncludeFile().getFullPathName()); | |||
| build.setWindowsTargetPlatformVersion (project.getCompileEngineSettings().getWindowsTargetPlatformVersionString()); | |||
| scanForProjectFiles (project, build); | |||
| owner.updateAllEditors(); | |||
| MessageTypes::sendNewBuild (*server, build); | |||
| } | |||
| void cleanAll() | |||
| { | |||
| MessageTypes::sendCleanAll (*server); | |||
| sendRebuild(); | |||
| } | |||
| void reinstantiatePreviews() | |||
| { | |||
| MessageTypes::sendReinstantiate (*server); | |||
| } | |||
| bool launchApp() | |||
| { | |||
| MessageTypes::sendLaunchApp (*server); | |||
| return true; | |||
| } | |||
| std::unique_ptr<ClientIPC> server; | |||
| bool openedOk = false; | |||
| bool isRunningApp = false; | |||
| private: | |||
| CompileEngineChildProcess& owner; | |||
| Project& project; | |||
| ValueTree projectRoot; | |||
| void projectStructureChanged() | |||
| { | |||
| startTimer (100); | |||
| } | |||
| void timerCallback() override | |||
| { | |||
| sendRebuild(); | |||
| } | |||
| void valueTreePropertyChanged (ValueTree&, const Identifier&) override { projectStructureChanged(); } | |||
| void valueTreeChildAdded (ValueTree&, ValueTree&) override { projectStructureChanged(); } | |||
| void valueTreeChildRemoved (ValueTree&, ValueTree&, int) override { projectStructureChanged(); } | |||
| void valueTreeParentChanged (ValueTree&) override { projectStructureChanged(); } | |||
| String getGlobalDefs() | |||
| { | |||
| auto mergeDefs = [] (const StringPairArray& inDefs) -> String | |||
| { | |||
| StringArray outDefs; | |||
| for (int i = 0; i < inDefs.size(); ++i) | |||
| { | |||
| auto def = inDefs.getAllKeys()[i]; | |||
| auto value = inDefs.getAllValues()[i]; | |||
| if (value.isNotEmpty()) | |||
| def << "=" << value; | |||
| outDefs.add (def); | |||
| } | |||
| return outDefs.joinIntoString (" "); | |||
| }; | |||
| StringArray defs; | |||
| if (! project.shouldUseAppConfig()) | |||
| defs.add (mergeDefs (project.getAppConfigDefs())); | |||
| defs.add (project.getCompileEngineSettings().getExtraPreprocessorDefsString()); | |||
| defs.add (mergeDefs (project.getPreprocessorDefs())); | |||
| for (Project::ExporterIterator exporter (project); exporter.next();) | |||
| if (exporter->canLaunchProject()) | |||
| defs.add (exporter->getExporterIdentifierMacro() + "=1"); | |||
| defs.removeEmptyStrings(); | |||
| return defs.joinIntoString (" "); | |||
| } | |||
| static void scanProjectItem (const Project::Item& projectItem, Array<File>& compileUnits, Array<File>& userFiles) | |||
| { | |||
| if (projectItem.isGroup()) | |||
| { | |||
| for (int i = 0; i < projectItem.getNumChildren(); ++i) | |||
| scanProjectItem (projectItem.getChild(i), compileUnits, userFiles); | |||
| return; | |||
| } | |||
| if (projectItem.shouldBeCompiled()) | |||
| { | |||
| auto f = projectItem.getFile(); | |||
| if (f.exists()) | |||
| compileUnits.add (f); | |||
| } | |||
| if (projectItem.shouldBeAddedToTargetProject() && ! projectItem.shouldBeAddedToBinaryResources()) | |||
| { | |||
| auto f = projectItem.getFile(); | |||
| if (f.exists()) | |||
| userFiles.add (f); | |||
| } | |||
| } | |||
| void scanForProjectFiles (Project& proj, ProjectBuildInfo& build) | |||
| { | |||
| Array<File> compileUnits, userFiles; | |||
| scanProjectItem (proj.getMainGroup(), compileUnits, userFiles); | |||
| { | |||
| auto isVSTHost = project.getEnabledModules().isModuleEnabled ("juce_audio_processors") | |||
| && (project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST3", false) || project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST", false)); | |||
| auto isPluginProject = proj.isAudioPluginProject(); | |||
| OwnedArray<LibraryModule> modules; | |||
| proj.getEnabledModules().createRequiredModules (modules); | |||
| for (Project::ExporterIterator exporter (proj); exporter.next();) | |||
| { | |||
| if (exporter->canLaunchProject()) | |||
| { | |||
| for (auto* m : modules) | |||
| { | |||
| auto copyLocally = proj.getEnabledModules().shouldCopyModuleFilesLocally (m->moduleInfo.getID()); | |||
| auto localModuleFolder = copyLocally ? proj.getLocalModuleFolder (m->moduleInfo.getID()) | |||
| : m->moduleInfo.getFolder(); | |||
| m->findAndAddCompiledUnits (*exporter, nullptr, compileUnits, | |||
| isPluginProject || isVSTHost ? build_tools::ProjectType::Target::SharedCodeTarget | |||
| : build_tools::ProjectType::Target::unspecified); | |||
| if (isPluginProject || isVSTHost) | |||
| m->findAndAddCompiledUnits (*exporter, nullptr, compileUnits, | |||
| build_tools::ProjectType::Target::StandalonePlugIn); | |||
| } | |||
| break; | |||
| } | |||
| } | |||
| } | |||
| for (int i = 0; ; ++i) | |||
| { | |||
| auto binaryDataCpp = proj.getBinaryDataCppFile (i); | |||
| if (! binaryDataCpp.exists()) | |||
| break; | |||
| compileUnits.add (binaryDataCpp); | |||
| } | |||
| for (auto i = compileUnits.size(); --i >= 0;) | |||
| if (compileUnits.getReference(i).hasFileExtension (".r")) | |||
| compileUnits.remove (i); | |||
| build.setFiles (compileUnits, userFiles); | |||
| } | |||
| static bool doesProjectMatchSavedHeaderState (Project& project) | |||
| { | |||
| auto liveModules = project.getProjectRoot().getChildWithName (Ids::MODULES); | |||
| if (auto xml = parseXMLIfTagMatches (project.getFile(), Ids::JUCERPROJECT.toString())) | |||
| { | |||
| auto diskModules = ValueTree::fromXml (*xml).getChildWithName (Ids::MODULES); | |||
| return liveModules.isEquivalentTo (diskModules); | |||
| } | |||
| return false; | |||
| } | |||
| static bool areAnyModulesMissing (Project& project) | |||
| { | |||
| OwnedArray<LibraryModule> modules; | |||
| project.getEnabledModules().createRequiredModules (modules); | |||
| for (auto* module : modules) | |||
| if (! module->getFolder().isDirectory()) | |||
| return true; | |||
| return false; | |||
| } | |||
| StringArray getUserIncludes() | |||
| { | |||
| StringArray paths; | |||
| paths.add (project.getGeneratedCodeFolder().getFullPathName()); | |||
| paths.addArray (getSearchPathsFromString (project.getCompileEngineSettings().getUserHeaderPathString())); | |||
| return convertSearchPathsToAbsolute (paths); | |||
| } | |||
| StringArray getSystemIncludePaths() | |||
| { | |||
| StringArray paths; | |||
| paths.add (project.getGeneratedCodeFolder().getFullPathName()); | |||
| paths.addArray (getSearchPathsFromString (project.getCompileEngineSettings().getSystemHeaderPathString())); | |||
| auto isVSTHost = project.getEnabledModules().isModuleEnabled ("juce_audio_processors") | |||
| && (project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST3", false) | |||
| || project.isConfigFlagEnabled ("JUCE_PLUGINHOST_VST", false)); | |||
| OwnedArray<LibraryModule> modules; | |||
| project.getEnabledModules().createRequiredModules (modules); | |||
| for (auto* module : modules) | |||
| { | |||
| paths.addIfNotAlreadyThere (module->getFolder().getParentDirectory().getFullPathName()); | |||
| if (module->getID() == "juce_audio_processors" && ((project.isAudioPluginProject() || isVSTHost) | |||
| && ! project.isConfigFlagEnabled ("JUCE_CUSTOM_VST3_SDK"))) | |||
| { | |||
| paths.addIfNotAlreadyThere (module->getFolder().getChildFile ("format_types").getChildFile ("VST3_SDK").getFullPathName()); | |||
| } | |||
| } | |||
| return convertSearchPathsToAbsolute (paths); | |||
| } | |||
| StringArray convertSearchPathsToAbsolute (const StringArray& paths) const | |||
| { | |||
| StringArray s; | |||
| const File root (project.getProjectFolder()); | |||
| for (String p : paths) | |||
| s.add (root.getChildFile (p).getFullPathName()); | |||
| return s; | |||
| } | |||
| StringArray getExtraDLLs() | |||
| { | |||
| auto dlls = StringArray::fromTokens (project.getCompileEngineSettings().getExtraDLLsString(), "\n\r,", {}); | |||
| dlls.trim(); | |||
| dlls.removeEmptyStrings(); | |||
| return dlls; | |||
| } | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcess) | |||
| }; | |||
| //============================================================================== | |||
| CompileEngineChildProcess::CompileEngineChildProcess (Project& p) | |||
| : project (p) | |||
| { | |||
| ProjucerApplication::getApp().openDocumentManager.addListener (this); | |||
| createProcess(); | |||
| errorList.setWarningsEnabled (project.getCompileEngineSettings().areWarningsEnabled()); | |||
| } | |||
| CompileEngineChildProcess::~CompileEngineChildProcess() | |||
| { | |||
| ProjucerApplication::getApp().openDocumentManager.removeListener (this); | |||
| } | |||
| void CompileEngineChildProcess::createProcess() | |||
| { | |||
| jassert (process == nullptr); | |||
| process.reset (new ChildProcess (*this, project)); | |||
| if (! process->openedOk) | |||
| process.reset(); | |||
| updateAllEditors(); | |||
| } | |||
| void CompileEngineChildProcess::cleanAll() | |||
| { | |||
| if (process != nullptr) | |||
| process->cleanAll(); | |||
| } | |||
| void CompileEngineChildProcess::openPreview (const ClassDatabase::Class& comp) | |||
| { | |||
| if (process != nullptr) | |||
| { | |||
| MainWindow* projectWindow = nullptr; | |||
| OwnedArray<MainWindow>& windows = ProjucerApplication::getApp().mainWindowList.windows; | |||
| for (int i = 0; i < windows.size(); ++i) | |||
| { | |||
| if (MainWindow* w = windows[i]) | |||
| { | |||
| if (w->getProject() == &project) | |||
| { | |||
| projectWindow = w; | |||
| break; | |||
| } | |||
| } | |||
| } | |||
| Rectangle<int> mainWindowRect; | |||
| if (projectWindow != nullptr) | |||
| mainWindowRect = projectWindow->getBounds(); | |||
| MessageTypes::sendOpenPreview (*process->server, comp, mainWindowRect); | |||
| } | |||
| } | |||
| void CompileEngineChildProcess::reinstantiatePreviews() | |||
| { | |||
| if (process != nullptr) | |||
| process->reinstantiatePreviews(); | |||
| } | |||
| void CompileEngineChildProcess::processActivationChanged (bool isForeground) | |||
| { | |||
| if (process != nullptr) | |||
| MessageTypes::sendProcessActivationState (*process->server, isForeground); | |||
| } | |||
| //============================================================================== | |||
| bool CompileEngineChildProcess::canLaunchApp() const | |||
| { | |||
| return process != nullptr | |||
| && runningAppProcess == nullptr | |||
| && activityList.getNumActivities() == 0 | |||
| && errorList.getNumErrors() == 0 | |||
| && project.getProjectType().isGUIApplication(); | |||
| } | |||
| void CompileEngineChildProcess::launchApp() | |||
| { | |||
| if (process != nullptr) | |||
| process->launchApp(); | |||
| } | |||
| bool CompileEngineChildProcess::canKillApp() const | |||
| { | |||
| return runningAppProcess != nullptr; | |||
| } | |||
| void CompileEngineChildProcess::killApp() | |||
| { | |||
| runningAppProcess.reset(); | |||
| } | |||
| void CompileEngineChildProcess::handleAppLaunched() | |||
| { | |||
| runningAppProcess.reset (process.release()); | |||
| runningAppProcess->isRunningApp = true; | |||
| createProcess(); | |||
| } | |||
| void CompileEngineChildProcess::handleAppQuit() | |||
| { | |||
| DBG ("handleAppQuit"); | |||
| runningAppProcess.reset(); | |||
| } | |||
| bool CompileEngineChildProcess::isAppRunning() const noexcept | |||
| { | |||
| return runningAppProcess != nullptr && runningAppProcess->isRunningApp; | |||
| } | |||
| //============================================================================== | |||
| struct CompileEngineChildProcess::Editor : private CodeDocument::Listener, | |||
| private Timer | |||
| { | |||
| Editor (CompileEngineChildProcess& ccp, const File& f, CodeDocument& doc) | |||
| : owner (ccp), file (f), document (doc), transactionTimer (doc) | |||
| { | |||
| sendFullUpdate(); | |||
| document.addListener (this); | |||
| } | |||
| ~Editor() override | |||
| { | |||
| document.removeListener (this); | |||
| } | |||
| void codeDocumentTextInserted (const String& newText, int insertIndex) override | |||
| { | |||
| CodeChange (Range<int> (insertIndex, insertIndex), newText).addToList (pendingChanges); | |||
| startEditorChangeTimer(); | |||
| transactionTimer.stopTimer(); | |||
| owner.lastComponentList.globalNamespace | |||
| .nudgeAllCodeRanges (file.getFullPathName(), insertIndex, newText.length()); | |||
| } | |||
| void codeDocumentTextDeleted (int start, int end) override | |||
| { | |||
| CodeChange (Range<int> (start, end), String()).addToList (pendingChanges); | |||
| startEditorChangeTimer(); | |||
| transactionTimer.stopTimer(); | |||
| owner.lastComponentList.globalNamespace | |||
| .nudgeAllCodeRanges (file.getFullPathName(), start, start - end); | |||
| } | |||
| void sendFullUpdate() | |||
| { | |||
| reset(); | |||
| if (owner.process != nullptr) | |||
| MessageTypes::sendFileContentFullUpdate (*owner.process->server, file, document.getAllContent()); | |||
| } | |||
| bool flushEditorChanges() | |||
| { | |||
| if (pendingChanges.size() > 0) | |||
| { | |||
| if (owner.process != nullptr && owner.process->server != nullptr) | |||
| MessageTypes::sendFileChanges (*owner.process->server, pendingChanges, file); | |||
| reset(); | |||
| return true; | |||
| } | |||
| stopTimer(); | |||
| return false; | |||
| } | |||
| void reset() | |||
| { | |||
| stopTimer(); | |||
| pendingChanges.clear(); | |||
| } | |||
| void startTransactionTimer() | |||
| { | |||
| transactionTimer.startTimer (1000); | |||
| } | |||
| void startEditorChangeTimer() | |||
| { | |||
| startTimer (200); | |||
| } | |||
| CompileEngineChildProcess& owner; | |||
| File file; | |||
| CodeDocument& document; | |||
| private: | |||
| Array<CodeChange> pendingChanges; | |||
| void timerCallback() override | |||
| { | |||
| if (owner.project.getCompileEngineSettings().isContinuousRebuildEnabled()) | |||
| flushEditorChanges(); | |||
| else | |||
| stopTimer(); | |||
| } | |||
| struct TransactionTimer : public Timer | |||
| { | |||
| explicit TransactionTimer (CodeDocument& doc) : document (doc) {} | |||
| void timerCallback() override | |||
| { | |||
| stopTimer(); | |||
| document.newTransaction(); | |||
| } | |||
| CodeDocument& document; | |||
| }; | |||
| TransactionTimer transactionTimer; | |||
| }; | |||
| void CompileEngineChildProcess::editorOpened (const File& file, CodeDocument& document) | |||
| { | |||
| editors.add (new Editor (*this, file, document)); | |||
| } | |||
| bool CompileEngineChildProcess::documentAboutToClose (OpenDocumentManager::Document* document) | |||
| { | |||
| for (int i = editors.size(); --i >= 0;) | |||
| { | |||
| if (document->getFile() == editors.getUnchecked(i)->file) | |||
| { | |||
| const File f (editors.getUnchecked(i)->file); | |||
| editors.remove (i); | |||
| if (process != nullptr) | |||
| MessageTypes::sendHandleFileReset (*process->server, f); | |||
| } | |||
| } | |||
| return true; | |||
| } | |||
| void CompileEngineChildProcess::updateAllEditors() | |||
| { | |||
| for (int i = editors.size(); --i >= 0;) | |||
| editors.getUnchecked(i)->sendFullUpdate(); | |||
| } | |||
| //============================================================================== | |||
| void CompileEngineChildProcess::handleCrash (const String& message) | |||
| { | |||
| Logger::writeToLog ("*** Child process crashed: " + message); | |||
| if (crashHandler != nullptr) | |||
| crashHandler (message); | |||
| } | |||
| void CompileEngineChildProcess::handleNewDiagnosticList (const ValueTree& l) { errorList.setList (l); } | |||
| void CompileEngineChildProcess::handleActivityListChanged (const StringArray& l) { activityList.setList (l); } | |||
| void CompileEngineChildProcess::handleCloseIDE() | |||
| { | |||
| if (JUCEApplication* app = JUCEApplication::getInstance()) | |||
| app->systemRequestedQuit(); | |||
| } | |||
| void CompileEngineChildProcess::handleMissingSystemHeaders() | |||
| { | |||
| if (ProjectContentComponent* p = findProjectContentComponent()) | |||
| p->handleMissingSystemHeaders(); | |||
| } | |||
| void CompileEngineChildProcess::handleKeyPress (const String& className, const KeyPress& key) | |||
| { | |||
| ApplicationCommandManager& commandManager = ProjucerApplication::getCommandManager(); | |||
| CommandID command = commandManager.getKeyMappings()->findCommandForKeyPress (key); | |||
| if (command == StandardApplicationCommandIDs::undo) | |||
| { | |||
| handleUndoInEditor (className); | |||
| } | |||
| else if (command == StandardApplicationCommandIDs::redo) | |||
| { | |||
| handleRedoInEditor (className); | |||
| } | |||
| else if (ApplicationCommandTarget* const target = ApplicationCommandManager::findTargetForComponent (findProjectContentComponent())) | |||
| { | |||
| commandManager.setFirstCommandTarget (target); | |||
| commandManager.getKeyMappings()->keyPressed (key, findProjectContentComponent()); | |||
| commandManager.setFirstCommandTarget (nullptr); | |||
| } | |||
| } | |||
| void CompileEngineChildProcess::handleUndoInEditor (const String& /*className*/) | |||
| { | |||
| } | |||
| void CompileEngineChildProcess::handleRedoInEditor (const String& /*className*/) | |||
| { | |||
| } | |||
| void CompileEngineChildProcess::handleClassListChanged (const ValueTree& newList) | |||
| { | |||
| lastComponentList = ClassDatabase::ClassList::fromValueTree (newList); | |||
| activityList.sendClassListChangedMessage (lastComponentList); | |||
| } | |||
| void CompileEngineChildProcess::handleBuildFailed() | |||
| { | |||
| ProjucerApplication::getCommandManager().commandStatusChanged(); | |||
| } | |||
| void CompileEngineChildProcess::handleChangeCode (const SourceCodeRange& location, const String& newText) | |||
| { | |||
| if (Editor* ed = getOrOpenEditorFor (location.file)) | |||
| { | |||
| if (ed->flushEditorChanges()) | |||
| return; // client-side editor changes were pending, so deal with them first, and discard | |||
| // the incoming change, whose position may now be wrong. | |||
| ed->document.deleteSection (location.range.getStart(), location.range.getEnd()); | |||
| ed->document.insertText (location.range.getStart(), newText); | |||
| // deliberately clear the messages that we just added, to avoid these changes being | |||
| // sent to the server (which will already have processed the same ones locally) | |||
| ed->reset(); | |||
| ed->startTransactionTimer(); | |||
| } | |||
| } | |||
| void CompileEngineChildProcess::handlePing() | |||
| { | |||
| } | |||
| //============================================================================== | |||
| void CompileEngineChildProcess::flushEditorChanges() | |||
| { | |||
| for (Editor* ed : editors) | |||
| ed->flushEditorChanges(); | |||
| } | |||
| ProjectContentComponent* CompileEngineChildProcess::findProjectContentComponent() const | |||
| { | |||
| for (MainWindow* mw : ProjucerApplication::getApp().mainWindowList.windows) | |||
| if (mw->getProject() == &project) | |||
| return mw->getProjectContentComponent(); | |||
| return nullptr; | |||
| } | |||
| CompileEngineChildProcess::Editor* CompileEngineChildProcess::getOrOpenEditorFor (const File& file) | |||
| { | |||
| for (Editor* ed : editors) | |||
| if (ed->file == file) | |||
| return ed; | |||
| if (ProjectContentComponent* pcc = findProjectContentComponent()) | |||
| if (pcc->showEditorForFile (file, false)) | |||
| return getOrOpenEditorFor (file); | |||
| return nullptr; | |||
| } | |||
| void CompileEngineChildProcess::handleHighlightCode (const SourceCodeRange& location) | |||
| { | |||
| ProjectContentComponent* pcc = findProjectContentComponent(); | |||
| if (pcc != nullptr && pcc->showEditorForFile (location.file, false)) | |||
| { | |||
| SourceCodeEditor* sce = dynamic_cast <SourceCodeEditor*> (pcc->getEditorComponent()); | |||
| if (sce != nullptr && sce->editor != nullptr) | |||
| { | |||
| sce->highlight (location.range, true); | |||
| Process::makeForegroundProcess(); | |||
| CodeEditorComponent& ed = *sce->editor; | |||
| ed.getTopLevelComponent()->toFront (false); | |||
| ed.grabKeyboardFocus(); | |||
| } | |||
| } | |||
| } | |||
| void CompileEngineChildProcess::cleanAllCachedFilesForProject (Project& p) | |||
| { | |||
| File cacheFolder (getCacheLocationForProject (p)); | |||
| if (cacheFolder.isDirectory()) | |||
| cacheFolder.deleteRecursively(); | |||
| } | |||
| @@ -1,155 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| #include "jucer_ActivityList.h" | |||
| #include "jucer_ErrorList.h" | |||
| class Project; | |||
| //============================================================================== | |||
| class CompileEngineChildProcess : public ReferenceCountedObject, | |||
| private OpenDocumentManager::DocumentCloseListener | |||
| { | |||
| public: | |||
| CompileEngineChildProcess (Project&); | |||
| ~CompileEngineChildProcess() override; | |||
| //============================================================================== | |||
| bool openedOk() const { return process != nullptr; } | |||
| void editorOpened (const File& file, CodeDocument& document); | |||
| bool documentAboutToClose (OpenDocumentManager::Document*) override; | |||
| //============================================================================== | |||
| void cleanAll(); | |||
| void openPreview (const ClassDatabase::Class&); | |||
| void reinstantiatePreviews(); | |||
| void processActivationChanged (bool isForeground); | |||
| //============================================================================== | |||
| bool canLaunchApp() const; | |||
| void launchApp(); | |||
| bool canKillApp() const; | |||
| void killApp(); | |||
| bool isAppRunning() const noexcept; | |||
| //============================================================================== | |||
| const ClassDatabase::ClassList& getComponentList() const { return lastComponentList; } | |||
| //============================================================================== | |||
| void flushEditorChanges(); | |||
| static void cleanAllCachedFilesForProject (Project&); | |||
| //============================================================================== | |||
| Project& project; | |||
| ActivityList activityList; | |||
| ErrorList errorList; | |||
| //============================================================================== | |||
| std::function<void (const String&)> crashHandler; | |||
| //============================================================================== | |||
| // from server.. | |||
| void handleNewDiagnosticList (const ValueTree& newList); | |||
| void handleClearErrors(); | |||
| void handleActivityListChanged (const StringArray&); | |||
| void handleClassListChanged (const ValueTree& newList); | |||
| void handleBuildFailed(); | |||
| void handleChangeCode (const SourceCodeRange& location, const String& newText); | |||
| void handleAppLaunched(); | |||
| void handleAppQuit(); | |||
| void handleHighlightCode (const SourceCodeRange& location); | |||
| void handlePing(); | |||
| void handleCrash (const String& message); | |||
| void handleCloseIDE(); | |||
| void handleKeyPress (const String& className, const KeyPress& key); | |||
| void handleUndoInEditor (const String& className); | |||
| void handleRedoInEditor (const String& className); | |||
| void handleMissingSystemHeaders(); | |||
| using Ptr = ReferenceCountedObjectPtr<CompileEngineChildProcess>; | |||
| private: | |||
| //============================================================================== | |||
| class ChildProcess; | |||
| std::unique_ptr<ChildProcess> process, runningAppProcess; | |||
| ClassDatabase::ClassList lastComponentList; | |||
| struct Editor; | |||
| OwnedArray<Editor> editors; | |||
| void updateAllEditors(); | |||
| void createProcess(); | |||
| Editor* getOrOpenEditorFor (const File&); | |||
| ProjectContentComponent* findProjectContentComponent() const; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CompileEngineChildProcess) | |||
| }; | |||
| //============================================================================== | |||
| struct ChildProcessCache | |||
| { | |||
| ChildProcessCache() {} | |||
| CompileEngineChildProcess::Ptr getExisting (Project& project) const noexcept | |||
| { | |||
| for (auto& p : processes) | |||
| if (&(p->project) == &project) | |||
| return *p; | |||
| return {}; | |||
| } | |||
| CompileEngineChildProcess::Ptr getOrCreate (Project& project) | |||
| { | |||
| if (auto p = getExisting (project)) | |||
| return p; | |||
| auto p = new CompileEngineChildProcess (project); | |||
| tellNewProcessAboutExistingEditors (*p); | |||
| processes.add (p); | |||
| return *p; | |||
| } | |||
| static void tellNewProcessAboutExistingEditors (CompileEngineChildProcess& process) | |||
| { | |||
| auto& odm = ProjucerApplication::getApp().openDocumentManager; | |||
| for (int i = odm.getNumOpenDocuments(); --i >= 0;) | |||
| if (auto d = dynamic_cast<SourceCodeDocument*> (odm.getOpenDocument (i))) | |||
| process.editorOpened (d->getFile(), d->getCodeDocument()); | |||
| } | |||
| void removeOrphans() | |||
| { | |||
| processes.clear(); | |||
| } | |||
| private: | |||
| ReferenceCountedArray<CompileEngineChildProcess> processes; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcessCache) | |||
| }; | |||
| @@ -1,201 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| #include "jucer_LiveCodeBuilderDLL.h" | |||
| //============================================================================== | |||
| struct CompileEngineDLL : private DeletedAtShutdown | |||
| { | |||
| CompileEngineDLL() | |||
| { | |||
| tryLoadDll(); | |||
| } | |||
| ~CompileEngineDLL() | |||
| { | |||
| shutdown(); | |||
| clearSingletonInstance(); | |||
| } | |||
| bool tryLoadDll() | |||
| { | |||
| // never load the dynamic lib multiple times | |||
| if (! isLoaded()) | |||
| { | |||
| auto f = findDLLFile(); | |||
| if (f != File() && dll.open (f.getLinkedTarget().getFullPathName())) | |||
| { | |||
| #define INIT_LIVE_DLL_FN(name, returnType, params) name = (name##_type) dll.getFunction (#name); | |||
| LIVE_DLL_FUNCTIONS (INIT_LIVE_DLL_FN); | |||
| #undef INIT_LIVE_DLL_FN | |||
| return true; | |||
| } | |||
| return false; | |||
| } | |||
| return true; | |||
| } | |||
| void initialise (CrashCallbackFunction crashFn, QuitCallbackFunction quitFn, bool setupSignals) | |||
| { | |||
| if (isLoaded()) | |||
| projucer_initialise (crashFn, quitFn, setPropertyCallback, getPropertyCallback, setupSignals); | |||
| } | |||
| void shutdown() | |||
| { | |||
| if (isLoaded()) | |||
| projucer_shutdown(); | |||
| } | |||
| bool isLoaded() const | |||
| { | |||
| #define CHECK_LIVE_DLL_FN(name, returnType, params) if (name == nullptr) return false; | |||
| LIVE_DLL_FUNCTIONS (CHECK_LIVE_DLL_FN); | |||
| #undef CHECK_LIVE_DLL_FN | |||
| return projucer_getVersion() == requiredVersion; | |||
| } | |||
| #define DECLARE_LIVE_DLL_FN(name, returnType, params) \ | |||
| typedef returnType (*name##_type) params; \ | |||
| name##_type name = nullptr; | |||
| LIVE_DLL_FUNCTIONS (DECLARE_LIVE_DLL_FN) | |||
| #undef DECLARE_LIVE_DLL_FN | |||
| static String getDLLName() | |||
| { | |||
| #if JUCE_MAC | |||
| return "JUCECompileEngine.dylib"; | |||
| #elif JUCE_LINUX || JUCE_BSD | |||
| return "JUCECompileEngine.so"; | |||
| #elif JUCE_WINDOWS | |||
| return "JUCECompileEngine.dll"; | |||
| #else | |||
| #error | |||
| return "JUCECompileEngine.so"; | |||
| #endif | |||
| } | |||
| static File getVersionedUserAppSupportFolder() | |||
| { | |||
| auto userAppData = File::getSpecialLocation (File::userApplicationDataDirectory); | |||
| #if JUCE_MAC | |||
| userAppData = userAppData.getChildFile ("Application Support"); | |||
| #endif | |||
| return userAppData.getChildFile ("Projucer").getChildFile (String ("CompileEngine-") + ProjectInfo::versionString); | |||
| } | |||
| JUCE_DECLARE_SINGLETON (CompileEngineDLL, false) | |||
| private: | |||
| DynamicLibrary dll; | |||
| enum { requiredVersion = 2 }; | |||
| static File findDLLFile() | |||
| { | |||
| auto dllFile = File(); | |||
| if (tryFindDLLFileInAppFolder (dllFile)) | |||
| return dllFile; | |||
| #if JUCE_MAC | |||
| if (tryFindDLLFileInAppBundle(dllFile)) | |||
| return dllFile; | |||
| #endif | |||
| if (tryFindDLLFileInAppConfigFolder (dllFile)) | |||
| return dllFile; | |||
| return {}; | |||
| } | |||
| #if JUCE_MAC | |||
| static bool tryFindDLLFileInAppBundle (File& outFile) | |||
| { | |||
| File currentAppFile (File::getSpecialLocation (File::currentApplicationFile)); | |||
| return tryFindDLLFileInFolder (currentAppFile.getChildFile ("Contents"), outFile); | |||
| } | |||
| #endif | |||
| static bool tryFindDLLFileInAppFolder (File& outFile) | |||
| { | |||
| auto currentAppFile = File::getSpecialLocation (File::currentApplicationFile); | |||
| return tryFindDLLFileInFolder (currentAppFile.getParentDirectory(), outFile); | |||
| } | |||
| static bool tryFindDLLFileInAppConfigFolder (File& outFile) | |||
| { | |||
| auto userAppDataFolder = getVersionedUserAppSupportFolder(); | |||
| return tryFindDLLFileInFolder (userAppDataFolder, outFile); | |||
| } | |||
| static bool tryFindDLLFileInFolder(File folder, File& outFile) | |||
| { | |||
| auto file = folder.getChildFile (getDLLName()); | |||
| if (isDLLFile (file)) | |||
| { | |||
| outFile = file; | |||
| return true; | |||
| } | |||
| return false; | |||
| } | |||
| static bool isDLLFile (const File& f) | |||
| { | |||
| return f.getFileName().equalsIgnoreCase (getDLLName()) && f.exists(); | |||
| } | |||
| static void setPropertyCallback (const char* key, const char* value) | |||
| { | |||
| auto keyStr = String (key); | |||
| if (keyStr.isNotEmpty()) | |||
| getGlobalProperties().setValue (key, value); | |||
| else | |||
| jassertfalse; | |||
| } | |||
| static void getPropertyCallback (const char* key, char* value, size_t size) | |||
| { | |||
| jassert (getGlobalProperties().getValue (key).getNumBytesAsUTF8() < size); | |||
| value[0] = 0; | |||
| getGlobalProperties().getValue (key).copyToUTF8 (value, size); | |||
| } | |||
| static void crashCallback (const char*) {} | |||
| static void quitCallback() {} | |||
| }; | |||
| @@ -1,307 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #include "../Application/jucer_Headers.h" | |||
| #include "../Application/jucer_Application.h" | |||
| #include "jucer_CompileEngineServer.h" | |||
| #include "jucer_CompileEngineDLL.h" | |||
| #include "jucer_MessageIDs.h" | |||
| #include "jucer_CppHelpers.h" | |||
| #include "jucer_SourceCodeRange.h" | |||
| #include "jucer_ClassDatabase.h" | |||
| #include "jucer_DiagnosticMessage.h" | |||
| #include "jucer_ProjectBuildInfo.h" | |||
| #include "jucer_ClientServerMessages.h" | |||
| #if JUCE_LINUX || JUCE_BSD | |||
| #include <sys/types.h> | |||
| #include <unistd.h> | |||
| #endif | |||
| #ifndef RUN_CLANG_IN_CHILD_PROCESS | |||
| #error | |||
| #endif | |||
| #if RUN_CLANG_IN_CHILD_PROCESS | |||
| static bool parentProcessHasExited(); | |||
| #endif | |||
| #if JUCE_WINDOWS | |||
| static void setParentProcessID (int); | |||
| static int getCurrentProcessID(); | |||
| #else | |||
| #include <unistd.h> | |||
| #endif | |||
| //============================================================================== | |||
| /** Detects whether this process has hung, and kills it if so. */ | |||
| struct ZombiePatrol : private Thread, | |||
| private AsyncUpdater, | |||
| private Timer | |||
| { | |||
| explicit ZombiePatrol (MessageHandler& mh) | |||
| : Thread ("Ping"), owner (mh) | |||
| { | |||
| startThread (2); | |||
| startTimer (1000); | |||
| } | |||
| ~ZombiePatrol() override | |||
| { | |||
| stopThread (1000); | |||
| } | |||
| private: | |||
| MessageHandler& owner; | |||
| int failedPings = 0; | |||
| void run() override | |||
| { | |||
| while (! threadShouldExit()) | |||
| { | |||
| #if RUN_CLANG_IN_CHILD_PROCESS | |||
| if (parentProcessHasExited()) | |||
| { | |||
| killProcess(); | |||
| break; | |||
| } | |||
| #endif | |||
| wait (1000); | |||
| } | |||
| } | |||
| void handleAsyncUpdate() override | |||
| { | |||
| DBG ("Server: quitting"); | |||
| stopTimer(); | |||
| ProjucerApplication::getApp().systemRequestedQuit(); | |||
| } | |||
| void timerCallback() override | |||
| { | |||
| if (! MessageTypes::sendPing (owner)) | |||
| { | |||
| if (++failedPings == 10) | |||
| { | |||
| killProcess(); | |||
| return; | |||
| } | |||
| } | |||
| else | |||
| { | |||
| failedPings = 0; | |||
| } | |||
| } | |||
| void killProcess() | |||
| { | |||
| triggerAsyncUpdate(); // give the messagequeue a chance to do things cleanly. | |||
| static UnstoppableKillerThread* k = new UnstoppableKillerThread(); // (allowed to leak, but static so only one is created) | |||
| ignoreUnused (k); | |||
| } | |||
| struct UnstoppableKillerThread : public Thread | |||
| { | |||
| UnstoppableKillerThread() : Thread ("Killer") { startThread(); } | |||
| void run() override | |||
| { | |||
| wait (15000); | |||
| if (! threadShouldExit()) | |||
| Process::terminate(); | |||
| } | |||
| }; | |||
| }; | |||
| //============================================================================== | |||
| class ServerIPC : public InterprocessConnection, | |||
| public MessageHandler | |||
| { | |||
| public: | |||
| explicit ServerIPC (const StringArray& info) | |||
| : InterprocessConnection (true), liveCodeBuilder (nullptr) | |||
| { | |||
| if (! createPipe (info[0], -1)) | |||
| { | |||
| Logger::writeToLog ("*** Couldn't create pipe!"); | |||
| ProjucerApplication::getApp().systemRequestedQuit(); | |||
| return; | |||
| } | |||
| if (dll.isLoaded()) | |||
| liveCodeBuilder = dll.projucer_createBuilder (sendMessageCallback, this, info[1].toRawUTF8(), info[2].toRawUTF8()); | |||
| #if JUCE_WINDOWS | |||
| setParentProcessID (info[3].getHexValue32()); | |||
| #endif | |||
| zombieKiller.reset (new ZombiePatrol (*this)); | |||
| } | |||
| ~ServerIPC() override | |||
| { | |||
| zombieKiller.reset(); | |||
| if (dll.isLoaded()) | |||
| dll.projucer_deleteBuilder (liveCodeBuilder); | |||
| dll.shutdown(); | |||
| DBG ("Server: finished closing down"); | |||
| } | |||
| void connectionMade() override | |||
| { | |||
| DBG ("Server: client connected"); | |||
| } | |||
| void connectionLost() override | |||
| { | |||
| Logger::writeToLog ("Server: client lost"); | |||
| JUCEApplication::quit(); | |||
| } | |||
| void sendQuitMessageToIDE() | |||
| { | |||
| MessageTypes::sendShouldCloseIDE (*this); | |||
| } | |||
| bool sendMessage (const ValueTree& m) override | |||
| { | |||
| return InterprocessConnection::sendMessage (MessageHandler::convertMessage (m)); | |||
| } | |||
| void messageReceived (const MemoryBlock& message) override | |||
| { | |||
| jassert (dll.isLoaded()); | |||
| dll.projucer_sendMessage (liveCodeBuilder, message.getData(), message.getSize()); | |||
| } | |||
| static bool sendMessageCallback (void* userInfo, const void* data, size_t dataSize) | |||
| { | |||
| return static_cast<InterprocessConnection*> (static_cast<ServerIPC*> (userInfo)) | |||
| ->sendMessage (MemoryBlock (data, dataSize)); | |||
| } | |||
| CompileEngineDLL dll; | |||
| LiveCodeBuilder liveCodeBuilder; | |||
| std::unique_ptr<ZombiePatrol> zombieKiller; | |||
| }; | |||
| //============================================================================== | |||
| const char* commandPrefix = "--server:"; | |||
| const char* commandTokenSeparator = "\x01"; | |||
| String createCommandLineForLaunchingServer (const String& pipeName, const String& projectUID, const File& cacheLocation) | |||
| { | |||
| StringArray info; | |||
| info.add (pipeName); | |||
| info.add (projectUID); | |||
| info.add (cacheLocation.getFullPathName()); | |||
| #if JUCE_WINDOWS | |||
| info.add (String::toHexString (getCurrentProcessID())); | |||
| #endif | |||
| const File exe (File::getSpecialLocation (File::currentExecutableFile).getFullPathName()); | |||
| return "\"" + exe.getFullPathName() + "\" " + commandPrefix + info.joinIntoString (commandTokenSeparator); | |||
| } | |||
| static ServerIPC* currentServer = nullptr; | |||
| static void crashCallback (const char* message) | |||
| { | |||
| if (currentServer != nullptr) | |||
| { | |||
| #if RUN_CLANG_IN_CHILD_PROCESS | |||
| MessageTypes::sendCrash (*currentServer, message); | |||
| Logger::writeToLog ("*** Crashed! " + String (message)); | |||
| #else | |||
| ignoreUnused (message); | |||
| jassertfalse; | |||
| #endif | |||
| currentServer->disconnect(); | |||
| } | |||
| } | |||
| static void quitCallback() | |||
| { | |||
| ProjucerApplication::getApp().systemRequestedQuit(); | |||
| } | |||
| void* createClangServer (const String& commandLine) | |||
| { | |||
| StringArray info; | |||
| info.addTokens (commandLine.fromFirstOccurrenceOf (commandPrefix, false, false), commandTokenSeparator, ""); | |||
| std::unique_ptr<ServerIPC> ipc (new ServerIPC (info)); | |||
| if (ipc->dll.isLoaded()) | |||
| { | |||
| ipc->dll.initialise (crashCallback, quitCallback, (bool) RUN_CLANG_IN_CHILD_PROCESS); | |||
| currentServer = ipc.release(); | |||
| return currentServer; | |||
| } | |||
| return nullptr; | |||
| } | |||
| void destroyClangServer (void* server) | |||
| { | |||
| currentServer = nullptr; | |||
| delete static_cast<ServerIPC*> (server); | |||
| } | |||
| void sendQuitMessageToIDE (void* server) | |||
| { | |||
| static_cast<ServerIPC*> (server)->sendQuitMessageToIDE(); | |||
| } | |||
| //============================================================================== | |||
| #if JUCE_WINDOWS | |||
| #define STRICT 1 | |||
| #define WIN32_LEAN_AND_MEAN 1 | |||
| #include <windows.h> | |||
| static HANDLE parentProcessHandle = nullptr; | |||
| static void setParentProcessID (int pid) { parentProcessHandle = OpenProcess (SYNCHRONIZE, FALSE, (DWORD) pid); } | |||
| static int getCurrentProcessID() { return (int) GetCurrentProcessId(); } | |||
| #endif | |||
| #if RUN_CLANG_IN_CHILD_PROCESS | |||
| bool parentProcessHasExited() | |||
| { | |||
| #if JUCE_WINDOWS | |||
| return WaitForSingleObject (parentProcessHandle, 0) == WAIT_OBJECT_0; | |||
| #else | |||
| return getppid() == 1; | |||
| #endif | |||
| } | |||
| #endif | |||
| @@ -1,42 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| //============================================================================== | |||
| // These functions are called by our child process on startup, to launch | |||
| // the compilation server | |||
| String createCommandLineForLaunchingServer (const String& pipeName, | |||
| const String& projectUID, | |||
| const File& cacheLocation); | |||
| void* createClangServer (const String& commandLine); | |||
| void destroyClangServer (void*); | |||
| // Called if our child process is asked to shutdown by the user, so it can pass | |||
| // that shutdown event up to the parent (IDE) process.. | |||
| void sendQuitMessageToIDE (void*); | |||
| @@ -1,109 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| //============================================================================== | |||
| class CompileEngineSettings | |||
| { | |||
| public: | |||
| CompileEngineSettings (ValueTree& projectRoot) | |||
| : tree (projectRoot.getOrCreateChildWithName ("LIVE_SETTINGS", nullptr) | |||
| .getOrCreateChildWithName (getLiveSettingsSubType(), nullptr)), | |||
| buildEnabledValue (tree, Ids::buildEnabled, nullptr, false), | |||
| continuousRebuildEnabledValue (tree, Ids::continuousRebuildEnabled, nullptr, false), | |||
| warningsEnabledValue (tree, Ids::warningsEnabled, nullptr, true), | |||
| userHeaderPathValue (tree, Ids::headerPath, nullptr), | |||
| systemHeaderPathValue (tree, Ids::systemHeaderPath, nullptr), | |||
| extraDLLsValue (tree, Ids::extraDLLs, nullptr), | |||
| extraCompilerFlagsValue (tree, Ids::extraCompilerFlags, nullptr), | |||
| extraPreprocessorDefsValue (tree, Ids::defines, nullptr), | |||
| windowsTargetPlatformValue (tree, Ids::windowsTargetPlatformVersion, nullptr, "10.0.16299.0") | |||
| { | |||
| } | |||
| //============================================================================== | |||
| void setBuildEnabled (bool enabled) noexcept { buildEnabledValue = enabled; } | |||
| void setContinuousRebuildEnabled (bool enabled) noexcept { continuousRebuildEnabledValue = enabled; } | |||
| void setWarningsEnabled (bool enabled) { warningsEnabledValue = enabled; } | |||
| bool isBuildEnabled() const noexcept { return buildEnabledValue.get(); } | |||
| bool isContinuousRebuildEnabled() const noexcept { return continuousRebuildEnabledValue.get(); } | |||
| bool areWarningsEnabled() const noexcept { return warningsEnabledValue.get(); } | |||
| String getUserHeaderPathString() const noexcept { return userHeaderPathValue.get(); } | |||
| String getSystemHeaderPathString() const noexcept { return systemHeaderPathValue.get(); } | |||
| String getExtraDLLsString() const noexcept { return extraDLLsValue.get(); } | |||
| String getExtraCompilerFlagsString() const noexcept { return extraCompilerFlagsValue.get(); } | |||
| String getExtraPreprocessorDefsString() const noexcept { return extraPreprocessorDefsValue.get(); } | |||
| String getWindowsTargetPlatformVersionString() const noexcept { return windowsTargetPlatformValue.get(); } | |||
| //============================================================================== | |||
| void getLiveSettings (PropertyListBuilder& props) | |||
| { | |||
| props.addSearchPathProperty (userHeaderPathValue, "User Header Paths", "User header search paths."); | |||
| props.addSearchPathProperty (systemHeaderPathValue, "System Header Paths", "System header search paths."); | |||
| props.add (new TextPropertyComponent (extraPreprocessorDefsValue, "Preprocessor Definitions", 32768, true), | |||
| "Extra preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace or commas " | |||
| "to separate the items - to include a space or comma in a definition, precede it with a backslash."); | |||
| props.add (new TextPropertyComponent (extraCompilerFlagsValue, "Extra Compiler Flags", 2048, true), | |||
| "Extra command-line flags to be passed to the compiler. This string can contain references to preprocessor" | |||
| " definitions in the form ${NAME_OF_DEFINITION}, which will be replaced with their values."); | |||
| props.add (new TextPropertyComponent (extraDLLsValue, "Extra Dynamic Libraries", 2048, true), | |||
| "Extra dynamic libs that the running code may require. Use new-lines or commas to separate the items."); | |||
| props.add (new TextPropertyComponent (windowsTargetPlatformValue, "Windows Target Platform", 256, false), | |||
| "The Windows target platform to use."); | |||
| } | |||
| private: | |||
| ValueTree tree; | |||
| ValueWithDefault buildEnabledValue, continuousRebuildEnabledValue, warningsEnabledValue, userHeaderPathValue, systemHeaderPathValue, | |||
| extraDLLsValue, extraCompilerFlagsValue, extraPreprocessorDefsValue, windowsTargetPlatformValue; | |||
| //============================================================================== | |||
| String getLiveSettingsSubType() const noexcept | |||
| { | |||
| #if JUCE_MAC | |||
| return "OSX"; | |||
| #elif JUCE_WINDOWS | |||
| return "WINDOWS"; | |||
| #elif JUCE_LINUX || JUCE_BSD | |||
| return "LINUX"; | |||
| #else | |||
| // unknown platform?! | |||
| jassertfalse; | |||
| return {}; | |||
| #endif | |||
| } | |||
| //============================================================================== | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CompileEngineSettings) | |||
| }; | |||
| @@ -1,283 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| //============================================================================== | |||
| struct CppParserHelpers | |||
| { | |||
| static bool parseHexInt (const String& text, int64& result) | |||
| { | |||
| CppTokeniserFunctions::StringIterator i (text); | |||
| if (CppTokeniserFunctions::parseHexLiteral (i)) | |||
| { | |||
| result = text.fromFirstOccurrenceOf ("x", false, true).getHexValue64(); | |||
| return true; | |||
| } | |||
| return false; | |||
| } | |||
| static bool parseOctalInt (const String& text, int64& result) | |||
| { | |||
| CppTokeniserFunctions::StringIterator it (text); | |||
| if (CppTokeniserFunctions::parseOctalLiteral (it)) | |||
| { | |||
| result = 0; | |||
| for (int i = 0; i < text.length(); ++i) | |||
| { | |||
| const auto digit = (int) (text[i] - '0'); | |||
| if (digit < 0 || digit > 7) | |||
| break; | |||
| result = result * 8 + digit; | |||
| } | |||
| return true; | |||
| } | |||
| return false; | |||
| } | |||
| static bool parseDecimalInt (const String& text, int64& result) | |||
| { | |||
| CppTokeniserFunctions::StringIterator i (text); | |||
| if (CppTokeniserFunctions::parseDecimalLiteral (i)) | |||
| { | |||
| result = text.getLargeIntValue(); | |||
| return true; | |||
| } | |||
| return false; | |||
| } | |||
| static bool parseInt (const String& text, int64& result) | |||
| { | |||
| return parseHexInt (text, result) | |||
| || parseOctalInt (text, result) | |||
| || parseDecimalInt (text, result); | |||
| } | |||
| static bool parseFloat (const String& text, double& result) | |||
| { | |||
| CppTokeniserFunctions::StringIterator i (text); | |||
| if (CppTokeniserFunctions::parseFloatLiteral (i)) | |||
| { | |||
| result = text.getDoubleValue(); | |||
| return true; | |||
| } | |||
| return false; | |||
| } | |||
| static int parseSingleToken (const String& text) | |||
| { | |||
| if (text.isEmpty()) | |||
| return CPlusPlusCodeTokeniser::tokenType_error; | |||
| CppTokeniserFunctions::StringIterator i (text); | |||
| i.skipWhitespace(); | |||
| const int tok = CppTokeniserFunctions::readNextToken (i); | |||
| i.skipWhitespace(); | |||
| i.skip(); | |||
| return i.isEOF() ? tok : CPlusPlusCodeTokeniser::tokenType_error; | |||
| } | |||
| static String getIntegerSuffix (const String& s) { return s.retainCharacters ("lLuU"); } | |||
| static String getFloatSuffix (const String& s) { return s.retainCharacters ("fF"); } | |||
| static String getReplacementStringInSameFormat (const String& old, double newValue) | |||
| { | |||
| { | |||
| CppTokeniserFunctions::StringIterator i (old); | |||
| if (CppTokeniserFunctions::parseFloatLiteral (i)) | |||
| { | |||
| String s (newValue); | |||
| if (! s.containsChar ('.')) | |||
| s += ".0"; | |||
| return s + getFloatSuffix (old); | |||
| } | |||
| } | |||
| return getReplacementStringInSameFormat (old, (int64) newValue); | |||
| } | |||
| static String getReplacementStringInSameFormat (const String& old, int64 newValue) | |||
| { | |||
| { | |||
| CppTokeniserFunctions::StringIterator i (old); | |||
| if (CppTokeniserFunctions::parseHexLiteral (i)) | |||
| { | |||
| String s ("0x" + String::toHexString (newValue) + getIntegerSuffix (old)); | |||
| if (old.toUpperCase() == old) | |||
| s = s.toUpperCase(); | |||
| return s; | |||
| } | |||
| } | |||
| { | |||
| CppTokeniserFunctions::StringIterator i (old); | |||
| if (CppTokeniserFunctions::parseDecimalLiteral (i)) | |||
| return String (newValue) + getIntegerSuffix (old); | |||
| } | |||
| return old; | |||
| } | |||
| // Given a type name which could be a smart pointer or other pointer/ref, this extracts | |||
| // the essential class name of the thing that it points to. | |||
| static String getSignificantClass (String cls) | |||
| { | |||
| int firstAngleBracket = cls.indexOfChar ('<'); | |||
| if (firstAngleBracket > 0) | |||
| cls = cls.substring (firstAngleBracket + 1).upToLastOccurrenceOf (">", false, false).trim(); | |||
| while (cls.endsWithChar ('*') || cls.endsWithChar ('&')) | |||
| cls = cls.dropLastCharacters (1).trim(); | |||
| return cls; | |||
| } | |||
| //============================================================================== | |||
| struct ValidCppIdentifierRestriction : public TextEditor::InputFilter | |||
| { | |||
| ValidCppIdentifierRestriction (bool allowTemplatesAndNamespaces) | |||
| : className (allowTemplatesAndNamespaces) {} | |||
| String filterNewText (TextEditor& ed, const String& text) | |||
| { | |||
| String allowedChars ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_"); | |||
| if (className) | |||
| allowedChars += "<>:"; | |||
| if (ed.getHighlightedRegion().getStart() > 0) | |||
| allowedChars += "0123456789"; | |||
| String s = text.retainCharacters (allowedChars); | |||
| if (CPlusPlusCodeTokeniser::isReservedKeyword (ed.getText().replaceSection (ed.getHighlightedRegion().getStart(), | |||
| ed.getHighlightedRegion().getLength(), | |||
| s))) | |||
| return String(); | |||
| return s; | |||
| } | |||
| bool className; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ValidCppIdentifierRestriction) | |||
| }; | |||
| }; | |||
| //============================================================================== | |||
| struct CodeChange | |||
| { | |||
| CodeChange (Range<int> r, const String& t) : range (r), text (t) | |||
| { | |||
| } | |||
| bool mergeWith (const CodeChange& next) | |||
| { | |||
| if (text.isEmpty()) | |||
| { | |||
| if (next.text.isNotEmpty() | |||
| && next.range.isEmpty() | |||
| && next.range.getStart() == range.getStart()) | |||
| { | |||
| text = next.text; | |||
| return true; | |||
| } | |||
| if (next.text.isEmpty()) | |||
| { | |||
| Range<int> nextRange (next.range); | |||
| if (nextRange.getStart() >= range.getStart()) | |||
| nextRange += range.getLength(); | |||
| else if (nextRange.getEnd() > range.getStart()) | |||
| nextRange.setEnd (nextRange.getEnd() + range.getLength()); | |||
| if (range.intersects (nextRange) | |||
| || range.getEnd() == nextRange.getStart() | |||
| || range.getStart() == nextRange.getEnd()) | |||
| { | |||
| range = range.getUnionWith (nextRange); | |||
| return true; | |||
| } | |||
| } | |||
| } | |||
| else if (next.text.isEmpty()) | |||
| { | |||
| if (next.range.getEnd() == range.getStart()) | |||
| { | |||
| range.setStart (next.range.getStart()); | |||
| return true; | |||
| } | |||
| if (next.range.getStart() == range.getStart() + text.length()) | |||
| { | |||
| range.setLength (range.getLength() + next.range.getLength()); | |||
| return true; | |||
| } | |||
| } | |||
| return false; | |||
| } | |||
| void addToList (Array<CodeChange>& list) const | |||
| { | |||
| if (list.size() == 0 || ! list.getReference (list.size() - 1).mergeWith (*this)) | |||
| list.add (*this); | |||
| } | |||
| Range<int> range; | |||
| String text; | |||
| }; | |||
| //============================================================================== | |||
| static inline String concatenateListOfStrings (const StringArray& s) | |||
| { | |||
| return s.joinIntoString ("\x01"); | |||
| } | |||
| static inline StringArray separateJoinedStrings (const String& s) | |||
| { | |||
| return StringArray::fromTokens (s, "\x01", juce::StringRef()); | |||
| } | |||
| @@ -1,208 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| //============================================================================== | |||
| struct DiagnosticMessage | |||
| { | |||
| DiagnosticMessage() = default; | |||
| DiagnosticMessage (const DiagnosticMessage& other) | |||
| : associatedDiagnostic (createCopyIfNotNull (other.associatedDiagnostic.get())), | |||
| message (other.message), | |||
| mainFile (other.mainFile), | |||
| range (other.range), | |||
| type (other.type) | |||
| { | |||
| } | |||
| DiagnosticMessage& operator= (const DiagnosticMessage& other) | |||
| { | |||
| associatedDiagnostic.reset (createCopyIfNotNull (other.associatedDiagnostic.get())); | |||
| message = other.message; | |||
| mainFile = other.mainFile; | |||
| range = other.range; | |||
| type = other.type; | |||
| return *this; | |||
| } | |||
| enum Type | |||
| { | |||
| error = 0, | |||
| warning = 1, | |||
| note = 2 | |||
| }; | |||
| std::unique_ptr<DiagnosticMessage> associatedDiagnostic; | |||
| String message; | |||
| String mainFile; | |||
| SourceCodeRange range; | |||
| Type type; | |||
| bool isError() const noexcept { return type == error; } | |||
| bool isWarning() const noexcept { return type == warning; } | |||
| bool isNote() const noexcept { return type == note; } | |||
| String toString() const | |||
| { | |||
| // todo: copy recursively from root | |||
| String res; | |||
| switch (type) | |||
| { | |||
| case error: res << "error: "; break; | |||
| case warning: res << "warning: "; break; | |||
| case note: res << "note: "; break; | |||
| default: break; | |||
| }; | |||
| res << mainFile << ": "; | |||
| res << message << "\n"; | |||
| return res; | |||
| } | |||
| ValueTree toValueTree() const | |||
| { | |||
| ValueTree v (MessageTypes::DIAGNOSTIC); | |||
| v.setProperty (Ids::text, message, nullptr); | |||
| v.setProperty (Ids::file, mainFile, nullptr); | |||
| v.setProperty (Ids::range, range.toString(), nullptr); | |||
| v.setProperty (Ids::type, (int) type, nullptr); | |||
| if (associatedDiagnostic != nullptr) | |||
| v.addChild (associatedDiagnostic->toValueTree(), 0, nullptr); | |||
| return v; | |||
| } | |||
| static DiagnosticMessage fromValueTree (const ValueTree& v) | |||
| { | |||
| DiagnosticMessage d; | |||
| d.message = v[Ids::text]; | |||
| d.mainFile = v[Ids::file]; | |||
| d.range = SourceCodeRange (v [Ids::range]); | |||
| d.type = (Type) static_cast<int> (v[Ids::type]); | |||
| auto associated = v.getChild (0); | |||
| if (associated.isValid()) | |||
| d.associatedDiagnostic.reset (new DiagnosticMessage (fromValueTree (associated))); | |||
| return d; | |||
| } | |||
| bool operator== (const DiagnosticMessage& other) const noexcept | |||
| { | |||
| return range == other.range | |||
| && message == other.message | |||
| && mainFile == other.mainFile; | |||
| } | |||
| bool operator!= (const DiagnosticMessage& other) const noexcept { return ! operator== (other); } | |||
| }; | |||
| //============================================================================== | |||
| struct DiagnosticList | |||
| { | |||
| // after some research, it seems that notes never come on their own | |||
| // i.e. they always have a warning / error preceding them | |||
| // so we can keep notes and their associated diagnostics | |||
| // together by keeping track of the last message | |||
| DiagnosticMessage lastMessage; | |||
| ValueTree list { MessageTypes::DIAGNOSTIC_LIST }; | |||
| void clear() | |||
| { | |||
| list = ValueTree { MessageTypes::DIAGNOSTIC_LIST }; | |||
| lastMessage = DiagnosticMessage(); | |||
| } | |||
| void add (DiagnosticMessage m) | |||
| { | |||
| if (m.isNote()) | |||
| { | |||
| if (lastMessage.message.isEmpty()) | |||
| return; // seems to happen sometimes, but with seemingly duplicated messages (?) | |||
| m.associatedDiagnostic.reset (new DiagnosticMessage (lastMessage)); | |||
| } | |||
| else | |||
| { | |||
| lastMessage = m; | |||
| } | |||
| list.appendChild (m.toValueTree(), nullptr); | |||
| } | |||
| void add (const DiagnosticList& l) | |||
| { | |||
| jassert (l.list != list); | |||
| for (int i = 0; i < l.list.getNumChildren(); ++i) | |||
| list.appendChild (l.list.getChild(i).createCopy(), nullptr); | |||
| } | |||
| void remove (DiagnosticMessage m) | |||
| { | |||
| auto n = m.toValueTree(); | |||
| for (int i = 0; i < list.getNumChildren(); ++i) | |||
| { | |||
| if (list.getChild (i).isEquivalentTo (n)) | |||
| { | |||
| list.removeChild (i, nullptr); | |||
| return; | |||
| } | |||
| } | |||
| jassertfalse; | |||
| } | |||
| bool hasRecoveryWarning (DiagnosticMessage m) const | |||
| { | |||
| auto n = m.toValueTree(); | |||
| for (int i = 0; i < list.getNumChildren(); ++i) | |||
| if (list.getChild (i).isEquivalentTo (n)) | |||
| return true; | |||
| return false; | |||
| } | |||
| const ValueTree& toValueTree() const noexcept | |||
| { | |||
| return list; | |||
| } | |||
| void loadFromChildOfValueTree (ValueTree& parent) | |||
| { | |||
| list = parent.getChildWithName (MessageTypes::DIAGNOSTIC_LIST).createCopy(); | |||
| } | |||
| }; | |||
| @@ -1,166 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #include "../Application/jucer_Headers.h" | |||
| #include "jucer_DownloadCompileEngineThread.h" | |||
| #include "../LiveBuildEngine/jucer_CompileEngineDLL.h" | |||
| #include "../Utility/Helpers/jucer_VersionInfo.h" | |||
| //============================================================================== | |||
| bool DownloadCompileEngineThread::downloadAndInstall() | |||
| { | |||
| DownloadCompileEngineThread d; | |||
| if (d.runThread()) | |||
| { | |||
| if (d.result.failed()) | |||
| return withError (d.result.getErrorMessage()); | |||
| return true; | |||
| } | |||
| if (d.cancelledByUser) | |||
| return false; | |||
| return withError (d.result.getErrorMessage()); | |||
| } | |||
| DownloadCompileEngineThread::DownloadCompileEngineThread() | |||
| : ThreadWithProgressWindow ("Downloading live-build engine", true, true), | |||
| result (Result::ok()), cancelledByUser (false) | |||
| { | |||
| } | |||
| void DownloadCompileEngineThread::threadComplete (bool userPressedCancel) | |||
| { | |||
| cancelledByUser = userPressedCancel; | |||
| } | |||
| void DownloadCompileEngineThread::run() | |||
| { | |||
| setProgress (-1.0); | |||
| setStatusMessage ("Downloading..."); | |||
| MemoryBlock zipData; | |||
| result = download (zipData); | |||
| if (result.failed()) | |||
| return; | |||
| setStatusMessage ("Installing..."); | |||
| File installFolder = getInstallFolder(); | |||
| if (! installFolder.createDirectory()) | |||
| { | |||
| result = Result::fail ("Install error: cannot create target directory"); | |||
| return; | |||
| } | |||
| result = install (zipData, installFolder); | |||
| } | |||
| Result DownloadCompileEngineThread::download (MemoryBlock& dest) | |||
| { | |||
| auto info = VersionInfo::fetchFromUpdateServer (ProjectInfo::versionString); | |||
| if (info == nullptr) | |||
| return Result::fail ("Download error: cannot communicate with server"); | |||
| auto requiredAssetName = [] | |||
| { | |||
| String name ("JUCECompileEngine_"); | |||
| #if JUCE_MAC | |||
| name << "osx_"; | |||
| #elif JUCE_WINDOWS | |||
| name << "windows_"; | |||
| #else | |||
| jassertfalse; | |||
| #endif | |||
| return name + ProjectInfo::versionString + ".zip"; | |||
| }(); | |||
| for (auto& asset : info->assets) | |||
| { | |||
| if (asset.name == requiredAssetName) | |||
| { | |||
| int statusCode = 0; | |||
| auto in = VersionInfo::createInputStreamForAsset (asset, statusCode); | |||
| if (in == nullptr || statusCode != 200) | |||
| return Result::fail ("Download error: cannot establish connection"); | |||
| MemoryOutputStream mo (dest, true); | |||
| int64 size = in->getTotalLength(); | |||
| int64 bytesReceived = -1; | |||
| String msg("Downloading... (123)"); | |||
| for (int64 pos = 0; pos < size; pos += bytesReceived) | |||
| { | |||
| setStatusMessage (msg.replace ("123", File::descriptionOfSizeInBytes (pos))); | |||
| if (threadShouldExit()) | |||
| return Result::fail ("Download error: operation interrupted"); | |||
| bytesReceived = mo.writeFromInputStream (*in, 8192); | |||
| if (bytesReceived == 0) | |||
| return Result::fail ("Download error: lost connection"); | |||
| } | |||
| return Result::ok(); | |||
| } | |||
| } | |||
| return Result::fail ("Download error: no downloads available"); | |||
| } | |||
| Result DownloadCompileEngineThread::install (const MemoryBlock& data, File& targetFolder) | |||
| { | |||
| MemoryInputStream input (data, false); | |||
| ZipFile zip (input); | |||
| if (zip.getNumEntries() == 0) | |||
| return Result::fail ("Install error: downloaded file is corrupt"); | |||
| if (threadShouldExit()) | |||
| return Result::fail ("Install error: operation interrupted"); | |||
| return zip.uncompressTo (targetFolder); | |||
| } | |||
| File DownloadCompileEngineThread::getInstallFolder() | |||
| { | |||
| return CompileEngineDLL::getVersionedUserAppSupportFolder(); | |||
| } | |||
| bool DownloadCompileEngineThread::withError(const String& msg) | |||
| { | |||
| AlertWindow::showMessageBox (AlertWindow::WarningIcon, | |||
| "Download and install", msg); | |||
| return false; | |||
| } | |||
| @@ -1,53 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| //============================================================================== | |||
| class DownloadCompileEngineThread : public ThreadWithProgressWindow | |||
| { | |||
| public: | |||
| static bool downloadAndInstall(); | |||
| protected: | |||
| void run() override; | |||
| void threadComplete (bool userPressedCancel) override; | |||
| private: | |||
| DownloadCompileEngineThread(); | |||
| Result download (MemoryBlock& dest); | |||
| Result install (const MemoryBlock& data, File& targetFolder); | |||
| static URL getDownloadUrl(); | |||
| static File getInstallFolder(); | |||
| static bool withError(const String& msg); | |||
| Result result; | |||
| bool cancelledByUser; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DownloadCompileEngineThread) | |||
| }; | |||
| @@ -1,120 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| //============================================================================== | |||
| struct ErrorList : public ChangeBroadcaster | |||
| { | |||
| ErrorList() : warningsEnabled (true) {} | |||
| void takeCopy (Array<DiagnosticMessage>& dest) const | |||
| { | |||
| checkThread(); | |||
| if (warningsEnabled) | |||
| { | |||
| dest = messages; | |||
| } | |||
| else | |||
| { | |||
| for (auto& d : messages) | |||
| if (d.isError()) | |||
| dest.add (d); | |||
| } | |||
| } | |||
| void resetToError (const String& message) | |||
| { | |||
| DiagnosticMessage m; | |||
| m.message = message; | |||
| m.type = DiagnosticMessage::error; | |||
| DiagnosticList list; | |||
| list.add (m); | |||
| setList (list.toValueTree()); | |||
| } | |||
| void setList (const ValueTree& newList) | |||
| { | |||
| checkThread(); | |||
| messages.clear(); | |||
| for (int i = 0; i < newList.getNumChildren(); ++i) | |||
| messages.add (DiagnosticMessage::fromValueTree (newList.getChild(i))); | |||
| sendChangeMessage(); | |||
| } | |||
| bool isEmpty() const noexcept { return messages.size() == 0; } | |||
| int getNumErrors() const | |||
| { | |||
| checkThread(); | |||
| int num = 0; | |||
| for (const auto& m : messages) | |||
| if (m.isError()) | |||
| ++num; | |||
| return num; | |||
| } | |||
| int getNumWarnings() const | |||
| { | |||
| checkThread(); | |||
| int num = 0; | |||
| for (const auto& m : messages) | |||
| if (m.isWarning()) | |||
| ++num; | |||
| return num; | |||
| } | |||
| void setWarningsEnabled (bool enabled) | |||
| { | |||
| if (warningsEnabled != enabled) | |||
| { | |||
| warningsEnabled = enabled; | |||
| if (messages.size() > 0) | |||
| sendChangeMessage(); | |||
| } | |||
| } | |||
| private: | |||
| Array<DiagnosticMessage> messages; | |||
| bool warningsEnabled; | |||
| static void checkThread() | |||
| { | |||
| JUCE_ASSERT_MESSAGE_THREAD | |||
| } | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ErrorList) | |||
| }; | |||
| @@ -1,50 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| extern "C" | |||
| { | |||
| typedef void* LiveCodeBuilder; | |||
| typedef bool (*SendMessageFunction) (void* userInfo, const void* data, size_t dataSize); | |||
| typedef void (*CrashCallbackFunction) (const char* crashDescription); | |||
| typedef void (*QuitCallbackFunction)(); | |||
| typedef void (*SetPropertyFunction) (const char* key, const char* value); | |||
| typedef void (*GetPropertyFunction) (const char* key, char* value, size_t size); | |||
| // We've used an X macro to define the DLL functions rather than just declaring them, so that | |||
| // we can load the DLL and its functions dynamically and cope with it not being there. | |||
| // The CompileEngineDLL class is a wrapper that manages finding/loading the DLL and exposing | |||
| // these as callable functions. | |||
| #define LIVE_DLL_FUNCTIONS(X) \ | |||
| X (projucer_getVersion, int, ()) \ | |||
| X (projucer_initialise, void, (CrashCallbackFunction, QuitCallbackFunction, SetPropertyFunction, GetPropertyFunction, bool setupSignals)) \ | |||
| X (projucer_shutdown, void, ()) \ | |||
| X (projucer_createBuilder, LiveCodeBuilder, (SendMessageFunction, void* userInfo, const char* projectID, const char* cacheFolder)) \ | |||
| X (projucer_sendMessage, void, (LiveCodeBuilder, const void* messageData, size_t messageDataSize)) \ | |||
| X (projucer_deleteBuilder, void, (LiveCodeBuilder)) | |||
| } | |||
| @@ -1,63 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| namespace MessageTypes | |||
| { | |||
| #define DECLARE_ID(name) const Identifier name (#name) | |||
| DECLARE_ID (PING); | |||
| DECLARE_ID (BUILDINFO); | |||
| DECLARE_ID (COMPILEUNIT); | |||
| DECLARE_ID (USERFILE); | |||
| DECLARE_ID (DIAGNOSTIC); | |||
| DECLARE_ID (DIAGNOSTIC_LIST); | |||
| DECLARE_ID (ACTIVITY_LIST); | |||
| DECLARE_ID (MISSING_SYSTEM_HEADERS); | |||
| DECLARE_ID (BUILD_FAILED); | |||
| DECLARE_ID (CHANGE_CODE); | |||
| DECLARE_ID (HIGHLIGHT_CODE); | |||
| DECLARE_ID (CRASH); | |||
| DECLARE_ID (LAUNCHED); | |||
| DECLARE_ID (APPQUIT); | |||
| DECLARE_ID (KEY); | |||
| DECLARE_ID (QUIT_IDE); | |||
| DECLARE_ID (CLEAN_ALL); | |||
| DECLARE_ID (OPEN_PREVIEW); | |||
| DECLARE_ID (RELOAD); | |||
| DECLARE_ID (LIVE_FILE_CHANGES); | |||
| DECLARE_ID (CHANGE); | |||
| DECLARE_ID (LIVE_FILE_UPDATE); | |||
| DECLARE_ID (LIVE_FILE_RESET); | |||
| DECLARE_ID (LAUNCH_APP); | |||
| DECLARE_ID (FOREGROUND); | |||
| DECLARE_ID (QUIT_SERVER); | |||
| #undef DECLARE_ID | |||
| } | |||
| @@ -1,101 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| //============================================================================== | |||
| struct ProjectBuildInfo | |||
| { | |||
| ProjectBuildInfo() : tree (MessageTypes::BUILDINFO) {} | |||
| ProjectBuildInfo (const ValueTree& t) : tree (t) {} | |||
| Array<File> getCompileUnits() const | |||
| { | |||
| Array<File> files; | |||
| for (int i = 0; i < tree.getNumChildren(); ++i) | |||
| if (tree.getChild(i).hasType (MessageTypes::COMPILEUNIT)) | |||
| files.add (File (tree.getChild(i) [Ids::file].toString())); | |||
| return files; | |||
| } | |||
| // This is a list of all cpp and header files that are actually "user" code | |||
| // rather than system or internal files | |||
| Array<File> getUserFiles() const | |||
| { | |||
| Array<File> files; | |||
| for (int i = 0; i < tree.getNumChildren(); ++i) | |||
| if (tree.getChild(i).hasType (MessageTypes::USERFILE)) | |||
| files.add (File (tree.getChild(i) [Ids::file].toString())); | |||
| return files; | |||
| } | |||
| void setFiles (const Array<File>& compileUnits, const Array<File>& allUserFiles) | |||
| { | |||
| for (const File& f : compileUnits) | |||
| { | |||
| ValueTree file (MessageTypes::COMPILEUNIT); | |||
| file.setProperty (Ids::file, f.getFullPathName(), nullptr); | |||
| tree.appendChild (file, nullptr); | |||
| } | |||
| for (const File& f : allUserFiles) | |||
| { | |||
| ValueTree file (MessageTypes::USERFILE); | |||
| file.setProperty (Ids::file, f.getFullPathName(), nullptr); | |||
| tree.appendChild (file, nullptr); | |||
| } | |||
| } | |||
| StringArray getSystemIncludes() const { return separateJoinedStrings (tree [Ids::systempath]); } | |||
| StringArray getUserIncludes() const { return separateJoinedStrings (tree [Ids::userpath]); } | |||
| void setSystemIncludes (const StringArray& s) { tree.setProperty (Ids::systempath, concatenateListOfStrings (s), nullptr); } | |||
| void setUserIncludes (const StringArray& s) { tree.setProperty (Ids::userpath, concatenateListOfStrings (s), nullptr); } | |||
| String getGlobalDefs() const { return tree [Ids::defines]; } | |||
| void setGlobalDefs (const String& defs) { tree.setProperty (Ids::defines, defs, nullptr); } | |||
| String getCompileFlags() const { return tree [Ids::extraCompilerFlags]; } | |||
| void setCompileFlags (const String& f) { tree.setProperty (Ids::extraCompilerFlags, f, nullptr); } | |||
| String getUtilsCppInclude() const { return tree [Ids::utilsCppInclude]; } | |||
| void setUtilsCppInclude (const String& s) { tree.setProperty (Ids::utilsCppInclude, s, nullptr); } | |||
| String getJuceModulesFolder() const { return tree [Ids::juceModulesFolder]; } | |||
| void setJuceModulesFolder (const String& s) { tree.setProperty (Ids::juceModulesFolder, s, nullptr); } | |||
| StringArray getExtraDLLs() const { return separateJoinedStrings (tree [Ids::extraDLLs]); } | |||
| void setExtraDLLs (const StringArray& s) { tree.setProperty (Ids::extraDLLs, concatenateListOfStrings (s), nullptr); } | |||
| String getWindowsTargetPlatformVersion() const { return tree [Ids::liveWindowsTargetPlatformVersion]; } | |||
| void setWindowsTargetPlatformVersion (const String& s) { tree.setProperty (Ids::liveWindowsTargetPlatformVersion, s, nullptr); } | |||
| ValueTree tree; | |||
| }; | |||
| @@ -1,105 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| //============================================================================== | |||
| struct SourceCodeRange | |||
| { | |||
| SourceCodeRange() = default; | |||
| SourceCodeRange (const String& f, int start, int end) | |||
| : file (f), range (start, end) | |||
| { | |||
| #if JUCE_WINDOWS | |||
| file = file.replaceCharacter ('/', '\\'); | |||
| #endif | |||
| } | |||
| SourceCodeRange (const String& s) | |||
| { | |||
| String::CharPointerType colon1 (nullptr), colon2 (nullptr); | |||
| for (auto p = s.getCharPointer(); ! p.isEmpty(); ++p) | |||
| { | |||
| if (*p == ':') | |||
| { | |||
| colon1 = colon2; | |||
| colon2 = p; | |||
| } | |||
| } | |||
| if (colon1.getAddress() != nullptr && colon2.getAddress() != nullptr) | |||
| { | |||
| file = String (s.getCharPointer(), colon1); | |||
| range = Range<int> ((colon1 + 1).getIntValue32(), | |||
| (colon2 + 1).getIntValue32()); | |||
| } | |||
| } | |||
| String file; | |||
| Range<int> range; | |||
| bool isValid() const noexcept { return file.isNotEmpty() && range != Range<int>(); } | |||
| void nudge (const String& changedFile, const int insertPoint, const int delta) noexcept | |||
| { | |||
| if (range.getEnd() >= insertPoint && file == changedFile) | |||
| { | |||
| const int newEnd = range.getEnd() + delta; | |||
| int newStart = range.getStart(); | |||
| if (newStart > insertPoint) | |||
| newStart += delta; | |||
| range = Range<int> (newStart, newEnd); | |||
| } | |||
| } | |||
| void fileContentChanged (const String& changedFile) noexcept | |||
| { | |||
| if (file == changedFile) | |||
| range = Range<int>(); | |||
| } | |||
| String toString() const | |||
| { | |||
| if (file.isEmpty() && range.isEmpty()) | |||
| return String(); | |||
| return file + ":" + String (range.getStart()) + ":" + String (range.getEnd()); | |||
| } | |||
| void writeToValueTree (ValueTree& v, const Identifier& prop) const | |||
| { | |||
| const String s (toString()); | |||
| if (s.isNotEmpty()) | |||
| v.setProperty (prop, s, nullptr); | |||
| } | |||
| bool operator== (const SourceCodeRange& other) const noexcept { return range == other.range && file == other.file; } | |||
| bool operator!= (const SourceCodeRange& other) const noexcept { return ! operator== (other); } | |||
| }; | |||
| @@ -1,277 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| //============================================================================== | |||
| struct LiveBuildSettingsComponent : public Component | |||
| { | |||
| LiveBuildSettingsComponent (Project& p) | |||
| { | |||
| addAndMakeVisible (&group); | |||
| PropertyListBuilder props; | |||
| p.getCompileEngineSettings().getLiveSettings (props); | |||
| group.setProperties (props); | |||
| group.setName ("Live Build Settings"); | |||
| } | |||
| void resized() override | |||
| { | |||
| group.updateSize (12, 0, getWidth() - 24); | |||
| group.setBounds (getLocalBounds().reduced (12, 0)); | |||
| } | |||
| void parentSizeChanged() override | |||
| { | |||
| auto width = jmax (550, getParentWidth()); | |||
| auto y = group.updateSize (12, 0, width - 12); | |||
| y = jmax (getParentHeight(), y); | |||
| setSize (width, y); | |||
| } | |||
| PropertyGroupComponent group { "Live Build Settings", Icon (getIcons().settings, Colours::transparentBlack) }; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LiveBuildSettingsComponent) | |||
| }; | |||
| //============================================================================== | |||
| class LiveBuildTab : public Component, | |||
| private ChangeListener | |||
| { | |||
| public: | |||
| LiveBuildTab (const CompileEngineChildProcess::Ptr& child, String lastErrorMessage) | |||
| { | |||
| addAndMakeVisible (settingsButton); | |||
| settingsButton.onClick = [this] | |||
| { | |||
| if (auto* pcc = findParentComponentOfClass<ProjectContentComponent>()) | |||
| pcc->showLiveBuildSettings(); | |||
| }; | |||
| if (child != nullptr) | |||
| { | |||
| addAndMakeVisible (concertinaPanel); | |||
| buildConcertina (*child); | |||
| isEnabled = true; | |||
| } | |||
| else | |||
| { | |||
| errorMessage = getErrorMessage(); | |||
| errorMessageLabel.reset (new Label ("Error", errorMessage)); | |||
| errorMessageLabel->setJustificationType (Justification::centred); | |||
| errorMessageLabel->setFont (Font (12.0f)); | |||
| errorMessageLabel->setMinimumHorizontalScale (1.0f); | |||
| addAndMakeVisible (errorMessageLabel.get()); | |||
| if (showDownloadButton) | |||
| { | |||
| downloadButton.reset (new TextButton ("Download")); | |||
| addAndMakeVisible (downloadButton.get()); | |||
| downloadButton->onClick = [this] { downloadDLL(); }; | |||
| } | |||
| if (showEnableButton) | |||
| { | |||
| String buttonText ("Enable Now"); | |||
| if (! lastErrorMessage.isEmpty()) | |||
| { | |||
| errorMessageLabel->setText (lastErrorMessage, dontSendNotification); | |||
| buttonText = "Re-enable"; | |||
| } | |||
| enableButton.reset (new TextButton (buttonText)); | |||
| addAndMakeVisible (enableButton.get()); | |||
| enableButton->onClick = [this] | |||
| { | |||
| if (auto* pcc = findParentComponentOfClass<ProjectContentComponent>()) | |||
| pcc->setBuildEnabled (true); | |||
| }; | |||
| } | |||
| } | |||
| } | |||
| void paint (Graphics& g) override | |||
| { | |||
| g.fillAll (findColour (secondaryBackgroundColourId)); | |||
| } | |||
| void resized() override | |||
| { | |||
| auto bounds = getLocalBounds(); | |||
| settingsButton.setBounds (bounds.removeFromBottom (25) | |||
| .removeFromRight (25) | |||
| .reduced (3)); | |||
| if (errorMessageLabel != nullptr) | |||
| { | |||
| bounds.removeFromTop ((bounds.getHeight() / 2) - 40); | |||
| errorMessageLabel->setBounds (bounds.removeFromTop (80)); | |||
| if (downloadButton != nullptr) | |||
| downloadButton->setBounds (bounds.removeFromTop (20).reduced (20, 0)); | |||
| if (enableButton != nullptr) | |||
| enableButton->setBounds (bounds.removeFromTop (20).reduced (20, 0)); | |||
| } | |||
| else | |||
| { | |||
| concertinaPanel.setBounds (bounds); | |||
| for (auto h : headers) | |||
| if (h->getName() == "Activities") | |||
| h->yPosition = getHeight() - CurrentActivitiesComp::getMaxPanelHeight() - 55; | |||
| } | |||
| } | |||
| bool isEnabled = false; | |||
| String errorMessage; | |||
| Component::SafePointer<ProjucerAppClasses::ErrorListComp> errorListComp; | |||
| private: | |||
| OwnedArray<ConcertinaHeader> headers; | |||
| ConcertinaPanel concertinaPanel; | |||
| IconButton settingsButton { "Settings", getIcons().settings }; | |||
| std::unique_ptr<TextButton> downloadButton, enableButton; | |||
| std::unique_ptr<Label> errorMessageLabel; | |||
| bool showDownloadButton; | |||
| bool showEnableButton; | |||
| Rectangle<int> textBounds; | |||
| //============================================================================== | |||
| String getErrorMessage() | |||
| { | |||
| showDownloadButton = false; | |||
| showEnableButton = false; | |||
| auto osType = SystemStats::getOperatingSystemType(); | |||
| auto isMac = (osType & SystemStats::MacOSX) != 0; | |||
| auto isWin = (osType & SystemStats::Windows) != 0; | |||
| auto isLinux = (osType & SystemStats::Linux) != 0; | |||
| if (! isMac && ! isWin && ! isLinux) | |||
| return "Live-build features are not supported on your system.\n\n" | |||
| "Please check supported platforms at www.juce.com!"; | |||
| if (isLinux) | |||
| return "Live-build features for Linux are under development.\n\n" | |||
| "Please check for updates at www.juce.com!"; | |||
| if (isMac) | |||
| if (osType < SystemStats::MacOSX_10_9) | |||
| return "Live-build features are available only on macOS 10.9 or higher."; | |||
| if (isWin) | |||
| if (! SystemStats::isOperatingSystem64Bit() || osType < SystemStats::Windows8_0) | |||
| return "Live-build features are available only on 64-Bit Windows 8 or higher."; | |||
| auto& compileEngineDll = *CompileEngineDLL::getInstance(); | |||
| auto dllPresent = compileEngineDll.isLoaded(); | |||
| if (! dllPresent) | |||
| { | |||
| showDownloadButton = true; | |||
| return "Download the live-build engine to get started"; | |||
| } | |||
| showEnableButton = true; | |||
| return "Enable compilation to use the live-build engine"; | |||
| } | |||
| void downloadDLL() | |||
| { | |||
| if (DownloadCompileEngineThread::downloadAndInstall()) | |||
| { | |||
| if (! CompileEngineDLL::getInstance()->tryLoadDll()) | |||
| { | |||
| AlertWindow::showMessageBox(AlertWindow::WarningIcon, | |||
| "Download and install", | |||
| "Loading the live-build engine failed"); | |||
| return; | |||
| } | |||
| if (auto* pcc = findParentComponentOfClass<ProjectContentComponent>()) | |||
| pcc->rebuildProjectUI(); | |||
| } | |||
| } | |||
| void buildConcertina (CompileEngineChildProcess& child) | |||
| { | |||
| for (auto i = concertinaPanel.getNumPanels() - 1; i >= 0 ; --i) | |||
| concertinaPanel.removePanel (concertinaPanel.getPanel (i)); | |||
| headers.clear(); | |||
| errorListComp = new ProjucerAppClasses::ErrorListComp (child.errorList); | |||
| auto* activities = new CurrentActivitiesComp (child.activityList); | |||
| auto* comps = new ComponentListComp (child); | |||
| concertinaPanel.addPanel (-1, errorListComp, true); | |||
| concertinaPanel.addPanel (-1, comps, true); | |||
| concertinaPanel.addPanel (-1, activities, true); | |||
| headers.add (new ConcertinaHeader ("Errors", getIcons().bug)); | |||
| headers.add (new ConcertinaHeader ("Components", getIcons().modules)); | |||
| headers.add (new ConcertinaHeader ("Activities", getIcons().buildTab)); | |||
| for (int i = 0; i < concertinaPanel.getNumPanels(); ++i) | |||
| { | |||
| auto* p = concertinaPanel.getPanel (i); | |||
| auto* h = headers.getUnchecked (i); | |||
| h->addChangeListener (this); | |||
| h->yPosition = i * 30; | |||
| concertinaPanel.setCustomPanelHeader (p, h, false); | |||
| concertinaPanel.setPanelHeaderSize (p, 30); | |||
| } | |||
| concertinaPanel.setMaximumPanelSize (activities, CurrentActivitiesComp::getMaxPanelHeight()); | |||
| concertinaPanel.setPanelSize (errorListComp, 200, false); | |||
| concertinaPanel.setPanelSize (comps, 300, false); | |||
| } | |||
| void changeListenerCallback (ChangeBroadcaster* source) override | |||
| { | |||
| if (auto* header = dynamic_cast<ConcertinaHeader*> (source)) | |||
| { | |||
| auto index = headers.indexOf (header); | |||
| concertinaPanel.expandPanelFully (concertinaPanel.getPanel (index), true); | |||
| } | |||
| } | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LiveBuildTab) | |||
| }; | |||
| @@ -1,307 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| //============================================================================== | |||
| struct ProjectSettingsComponent : public Component, | |||
| private ChangeListener | |||
| { | |||
| ProjectSettingsComponent (Project& p) | |||
| : project (p), | |||
| group (project.getProjectFilenameRootString(), | |||
| Icon (getIcons().settings, Colours::transparentBlack)) | |||
| { | |||
| setTitle ("Project Settings"); | |||
| setFocusContainerType (FocusContainerType::focusContainer); | |||
| addAndMakeVisible (group); | |||
| updatePropertyList(); | |||
| project.addChangeListener (this); | |||
| } | |||
| ~ProjectSettingsComponent() override | |||
| { | |||
| project.removeChangeListener (this); | |||
| } | |||
| void resized() override | |||
| { | |||
| group.updateSize (12, 0, getWidth() - 24); | |||
| group.setBounds (getLocalBounds().reduced (12, 0)); | |||
| } | |||
| void updatePropertyList() | |||
| { | |||
| PropertyListBuilder props; | |||
| project.createPropertyEditors (props); | |||
| group.setProperties (props); | |||
| group.setName ("Project Settings"); | |||
| lastProjectType = project.getProjectTypeString(); | |||
| parentSizeChanged(); | |||
| } | |||
| void changeListenerCallback (ChangeBroadcaster*) override | |||
| { | |||
| if (lastProjectType != project.getProjectTypeString()) | |||
| updatePropertyList(); | |||
| } | |||
| void parentSizeChanged() override | |||
| { | |||
| auto width = jmax (550, getParentWidth()); | |||
| auto y = group.updateSize (12, 0, width - 12); | |||
| y = jmax (getParentHeight(), y); | |||
| setSize (width, y); | |||
| } | |||
| Project& project; | |||
| var lastProjectType; | |||
| PropertyGroupComponent group; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProjectSettingsComponent) | |||
| }; | |||
| //============================================================================== | |||
| struct FileTreePanel : public TreePanelBase | |||
| { | |||
| FileTreePanel (Project& p) | |||
| : TreePanelBase (&p, "fileTreeState") | |||
| { | |||
| tree.setMultiSelectEnabled (true); | |||
| setRoot (new TreeItemTypes::GroupItem (p.getMainGroup())); | |||
| tree.setRootItemVisible (false); | |||
| } | |||
| void updateMissingFileStatuses() | |||
| { | |||
| if (auto* p = dynamic_cast<TreeItemTypes::FileTreeItemBase*> (rootItem.get())) | |||
| p->checkFileStatus(); | |||
| } | |||
| }; | |||
| struct ModuleTreePanel : public TreePanelBase | |||
| { | |||
| ModuleTreePanel (Project& p) | |||
| : TreePanelBase (&p, "moduleTreeState") | |||
| { | |||
| tree.setMultiSelectEnabled (false); | |||
| setRoot (new TreeItemTypes::EnabledModulesItem (p)); | |||
| tree.setRootItemVisible (false); | |||
| } | |||
| }; | |||
| struct ExportersTreePanel : public TreePanelBase | |||
| { | |||
| ExportersTreePanel (Project& p) | |||
| : TreePanelBase (&p, "exportersTreeState") | |||
| { | |||
| tree.setMultiSelectEnabled (false); | |||
| setRoot (new TreeItemTypes::ExportersTreeRoot (p)); | |||
| tree.setRootItemVisible (false); | |||
| } | |||
| }; | |||
| //============================================================================== | |||
| class ProjectTab : public Component, | |||
| private ChangeListener | |||
| { | |||
| public: | |||
| ProjectTab (Project* p) | |||
| : project (p) | |||
| { | |||
| addAndMakeVisible (concertinaPanel); | |||
| buildConcertina(); | |||
| } | |||
| ~ProjectTab() override | |||
| { | |||
| getFileTreePanel()->saveOpenness(); | |||
| getModuleTreePanel()->saveOpenness(); | |||
| getExportersTreePanel()->saveOpenness(); | |||
| } | |||
| void paint (Graphics& g) override | |||
| { | |||
| g.fillAll (findColour (secondaryBackgroundColourId)); | |||
| } | |||
| void resized() override | |||
| { | |||
| concertinaPanel.setBounds (getLocalBounds().withTrimmedBottom (3)); | |||
| } | |||
| TreePanelBase* getTreeWithSelectedItems() | |||
| { | |||
| for (auto i = concertinaPanel.getNumPanels() - 1; i >= 0; --i) | |||
| { | |||
| if (auto* treeComponent = dynamic_cast<ConcertinaTreeComponent*> (concertinaPanel.getPanel (i))) | |||
| { | |||
| if (auto* base = treeComponent->getTree()) | |||
| if (base->tree.getNumSelectedItems() != 0) | |||
| return base; | |||
| } | |||
| } | |||
| return nullptr; | |||
| } | |||
| FileTreePanel* getFileTreePanel() | |||
| { | |||
| if (auto* panel = dynamic_cast<ConcertinaTreeComponent*> (concertinaPanel.getPanel (0))) | |||
| return dynamic_cast<FileTreePanel*> (panel->getTree()); | |||
| return nullptr; | |||
| } | |||
| ModuleTreePanel* getModuleTreePanel() | |||
| { | |||
| if (auto* panel = dynamic_cast<ConcertinaTreeComponent*> (concertinaPanel.getPanel (1))) | |||
| return dynamic_cast<ModuleTreePanel*> (panel->getTree()); | |||
| return nullptr; | |||
| } | |||
| ExportersTreePanel* getExportersTreePanel() | |||
| { | |||
| if (auto* panel = dynamic_cast<ConcertinaTreeComponent*> (concertinaPanel.getPanel (2))) | |||
| return dynamic_cast<ExportersTreePanel*> (panel->getTree()); | |||
| return nullptr; | |||
| } | |||
| void showPanel (int panelIndex) | |||
| { | |||
| jassert (isPositiveAndBelow (panelIndex, concertinaPanel.getNumPanels())); | |||
| concertinaPanel.expandPanelFully (concertinaPanel.getPanel (panelIndex), true); | |||
| } | |||
| void setPanelHeightProportion (int panelIndex, float prop) | |||
| { | |||
| jassert (isPositiveAndBelow (panelIndex, concertinaPanel.getNumPanels())); | |||
| concertinaPanel.setPanelSize (concertinaPanel.getPanel (panelIndex), | |||
| roundToInt (prop * (float) (concertinaPanel.getHeight() - 90)), false); | |||
| } | |||
| float getPanelHeightProportion (int panelIndex) | |||
| { | |||
| jassert (isPositiveAndBelow (panelIndex, concertinaPanel.getNumPanels())); | |||
| return ((float) (concertinaPanel.getPanel (panelIndex)->getHeight()) / (float) (concertinaPanel.getHeight() - 90)); | |||
| } | |||
| private: | |||
| ConcertinaPanel concertinaPanel; | |||
| OwnedArray<ConcertinaHeader> headers; | |||
| Project* project = nullptr; | |||
| //============================================================================== | |||
| void changeListenerCallback (ChangeBroadcaster* source) override | |||
| { | |||
| if (auto* header = dynamic_cast<ConcertinaHeader*> (source)) | |||
| { | |||
| auto index = headers.indexOf (header); | |||
| concertinaPanel.expandPanelFully (concertinaPanel.getPanel (index), true); | |||
| } | |||
| } | |||
| void buildConcertina() | |||
| { | |||
| for (auto i = concertinaPanel.getNumPanels() - 1; i >= 0 ; --i) | |||
| concertinaPanel.removePanel (concertinaPanel.getPanel (i)); | |||
| headers.clear(); | |||
| auto addPanel = [this] (const String& name, | |||
| TreePanelBase* tree, | |||
| ConcertinaTreeComponent::AdditionalComponents components, | |||
| const Path& icon) | |||
| { | |||
| if (project != nullptr) | |||
| concertinaPanel.addPanel (-1, new ConcertinaTreeComponent (name, tree, components), true); | |||
| headers.add (new ConcertinaHeader (name, icon)); | |||
| }; | |||
| using AdditionalComponents = ConcertinaTreeComponent::AdditionalComponents; | |||
| addPanel ("File Explorer", new FileTreePanel (*project), | |||
| AdditionalComponents{} | |||
| .with (AdditionalComponents::addButton) | |||
| .with (AdditionalComponents::findPanel), | |||
| getIcons().fileExplorer); | |||
| addPanel ("Modules", new ModuleTreePanel (*project), | |||
| AdditionalComponents{} | |||
| .with (AdditionalComponents::addButton) | |||
| .with (AdditionalComponents::settingsButton), | |||
| getIcons().modules); | |||
| addPanel ("Exporters", new ExportersTreePanel (*project), | |||
| AdditionalComponents{}.with (AdditionalComponents::addButton), | |||
| getIcons().exporter); | |||
| for (int i = 0; i < concertinaPanel.getNumPanels(); ++i) | |||
| { | |||
| auto* p = concertinaPanel.getPanel (i); | |||
| auto* h = headers.getUnchecked (i); | |||
| p->addMouseListener (this, true); | |||
| h->addChangeListener (this); | |||
| h->yPosition = i * 30; | |||
| concertinaPanel.setCustomPanelHeader (p, h, false); | |||
| concertinaPanel.setPanelHeaderSize (p, 30); | |||
| } | |||
| } | |||
| void mouseDown (const MouseEvent& e) override | |||
| { | |||
| for (auto i = concertinaPanel.getNumPanels() - 1; i >= 0; --i) | |||
| { | |||
| auto* p = concertinaPanel.getPanel (i); | |||
| if (! (p->isParentOf (e.eventComponent))) | |||
| { | |||
| auto* base = dynamic_cast<TreePanelBase*> (p); | |||
| if (base == nullptr) | |||
| base = dynamic_cast<ConcertinaTreeComponent*> (p)->getTree(); | |||
| if (base != nullptr) | |||
| base->tree.clearSelectedItems(); | |||
| } | |||
| } | |||
| } | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProjectTab) | |||
| }; | |||
| @@ -0,0 +1,558 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| //============================================================================== | |||
| class ConcertinaHeader : public Component, | |||
| public ChangeBroadcaster | |||
| { | |||
| public: | |||
| ConcertinaHeader (String n, Path p) | |||
| : Component (n), name (n), iconPath (p) | |||
| { | |||
| setTitle (getName()); | |||
| panelIcon = Icon (iconPath, Colours::white); | |||
| nameLabel.setText (name, dontSendNotification); | |||
| nameLabel.setJustificationType (Justification::centredLeft); | |||
| nameLabel.setInterceptsMouseClicks (false, false); | |||
| nameLabel.setAccessible (false); | |||
| nameLabel.setColour (Label::textColourId, Colours::white); | |||
| addAndMakeVisible (nameLabel); | |||
| } | |||
| void resized() override | |||
| { | |||
| auto b = getLocalBounds().toFloat(); | |||
| iconBounds = b.removeFromLeft (b.getHeight()).reduced (7, 7); | |||
| arrowBounds = b.removeFromRight (b.getHeight()); | |||
| nameLabel.setBounds (b.toNearestInt()); | |||
| } | |||
| void paint (Graphics& g) override | |||
| { | |||
| g.setColour (findColour (defaultButtonBackgroundColourId)); | |||
| g.fillRoundedRectangle (getLocalBounds().reduced (2, 3).toFloat(), 2.0f); | |||
| g.setColour (Colours::white); | |||
| g.fillPath (ProjucerLookAndFeel::getArrowPath (arrowBounds, | |||
| getParentComponent()->getBoundsInParent().getY() == yPosition ? 2 : 0, | |||
| true, Justification::centred)); | |||
| panelIcon.draw (g, iconBounds.toFloat(), false); | |||
| } | |||
| void mouseUp (const MouseEvent& e) override | |||
| { | |||
| if (! e.mouseWasDraggedSinceMouseDown()) | |||
| sendChangeMessage(); | |||
| } | |||
| std::unique_ptr<AccessibilityHandler> createAccessibilityHandler() override | |||
| { | |||
| return std::make_unique<AccessibilityHandler> (*this, | |||
| AccessibilityRole::button, | |||
| AccessibilityActions().addAction (AccessibilityActionType::press, | |||
| [this] { sendChangeMessage(); })); | |||
| } | |||
| int direction = 0; | |||
| int yPosition = 0; | |||
| private: | |||
| String name; | |||
| Label nameLabel; | |||
| Path iconPath; | |||
| Icon panelIcon; | |||
| Rectangle<float> arrowBounds, iconBounds; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ConcertinaHeader) | |||
| }; | |||
| //============================================================================== | |||
| class FindPanel : public Component, | |||
| private Timer, | |||
| private FocusChangeListener | |||
| { | |||
| public: | |||
| FindPanel (std::function<void (const String&)> cb) | |||
| : callback (cb) | |||
| { | |||
| addAndMakeVisible (editor); | |||
| editor.onTextChange = [this] { startTimer (250); }; | |||
| editor.onFocusLost = [this] | |||
| { | |||
| isFocused = false; | |||
| repaint(); | |||
| }; | |||
| Desktop::getInstance().addFocusChangeListener (this); | |||
| lookAndFeelChanged(); | |||
| } | |||
| ~FindPanel() override | |||
| { | |||
| Desktop::getInstance().removeFocusChangeListener (this); | |||
| } | |||
| void paintOverChildren (Graphics& g) override | |||
| { | |||
| if (! isFocused) | |||
| return; | |||
| g.setColour (findColour (defaultHighlightColourId)); | |||
| Path p; | |||
| p.addRoundedRectangle (getLocalBounds().reduced (2), 3.0f); | |||
| g.strokePath (p, PathStrokeType (2.0f)); | |||
| } | |||
| void resized() override | |||
| { | |||
| editor.setBounds (getLocalBounds().reduced (2)); | |||
| } | |||
| private: | |||
| TextEditor editor; | |||
| bool isFocused = false; | |||
| std::function<void (const String&)> callback; | |||
| //============================================================================== | |||
| void lookAndFeelChanged() override | |||
| { | |||
| editor.setTextToShowWhenEmpty ("Filter...", findColour (widgetTextColourId).withAlpha (0.3f)); | |||
| } | |||
| void globalFocusChanged (Component* focusedComponent) override | |||
| { | |||
| if (focusedComponent == &editor) | |||
| { | |||
| isFocused = true; | |||
| repaint(); | |||
| } | |||
| } | |||
| void timerCallback() override | |||
| { | |||
| stopTimer(); | |||
| callback (editor.getText()); | |||
| } | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FindPanel) | |||
| }; | |||
| //============================================================================== | |||
| class ConcertinaTreeComponent : public Component | |||
| { | |||
| public: | |||
| class AdditionalComponents | |||
| { | |||
| public: | |||
| enum Type | |||
| { | |||
| addButton = (1 << 0), | |||
| settingsButton = (1 << 1), | |||
| findPanel = (1 << 2) | |||
| }; | |||
| AdditionalComponents with (Type t) | |||
| { | |||
| auto copy = *this; | |||
| copy.componentTypes |= t; | |||
| return copy; | |||
| } | |||
| bool has (Type t) const noexcept | |||
| { | |||
| return (componentTypes & t) != 0; | |||
| } | |||
| private: | |||
| int componentTypes = 0; | |||
| }; | |||
| ConcertinaTreeComponent (const String& name, | |||
| TreePanelBase* tree, | |||
| AdditionalComponents additionalComponents) | |||
| : Component (name), | |||
| treeToDisplay (tree) | |||
| { | |||
| setTitle (getName()); | |||
| setFocusContainerType (FocusContainerType::focusContainer); | |||
| if (additionalComponents.has (AdditionalComponents::addButton)) | |||
| { | |||
| addButton = std::make_unique<IconButton> ("Add", getIcons().plus); | |||
| addAndMakeVisible (addButton.get()); | |||
| addButton->onClick = [this] { showAddMenu(); }; | |||
| } | |||
| if (additionalComponents.has (AdditionalComponents::settingsButton)) | |||
| { | |||
| settingsButton = std::make_unique<IconButton> ("Settings", getIcons().settings); | |||
| addAndMakeVisible (settingsButton.get()); | |||
| settingsButton->onClick = [this] { showSettings(); }; | |||
| } | |||
| if (additionalComponents.has (AdditionalComponents::findPanel)) | |||
| { | |||
| findPanel = std::make_unique<FindPanel> ([this] (const String& filter) { treeToDisplay->rootItem->setSearchFilter (filter); }); | |||
| addAndMakeVisible (findPanel.get()); | |||
| } | |||
| addAndMakeVisible (treeToDisplay.get()); | |||
| } | |||
| void resized() override | |||
| { | |||
| auto bounds = getLocalBounds(); | |||
| if (addButton != nullptr || settingsButton != nullptr || findPanel != nullptr) | |||
| { | |||
| auto bottomSlice = bounds.removeFromBottom (25); | |||
| bottomSlice.removeFromRight (3); | |||
| if (addButton != nullptr) | |||
| addButton->setBounds (bottomSlice.removeFromRight (25).reduced (2)); | |||
| if (settingsButton != nullptr) | |||
| settingsButton->setBounds (bottomSlice.removeFromRight (25).reduced (2)); | |||
| if (findPanel != nullptr) | |||
| findPanel->setBounds (bottomSlice.reduced (2)); | |||
| } | |||
| treeToDisplay->setBounds (bounds); | |||
| } | |||
| TreePanelBase* getTree() const noexcept { return treeToDisplay.get(); } | |||
| private: | |||
| std::unique_ptr<TreePanelBase> treeToDisplay; | |||
| std::unique_ptr<IconButton> addButton, settingsButton; | |||
| std::unique_ptr<FindPanel> findPanel; | |||
| void showAddMenu() | |||
| { | |||
| auto numSelected = treeToDisplay->tree.getNumSelectedItems(); | |||
| if (numSelected > 1) | |||
| return; | |||
| if (numSelected == 0) | |||
| { | |||
| if (auto* root = dynamic_cast<JucerTreeViewBase*> (treeToDisplay->tree.getRootItem())) | |||
| root->showPopupMenu (addButton->getScreenBounds().getCentre()); | |||
| } | |||
| else | |||
| { | |||
| if (auto* item = dynamic_cast<JucerTreeViewBase*> (treeToDisplay->tree.getSelectedItem (0))) | |||
| item->showAddMenu (addButton->getScreenBounds().getCentre()); | |||
| } | |||
| } | |||
| void showSettings() | |||
| { | |||
| if (auto* root = dynamic_cast<JucerTreeViewBase*> (treeToDisplay->tree.getRootItem())) | |||
| { | |||
| treeToDisplay->tree.clearSelectedItems(); | |||
| root->showDocument(); | |||
| } | |||
| } | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ConcertinaTreeComponent) | |||
| }; | |||
| //============================================================================== | |||
| struct ProjectSettingsComponent : public Component, | |||
| private ChangeListener | |||
| { | |||
| ProjectSettingsComponent (Project& p) | |||
| : project (p), | |||
| group (project.getProjectFilenameRootString(), | |||
| Icon (getIcons().settings, Colours::transparentBlack)) | |||
| { | |||
| setTitle ("Project Settings"); | |||
| setFocusContainerType (FocusContainerType::focusContainer); | |||
| addAndMakeVisible (group); | |||
| updatePropertyList(); | |||
| project.addChangeListener (this); | |||
| } | |||
| ~ProjectSettingsComponent() override | |||
| { | |||
| project.removeChangeListener (this); | |||
| } | |||
| void resized() override | |||
| { | |||
| group.updateSize (12, 0, getWidth() - 24); | |||
| group.setBounds (getLocalBounds().reduced (12, 0)); | |||
| } | |||
| void updatePropertyList() | |||
| { | |||
| PropertyListBuilder props; | |||
| project.createPropertyEditors (props); | |||
| group.setProperties (props); | |||
| group.setName ("Project Settings"); | |||
| lastProjectType = project.getProjectTypeString(); | |||
| parentSizeChanged(); | |||
| } | |||
| void changeListenerCallback (ChangeBroadcaster*) override | |||
| { | |||
| if (lastProjectType != project.getProjectTypeString()) | |||
| updatePropertyList(); | |||
| } | |||
| void parentSizeChanged() override | |||
| { | |||
| auto width = jmax (550, getParentWidth()); | |||
| auto y = group.updateSize (12, 0, width - 12); | |||
| y = jmax (getParentHeight(), y); | |||
| setSize (width, y); | |||
| } | |||
| Project& project; | |||
| var lastProjectType; | |||
| PropertyGroupComponent group; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProjectSettingsComponent) | |||
| }; | |||
| //============================================================================== | |||
| struct FileTreePanel : public TreePanelBase | |||
| { | |||
| FileTreePanel (Project& p) | |||
| : TreePanelBase (&p, "fileTreeState") | |||
| { | |||
| tree.setMultiSelectEnabled (true); | |||
| setRoot (std::make_unique<TreeItemTypes::GroupItem> (p.getMainGroup())); | |||
| tree.setRootItemVisible (false); | |||
| } | |||
| void updateMissingFileStatuses() | |||
| { | |||
| if (auto* p = dynamic_cast<TreeItemTypes::FileTreeItemBase*> (rootItem.get())) | |||
| p->checkFileStatus(); | |||
| } | |||
| }; | |||
| struct ModuleTreePanel : public TreePanelBase | |||
| { | |||
| ModuleTreePanel (Project& p) | |||
| : TreePanelBase (&p, "moduleTreeState") | |||
| { | |||
| tree.setMultiSelectEnabled (false); | |||
| setRoot (std::make_unique<TreeItemTypes::EnabledModulesItem> (p)); | |||
| tree.setRootItemVisible (false); | |||
| } | |||
| }; | |||
| struct ExportersTreePanel : public TreePanelBase | |||
| { | |||
| ExportersTreePanel (Project& p) | |||
| : TreePanelBase (&p, "exportersTreeState") | |||
| { | |||
| tree.setMultiSelectEnabled (false); | |||
| setRoot (std::make_unique<TreeItemTypes::ExportersTreeRoot> (p)); | |||
| tree.setRootItemVisible (false); | |||
| } | |||
| }; | |||
| //============================================================================== | |||
| class Sidebar : public Component, | |||
| private ChangeListener | |||
| { | |||
| public: | |||
| Sidebar (Project* p) | |||
| : project (p) | |||
| { | |||
| setFocusContainerType (FocusContainerType::focusContainer); | |||
| if (project != nullptr) | |||
| buildConcertina(); | |||
| } | |||
| ~Sidebar() override | |||
| { | |||
| TreePanelBase* panels[] = { getFileTreePanel(), getModuleTreePanel(), getExportersTreePanel() }; | |||
| for (auto* panel : panels) | |||
| if (panel != nullptr) | |||
| panel->saveOpenness(); | |||
| } | |||
| void paint (Graphics& g) override | |||
| { | |||
| g.fillAll (findColour (secondaryBackgroundColourId)); | |||
| } | |||
| void resized() override | |||
| { | |||
| concertinaPanel.setBounds (getLocalBounds().withTrimmedBottom (3)); | |||
| } | |||
| TreePanelBase* getTreeWithSelectedItems() | |||
| { | |||
| for (auto i = concertinaPanel.getNumPanels() - 1; i >= 0; --i) | |||
| { | |||
| if (auto* treeComponent = dynamic_cast<ConcertinaTreeComponent*> (concertinaPanel.getPanel (i))) | |||
| { | |||
| if (auto* base = treeComponent->getTree()) | |||
| if (base->tree.getNumSelectedItems() != 0) | |||
| return base; | |||
| } | |||
| } | |||
| return nullptr; | |||
| } | |||
| FileTreePanel* getFileTreePanel() { return getPanel<FileTreePanel> (0); } | |||
| ModuleTreePanel* getModuleTreePanel() { return getPanel<ModuleTreePanel> (1); } | |||
| ExportersTreePanel* getExportersTreePanel() { return getPanel<ExportersTreePanel> (2); } | |||
| void showPanel (int panelIndex) | |||
| { | |||
| jassert (isPositiveAndBelow (panelIndex, concertinaPanel.getNumPanels())); | |||
| concertinaPanel.expandPanelFully (concertinaPanel.getPanel (panelIndex), true); | |||
| } | |||
| private: | |||
| //============================================================================== | |||
| template <typename PanelType> | |||
| PanelType* getPanel (int panelIndex) | |||
| { | |||
| if (auto* panel = dynamic_cast<ConcertinaTreeComponent*> (concertinaPanel.getPanel (panelIndex))) | |||
| return dynamic_cast<PanelType*> (panel->getTree()); | |||
| return nullptr; | |||
| } | |||
| void changeListenerCallback (ChangeBroadcaster* source) override | |||
| { | |||
| const auto pointerMatches = [source] (const std::unique_ptr<ConcertinaHeader>& header) { return header.get() == source; }; | |||
| const auto it = std::find_if (headers.begin(), headers.end(), pointerMatches); | |||
| const auto index = (int) std::distance (headers.begin(), it); | |||
| if (index != (int) headers.size()) | |||
| concertinaPanel.expandPanelFully (concertinaPanel.getPanel (index), true); | |||
| } | |||
| void buildConcertina() | |||
| { | |||
| for (auto i = concertinaPanel.getNumPanels() - 1; i >= 0 ; --i) | |||
| concertinaPanel.removePanel (concertinaPanel.getPanel (i)); | |||
| headers.clear(); | |||
| auto addPanel = [this] (const String& name, | |||
| TreePanelBase* tree, | |||
| ConcertinaTreeComponent::AdditionalComponents components, | |||
| const Path& icon) | |||
| { | |||
| if (project != nullptr) | |||
| concertinaPanel.addPanel (-1, new ConcertinaTreeComponent (name, tree, components), true); | |||
| headers.push_back (std::make_unique<ConcertinaHeader> (name, icon)); | |||
| }; | |||
| using AdditionalComponents = ConcertinaTreeComponent::AdditionalComponents; | |||
| addPanel ("File Explorer", new FileTreePanel (*project), | |||
| AdditionalComponents{} | |||
| .with (AdditionalComponents::addButton) | |||
| .with (AdditionalComponents::findPanel), | |||
| getIcons().fileExplorer); | |||
| addPanel ("Modules", new ModuleTreePanel (*project), | |||
| AdditionalComponents{} | |||
| .with (AdditionalComponents::addButton) | |||
| .with (AdditionalComponents::settingsButton), | |||
| getIcons().modules); | |||
| addPanel ("Exporters", new ExportersTreePanel (*project), | |||
| AdditionalComponents{}.with (AdditionalComponents::addButton), | |||
| getIcons().exporter); | |||
| for (int i = 0; i < concertinaPanel.getNumPanels(); ++i) | |||
| { | |||
| auto* p = concertinaPanel.getPanel (i); | |||
| auto* h = headers[(size_t) i].get(); | |||
| p->addMouseListener (this, true); | |||
| h->addChangeListener (this); | |||
| h->yPosition = i * 30; | |||
| concertinaPanel.setCustomPanelHeader (p, h, false); | |||
| concertinaPanel.setPanelHeaderSize (p, 30); | |||
| } | |||
| addAndMakeVisible (concertinaPanel); | |||
| } | |||
| void mouseDown (const MouseEvent& e) override | |||
| { | |||
| for (auto i = concertinaPanel.getNumPanels() - 1; i >= 0; --i) | |||
| { | |||
| auto* p = concertinaPanel.getPanel (i); | |||
| if (! (p->isParentOf (e.eventComponent))) | |||
| { | |||
| auto* base = dynamic_cast<TreePanelBase*> (p); | |||
| if (base == nullptr) | |||
| base = dynamic_cast<ConcertinaTreeComponent*> (p)->getTree(); | |||
| if (base != nullptr) | |||
| base->tree.clearSelectedItems(); | |||
| } | |||
| } | |||
| } | |||
| //============================================================================== | |||
| ConcertinaPanel concertinaPanel; | |||
| std::vector<std::unique_ptr<ConcertinaHeader>> headers; | |||
| Project* project = nullptr; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Sidebar) | |||
| }; | |||
| @@ -1,297 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| By using JUCE, you agree to the terms of both the JUCE 6 End-User License | |||
| Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). | |||
| End User License Agreement: www.juce.com/juce-6-licence | |||
| Privacy Policy: www.juce.com/juce-privacy-policy | |||
| Or: You may also use this code under the terms of the GPL v3 (see | |||
| www.gnu.org/licenses). | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #pragma once | |||
| //============================================================================== | |||
| class ConcertinaHeader : public Component, | |||
| public ChangeBroadcaster | |||
| { | |||
| public: | |||
| ConcertinaHeader (String n, Path p) | |||
| : Component (n), name (n), iconPath (p) | |||
| { | |||
| setTitle (getName()); | |||
| panelIcon = Icon (iconPath, Colours::white); | |||
| nameLabel.setText (name, dontSendNotification); | |||
| nameLabel.setJustificationType (Justification::centredLeft); | |||
| nameLabel.setInterceptsMouseClicks (false, false); | |||
| nameLabel.setAccessible (false); | |||
| nameLabel.setColour (Label::textColourId, Colours::white); | |||
| addAndMakeVisible (nameLabel); | |||
| } | |||
| void resized() override | |||
| { | |||
| auto b = getLocalBounds().toFloat(); | |||
| iconBounds = b.removeFromLeft (b.getHeight()).reduced (7, 7); | |||
| arrowBounds = b.removeFromRight (b.getHeight()); | |||
| nameLabel.setBounds (b.toNearestInt()); | |||
| } | |||
| void paint (Graphics& g) override | |||
| { | |||
| g.setColour (findColour (defaultButtonBackgroundColourId)); | |||
| g.fillRoundedRectangle (getLocalBounds().reduced (2, 3).toFloat(), 2.0f); | |||
| g.setColour (Colours::white); | |||
| g.fillPath (arrowPath = ProjucerLookAndFeel::getArrowPath (arrowBounds, | |||
| getParentComponent()->getBoundsInParent().getY() == yPosition ? 2 : 0, | |||
| true, Justification::centred)); | |||
| panelIcon.draw (g, iconBounds.toFloat(), false); | |||
| } | |||
| void mouseUp (const MouseEvent& e) override | |||
| { | |||
| if (! e.mouseWasDraggedSinceMouseDown()) | |||
| sendChangeMessage(); | |||
| } | |||
| std::unique_ptr<AccessibilityHandler> createAccessibilityHandler() override | |||
| { | |||
| return std::make_unique<AccessibilityHandler> (*this, | |||
| AccessibilityRole::button, | |||
| AccessibilityActions().addAction (AccessibilityActionType::press, | |||
| [this] { sendChangeMessage(); })); | |||
| } | |||
| int direction = 0; | |||
| int yPosition = 0; | |||
| private: | |||
| String name; | |||
| Label nameLabel; | |||
| Path iconPath; | |||
| Icon panelIcon; | |||
| Rectangle<float> arrowBounds, iconBounds; | |||
| Path arrowPath; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ConcertinaHeader) | |||
| }; | |||
| //============================================================================== | |||
| class FindPanel : public Component, | |||
| private Timer, | |||
| private FocusChangeListener | |||
| { | |||
| public: | |||
| FindPanel (std::function<void (const String&)> cb) | |||
| : callback (cb) | |||
| { | |||
| addAndMakeVisible (editor); | |||
| editor.onTextChange = [this] { startTimer (250); }; | |||
| editor.onFocusLost = [this] | |||
| { | |||
| isFocused = false; | |||
| repaint(); | |||
| }; | |||
| Desktop::getInstance().addFocusChangeListener (this); | |||
| lookAndFeelChanged(); | |||
| } | |||
| ~FindPanel() override | |||
| { | |||
| Desktop::getInstance().removeFocusChangeListener (this); | |||
| } | |||
| void paintOverChildren (Graphics& g) override | |||
| { | |||
| if (! isFocused) | |||
| return; | |||
| g.setColour (findColour (defaultHighlightColourId)); | |||
| Path p; | |||
| p.addRoundedRectangle (getLocalBounds().reduced (2), 3.0f); | |||
| g.strokePath (p, PathStrokeType (2.0f)); | |||
| } | |||
| void resized() override | |||
| { | |||
| editor.setBounds (getLocalBounds().reduced (2)); | |||
| } | |||
| private: | |||
| TextEditor editor; | |||
| bool isFocused = false; | |||
| std::function<void (const String&)> callback; | |||
| //============================================================================== | |||
| void lookAndFeelChanged() override | |||
| { | |||
| editor.setTextToShowWhenEmpty ("Filter...", findColour (widgetTextColourId).withAlpha (0.3f)); | |||
| } | |||
| void globalFocusChanged (Component* focusedComponent) override | |||
| { | |||
| if (focusedComponent == &editor) | |||
| { | |||
| isFocused = true; | |||
| repaint(); | |||
| } | |||
| } | |||
| void timerCallback() override | |||
| { | |||
| stopTimer(); | |||
| callback (editor.getText()); | |||
| } | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FindPanel) | |||
| }; | |||
| //============================================================================== | |||
| class ConcertinaTreeComponent : public Component | |||
| { | |||
| public: | |||
| class AdditionalComponents | |||
| { | |||
| public: | |||
| enum Type | |||
| { | |||
| addButton = (1 << 0), | |||
| settingsButton = (1 << 1), | |||
| findPanel = (1 << 2) | |||
| }; | |||
| AdditionalComponents with (Type t) | |||
| { | |||
| auto copy = *this; | |||
| copy.componentTypes |= t; | |||
| return copy; | |||
| } | |||
| bool has (Type t) const noexcept | |||
| { | |||
| return (componentTypes & t) != 0; | |||
| } | |||
| private: | |||
| int componentTypes = 0; | |||
| }; | |||
| ConcertinaTreeComponent (const String& name, | |||
| TreePanelBase* tree, | |||
| AdditionalComponents additionalComponents) | |||
| : Component (name), | |||
| treeToDisplay (tree) | |||
| { | |||
| setTitle (getName()); | |||
| setFocusContainerType (FocusContainerType::focusContainer); | |||
| if (additionalComponents.has (AdditionalComponents::addButton)) | |||
| { | |||
| addButton = std::make_unique<IconButton> ("Add", getIcons().plus); | |||
| addAndMakeVisible (addButton.get()); | |||
| addButton->onClick = [this] { showAddMenu(); }; | |||
| } | |||
| if (additionalComponents.has (AdditionalComponents::settingsButton)) | |||
| { | |||
| settingsButton = std::make_unique<IconButton> ("Settings", getIcons().settings); | |||
| addAndMakeVisible (settingsButton.get()); | |||
| settingsButton->onClick = [this] { showSettings(); }; | |||
| } | |||
| if (additionalComponents.has (AdditionalComponents::findPanel)) | |||
| { | |||
| findPanel = std::make_unique<FindPanel> ([this] (const String& filter) { treeToDisplay->rootItem->setSearchFilter (filter); }); | |||
| addAndMakeVisible (findPanel.get()); | |||
| } | |||
| addAndMakeVisible (treeToDisplay.get()); | |||
| } | |||
| void resized() override | |||
| { | |||
| auto bounds = getLocalBounds(); | |||
| if (addButton != nullptr || settingsButton != nullptr || findPanel != nullptr) | |||
| { | |||
| auto bottomSlice = bounds.removeFromBottom (25); | |||
| bottomSlice.removeFromRight (3); | |||
| if (addButton != nullptr) | |||
| addButton->setBounds (bottomSlice.removeFromRight (25).reduced (2)); | |||
| if (settingsButton != nullptr) | |||
| settingsButton->setBounds (bottomSlice.removeFromRight (25).reduced (2)); | |||
| if (findPanel != nullptr) | |||
| findPanel->setBounds (bottomSlice.reduced (2)); | |||
| } | |||
| treeToDisplay->setBounds (bounds); | |||
| } | |||
| TreePanelBase* getTree() const noexcept { return treeToDisplay.get(); } | |||
| private: | |||
| std::unique_ptr<TreePanelBase> treeToDisplay; | |||
| std::unique_ptr<IconButton> addButton, settingsButton; | |||
| std::unique_ptr<FindPanel> findPanel; | |||
| void showAddMenu() | |||
| { | |||
| auto numSelected = treeToDisplay->tree.getNumSelectedItems(); | |||
| if (numSelected > 1) | |||
| return; | |||
| if (numSelected == 0) | |||
| { | |||
| if (auto* root = dynamic_cast<JucerTreeViewBase*> (treeToDisplay->tree.getRootItem())) | |||
| root->showPopupMenu (addButton->getScreenBounds().getCentre()); | |||
| } | |||
| else | |||
| { | |||
| if (auto* item = dynamic_cast<JucerTreeViewBase*> (treeToDisplay->tree.getSelectedItem (0))) | |||
| item->showAddMenu (addButton->getScreenBounds().getCentre()); | |||
| } | |||
| } | |||
| void showSettings() | |||
| { | |||
| if (auto* root = dynamic_cast<JucerTreeViewBase*> (treeToDisplay->tree.getRootItem())) | |||
| { | |||
| treeToDisplay->tree.clearSelectedItems(); | |||
| root->showDocument(); | |||
| } | |||
| } | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ConcertinaTreeComponent) | |||
| }; | |||
| @@ -30,12 +30,6 @@ | |||
| #include "../../ProjectSaving/jucer_ProjectExporter.h" | |||
| #include "../../Project/UI/jucer_ProjectContentComponent.h" | |||
| #include "../../LiveBuildEngine/jucer_MessageIDs.h" | |||
| #include "../../LiveBuildEngine/jucer_SourceCodeRange.h" | |||
| #include "../../LiveBuildEngine/jucer_ClassDatabase.h" | |||
| #include "../../LiveBuildEngine/jucer_DiagnosticMessage.h" | |||
| #include "../../LiveBuildEngine/jucer_CompileEngineClient.h" | |||
| //============================================================================== | |||
| HeaderComponent::HeaderComponent (ProjectContentComponent* pcc) | |||
| : projectContentComponent (pcc) | |||
| @@ -60,15 +54,6 @@ HeaderComponent::HeaderComponent (ProjectContentComponent* pcc) | |||
| initialiseButtons(); | |||
| } | |||
| HeaderComponent::~HeaderComponent() | |||
| { | |||
| if (childProcess != nullptr) | |||
| { | |||
| childProcess->activityList.removeChangeListener (this); | |||
| childProcess->errorList.removeChangeListener (this); | |||
| } | |||
| } | |||
| //============================================================================== | |||
| void HeaderComponent::resized() | |||
| { | |||
| @@ -95,7 +80,6 @@ void HeaderComponent::resized() | |||
| exporterBounds.setCentre (bounds.getCentre()); | |||
| runAppButton.setBounds (exporterBounds.removeFromRight (exporterBounds.getHeight()).reduced (2)); | |||
| saveAndOpenInIDEButton.setBounds (exporterBounds.removeFromRight (exporterBounds.getHeight()).reduced (2)); | |||
| exporterBounds.removeFromRight (5); | |||
| @@ -110,17 +94,11 @@ void HeaderComponent::resized() | |||
| void HeaderComponent::paint (Graphics& g) | |||
| { | |||
| g.fillAll (findColour (backgroundColourId)); | |||
| if (isBuilding) | |||
| getLookAndFeel().drawSpinningWaitAnimation (g, findColour (treeIconColourId), | |||
| runAppButton.getX(), runAppButton.getY(), | |||
| runAppButton.getWidth(), runAppButton.getHeight()); | |||
| } | |||
| //============================================================================== | |||
| void HeaderComponent::setCurrentProject (Project* newProject) | |||
| { | |||
| isBuilding = false; | |||
| stopTimer(); | |||
| repaint(); | |||
| @@ -137,22 +115,6 @@ void HeaderComponent::setCurrentProject (Project* newProject) | |||
| projectNameValue.referTo (project->getProjectValue (Ids::name)); | |||
| projectNameValue.addListener (this); | |||
| updateName(); | |||
| childProcess = ProjucerApplication::getApp().childProcessCache->getExisting (*project); | |||
| if (childProcess != nullptr) | |||
| { | |||
| childProcess->activityList.addChangeListener (this); | |||
| childProcess->errorList.addChangeListener (this); | |||
| runAppButton.setTooltip ({}); | |||
| runAppButton.setEnabled (true); | |||
| } | |||
| else | |||
| { | |||
| runAppButton.setTooltip ("Enable live-build engine to launch application"); | |||
| runAppButton.setEnabled (false); | |||
| } | |||
| } | |||
| } | |||
| @@ -236,25 +198,11 @@ void HeaderComponent::sidebarTabsWidthChanged (int newWidth) | |||
| resized(); | |||
| } | |||
| void HeaderComponent::liveBuildEnablementChanged (bool isEnabled) | |||
| { | |||
| runAppButton.setVisible (isEnabled); | |||
| } | |||
| //============================================================================== | |||
| void HeaderComponent::changeListenerCallback (ChangeBroadcaster* source) | |||
| { | |||
| if (source == &userAvatar) | |||
| { | |||
| resized(); | |||
| } | |||
| else if (childProcess != nullptr && source == &childProcess->activityList) | |||
| { | |||
| if (childProcess->activityList.getNumActivities() > 0) | |||
| buildPing(); | |||
| else | |||
| buildFinished (childProcess->errorList.getNumErrors() == 0); | |||
| } | |||
| } | |||
| void HeaderComponent::valueChanged (Value&) | |||
| @@ -305,14 +253,6 @@ void HeaderComponent::initialiseButtons() | |||
| } | |||
| }; | |||
| addAndMakeVisible (runAppButton); | |||
| runAppButton.setIconInset (7); | |||
| runAppButton.onClick = [this] | |||
| { | |||
| if (childProcess != nullptr) | |||
| childProcess->launchApp(); | |||
| }; | |||
| updateExporterButton(); | |||
| } | |||
| @@ -339,57 +279,3 @@ void HeaderComponent::updateExporterButton() | |||
| } | |||
| } | |||
| } | |||
| //============================================================================== | |||
| void HeaderComponent::buildPing() | |||
| { | |||
| if (! isTimerRunning()) | |||
| { | |||
| isBuilding = true; | |||
| runAppButton.setEnabled (false); | |||
| runAppButton.setTooltip ("Building..."); | |||
| startTimer (50); | |||
| } | |||
| } | |||
| void HeaderComponent::buildFinished (bool success) | |||
| { | |||
| stopTimer(); | |||
| isBuilding = false; | |||
| repaint(); | |||
| setRunAppButtonState (success); | |||
| } | |||
| void HeaderComponent::setRunAppButtonState (bool buildWasSuccessful) | |||
| { | |||
| bool shouldEnableButton = false; | |||
| if (buildWasSuccessful) | |||
| { | |||
| if (childProcess != nullptr) | |||
| { | |||
| if (childProcess->isAppRunning() || (! childProcess->isAppRunning() && childProcess->canLaunchApp())) | |||
| { | |||
| runAppButton.setTooltip ("Launch application"); | |||
| shouldEnableButton = true; | |||
| } | |||
| else | |||
| { | |||
| runAppButton.setTooltip ("Application can't be launched"); | |||
| } | |||
| } | |||
| else | |||
| { | |||
| runAppButton.setTooltip ("Enable live-build engine to launch application"); | |||
| } | |||
| } | |||
| else | |||
| { | |||
| runAppButton.setTooltip ("Error building application"); | |||
| } | |||
| runAppButton.setEnabled (shouldEnableButton); | |||
| } | |||
| @@ -32,7 +32,6 @@ | |||
| class Project; | |||
| class ProjectContentComponent; | |||
| class ProjectExporter; | |||
| class CompileEngineChildProcess; | |||
| //============================================================================== | |||
| class HeaderComponent : public Component, | |||
| @@ -43,7 +42,6 @@ class HeaderComponent : public Component, | |||
| { | |||
| public: | |||
| HeaderComponent (ProjectContentComponent* projectContentComponent); | |||
| ~HeaderComponent() override; | |||
| //============================================================================== | |||
| void resized() override; | |||
| @@ -57,7 +55,6 @@ public: | |||
| bool canCurrentExporterLaunchProject() const; | |||
| void sidebarTabsWidthChanged (int newWidth); | |||
| void liveBuildEnablementChanged (bool isEnabled); | |||
| private: | |||
| //============================================================================== | |||
| @@ -82,14 +79,8 @@ private: | |||
| void updateName(); | |||
| void updateExporterButton(); | |||
| //============================================================================== | |||
| void buildPing(); | |||
| void buildFinished (bool); | |||
| void setRunAppButtonState (bool); | |||
| //============================================================================== | |||
| int tabsWidth = 200; | |||
| bool isBuilding = false; | |||
| ProjectContentComponent* projectContentComponent = nullptr; | |||
| Project* project = nullptr; | |||
| @@ -104,10 +95,7 @@ private: | |||
| UserAvatarComponent userAvatar { true }; | |||
| IconButton projectSettingsButton { "Project Settings", getIcons().settings }, | |||
| saveAndOpenInIDEButton { "Save and Open in IDE", Image() }, | |||
| runAppButton { "Run Application", getIcons().play }; | |||
| ReferenceCountedObjectPtr<CompileEngineChildProcess> childProcess; | |||
| saveAndOpenInIDEButton { "Save and Open in IDE", Image() }; | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (HeaderComponent) | |||
| }; | |||
| @@ -25,17 +25,14 @@ | |||
| #include "../../Application/jucer_Headers.h" | |||
| #include "jucer_ProjectContentComponent.h" | |||
| #include "../../LiveBuildEngine/jucer_DownloadCompileEngineThread.h" | |||
| #include "../../LiveBuildEngine/jucer_CompileEngineSettings.h" | |||
| #include "Sidebar/jucer_TabComponents.h" | |||
| #include "Sidebar/jucer_ProjectTab.h" | |||
| #include "Sidebar/jucer_LiveBuildTab.h" | |||
| #include "Sidebar/jucer_Sidebar.h" | |||
| NewFileWizard::Type* createGUIComponentWizard(); | |||
| //============================================================================== | |||
| ProjectContentComponent::ProjectContentComponent() | |||
| : sidebar (new Sidebar (project)) | |||
| { | |||
| setOpaque (true); | |||
| setWantsKeyboardFocus (true); | |||
| @@ -47,25 +44,13 @@ ProjectContentComponent::ProjectContentComponent() | |||
| sidebarSizeConstrainer.setMinimumWidth (200); | |||
| sidebarSizeConstrainer.setMaximumWidth (500); | |||
| sidebarTabs.setOutline (0); | |||
| sidebarTabs.getTabbedButtonBar().setMinimumTabScaleFactor (0.5); | |||
| sidebarTabs.setTitle ("Sidebar"); | |||
| sidebarTabs.setFocusContainerType (FocusContainerType::focusContainer); | |||
| ProjucerApplication::getApp().openDocumentManager.addListener (this); | |||
| isLiveBuildEnabled = getGlobalProperties().getBoolValue (Ids::liveBuildEnabled); | |||
| getGlobalProperties().addChangeListener (this); | |||
| liveBuildEnablementChanged (isLiveBuildEnabled); | |||
| Desktop::getInstance().addFocusChangeListener (this); | |||
| } | |||
| ProjectContentComponent::~ProjectContentComponent() | |||
| { | |||
| Desktop::getInstance().removeFocusChangeListener (this); | |||
| killChildProcess(); | |||
| getGlobalProperties().removeChangeListener (this); | |||
| ProjucerApplication::getApp().openDocumentManager.removeListener (this); | |||
| @@ -91,18 +76,18 @@ void ProjectContentComponent::resized() | |||
| r.removeFromTop (10); | |||
| auto sidebarArea = r.removeFromLeft (sidebarTabs.getWidth() != 0 ? sidebarTabs.getWidth() | |||
| : r.getWidth() / 4); | |||
| auto sidebarArea = r.removeFromLeft (sidebar->getWidth() != 0 ? sidebar->getWidth() | |||
| : r.getWidth() / 4); | |||
| if (sidebarTabs.isVisible()) | |||
| sidebarTabs.setBounds (sidebarArea); | |||
| if (sidebar->isVisible()) | |||
| sidebar->setBounds (sidebarArea); | |||
| if (resizerBar != nullptr) | |||
| resizerBar->setBounds (r.withWidth (4)); | |||
| contentViewComponent.setBounds (r); | |||
| headerComponent.sidebarTabsWidthChanged (sidebarTabs.getWidth()); | |||
| headerComponent.sidebarTabsWidthChanged (sidebar->getWidth()); | |||
| } | |||
| void ProjectContentComponent::lookAndFeelChanged() | |||
| @@ -115,7 +100,7 @@ void ProjectContentComponent::lookAndFeelChanged() | |||
| void ProjectContentComponent::childBoundsChanged (Component* child) | |||
| { | |||
| if (child == &sidebarTabs) | |||
| if (child == sidebar.get()) | |||
| resized(); | |||
| } | |||
| @@ -123,133 +108,45 @@ void ProjectContentComponent::setProject (Project* newProject) | |||
| { | |||
| if (project != newProject) | |||
| { | |||
| lastCrashMessage = {}; | |||
| killChildProcess(); | |||
| if (project != nullptr) | |||
| project->removeChangeListener (this); | |||
| hideEditor(); | |||
| resizerBar = nullptr; | |||
| deleteProjectTabs(); | |||
| project = newProject; | |||
| rebuildProjectUI(); | |||
| } | |||
| } | |||
| //============================================================================== | |||
| static LiveBuildTab* findBuildTab (const TabbedComponent& tabs) | |||
| { | |||
| return dynamic_cast<LiveBuildTab*> (tabs.getTabContentComponent (1)); | |||
| } | |||
| bool ProjectContentComponent::isBuildTabEnabled() const | |||
| { | |||
| auto bt = findBuildTab (sidebarTabs); | |||
| return bt != nullptr && bt->isEnabled; | |||
| } | |||
| if (project != nullptr) | |||
| { | |||
| sidebar = std::make_unique<Sidebar> (project); | |||
| addAndMakeVisible (sidebar.get()); | |||
| void ProjectContentComponent::createProjectTabs() | |||
| { | |||
| jassert (project != nullptr); | |||
| //============================================================================== | |||
| resizerBar.reset (new ResizableEdgeComponent (sidebar.get(), &sidebarSizeConstrainer, | |||
| ResizableEdgeComponent::rightEdge)); | |||
| addAndMakeVisible (resizerBar.get()); | |||
| resizerBar->setAlwaysOnTop (true); | |||
| auto tabColour = Colours::transparentBlack; | |||
| project->addChangeListener (this); | |||
| sidebarTabs.addTab (getProjectTabName(), tabColour, new ProjectTab (project), true); | |||
| updateMissingFileStatuses(); | |||
| if (isLiveBuildEnabled) | |||
| { | |||
| CompileEngineChildProcess::Ptr childProc (getChildProcess()); | |||
| sidebarTabs.addTab (getBuildTabName(), tabColour, new LiveBuildTab (childProc, lastCrashMessage), true); | |||
| headerComponent.setVisible (true); | |||
| headerComponent.setCurrentProject (project); | |||
| if (childProc != nullptr) | |||
| projectMessagesComponent.setVisible (true); | |||
| } | |||
| else | |||
| { | |||
| childProc->crashHandler = [this] (const String& m) { this->handleCrash (m); }; | |||
| sidebarTabs.getTabbedButtonBar().getTabButton (1)->setExtraComponent (new BuildStatusTabComp (childProc->errorList, | |||
| childProc->activityList), | |||
| TabBarButton::afterText); | |||
| sidebar->setVisible (false); | |||
| headerComponent.setVisible (false); | |||
| projectMessagesComponent.setVisible (false); | |||
| } | |||
| } | |||
| } | |||
| void ProjectContentComponent::deleteProjectTabs() | |||
| { | |||
| if (project != nullptr && sidebarTabs.getNumTabs() > 0) | |||
| { | |||
| auto& settings = project->getStoredProperties(); | |||
| if (sidebarTabs.getWidth() > 0) | |||
| settings.setValue ("projectPanelWidth", sidebarTabs.getWidth()); | |||
| settings.setValue ("lastViewedTabIndex", sidebarTabs.getCurrentTabIndex()); | |||
| projectMessagesComponent.setProject (project); | |||
| for (int i = 0; i < 3; ++i) | |||
| settings.setValue ("projectTabPanelHeight" + String (i), | |||
| getProjectTab()->getPanelHeightProportion (i)); | |||
| } | |||
| sidebarTabs.clearTabs(); | |||
| } | |||
| void ProjectContentComponent::rebuildProjectUI() | |||
| { | |||
| deleteProjectTabs(); | |||
| if (project != nullptr) | |||
| { | |||
| addAndMakeVisible (sidebarTabs); | |||
| createProjectTabs(); | |||
| //============================================================================== | |||
| auto& settings = project->getStoredProperties(); | |||
| auto lastTreeWidth = settings.getValue ("projectPanelWidth").getIntValue(); | |||
| if (lastTreeWidth < 150) | |||
| lastTreeWidth = 240; | |||
| sidebarTabs.setBounds (0, 0, lastTreeWidth, getHeight()); | |||
| auto lastTabIndex = settings.getValue ("lastViewedTabIndex", "0").getIntValue(); | |||
| if (lastTabIndex >= sidebarTabs.getNumTabs()) | |||
| lastTabIndex = 0; | |||
| sidebarTabs.setCurrentTabIndex (lastTabIndex); | |||
| auto* projectTab = getProjectTab(); | |||
| for (int i = 2; i >= 0; --i) | |||
| projectTab->setPanelHeightProportion (i, settings.getValue ("projectTabPanelHeight" + String (i), "1") | |||
| .getFloatValue()); | |||
| //============================================================================== | |||
| resizerBar.reset (new ResizableEdgeComponent (&sidebarTabs, &sidebarSizeConstrainer, | |||
| ResizableEdgeComponent::rightEdge)); | |||
| addAndMakeVisible (resizerBar.get()); | |||
| resizerBar->setAlwaysOnTop (true); | |||
| project->addChangeListener (this); | |||
| updateMissingFileStatuses(); | |||
| headerComponent.setVisible (true); | |||
| headerComponent.setCurrentProject (project); | |||
| projectMessagesComponent.setVisible (true); | |||
| } | |||
| else | |||
| { | |||
| sidebarTabs.setVisible (false); | |||
| headerComponent.setVisible (false); | |||
| projectMessagesComponent.setVisible (false); | |||
| resized(); | |||
| } | |||
| projectMessagesComponent.setProject (project); | |||
| resized(); | |||
| } | |||
| void ProjectContentComponent::saveTreeViewState() | |||
| @@ -288,30 +185,19 @@ bool ProjectContentComponent::documentAboutToClose (OpenDocumentManager::Documen | |||
| void ProjectContentComponent::changeListenerCallback (ChangeBroadcaster* broadcaster) | |||
| { | |||
| if (broadcaster == project) | |||
| { | |||
| updateMissingFileStatuses(); | |||
| } | |||
| else if (broadcaster == &getGlobalProperties()) | |||
| { | |||
| auto isEnabled = ProjucerApplication::getApp().isLiveBuildEnabled(); | |||
| if (isLiveBuildEnabled != isEnabled) | |||
| liveBuildEnablementChanged (isEnabled); | |||
| } | |||
| } | |||
| void ProjectContentComponent::refreshProjectTreeFileStatuses() | |||
| { | |||
| if (auto* projectTab = getProjectTab()) | |||
| if (auto* fileTree = projectTab->getFileTreePanel()) | |||
| fileTree->repaint(); | |||
| if (auto* fileTree = sidebar->getFileTreePanel()) | |||
| fileTree->repaint(); | |||
| } | |||
| void ProjectContentComponent::updateMissingFileStatuses() | |||
| { | |||
| if (auto* pTab = getProjectTab()) | |||
| if (auto* tree = pTab->getFileTreePanel()) | |||
| tree->updateMissingFileStatuses(); | |||
| if (auto* tree = sidebar->getFileTreePanel()) | |||
| tree->updateMissingFileStatuses(); | |||
| } | |||
| bool ProjectContentComponent::showEditorForFile (const File& fileToShow, bool grabFocus) | |||
| @@ -529,7 +415,7 @@ void ProjectContentComponent::showExporterSettings (const String& exporterName) | |||
| showExportersPanel(); | |||
| if (auto* exportersPanel = getProjectTab()->getExportersTreePanel()) | |||
| if (auto* exportersPanel = sidebar->getExportersTreePanel()) | |||
| { | |||
| if (auto* exporters = dynamic_cast<TreeItemTypes::ExportersTreeRoot*> (exportersPanel->rootItem.get())) | |||
| { | |||
| @@ -554,7 +440,7 @@ void ProjectContentComponent::showModule (const String& moduleID) | |||
| { | |||
| showModulesPanel(); | |||
| if (auto* modsPanel = getProjectTab()->getModuleTreePanel()) | |||
| if (auto* modsPanel = sidebar->getModuleTreePanel()) | |||
| { | |||
| if (auto* mods = dynamic_cast<TreeItemTypes::EnabledModulesItem*> (modsPanel->rootItem.get())) | |||
| { | |||
| @@ -575,11 +461,6 @@ void ProjectContentComponent::showModule (const String& moduleID) | |||
| } | |||
| } | |||
| void ProjectContentComponent::showLiveBuildSettings() | |||
| { | |||
| setScrollableEditorComponent (std::make_unique<LiveBuildSettingsComponent> (*project)); | |||
| } | |||
| StringArray ProjectContentComponent::getExportersWhichCanLaunch() const | |||
| { | |||
| StringArray s; | |||
| @@ -640,7 +521,7 @@ void ProjectContentComponent::showNewExporterMenu() | |||
| void ProjectContentComponent::deleteSelectedTreeItems() | |||
| { | |||
| if (auto* tree = getProjectTab()->getTreeWithSelectedItems()) | |||
| if (auto* tree = sidebar->getTreeWithSelectedItems()) | |||
| tree->deleteSelectedItems(); | |||
| } | |||
| @@ -721,8 +602,6 @@ void ProjectContentComponent::getAllCommands (Array <CommandID>& commands) | |||
| CommandIDs::goToNextDoc, | |||
| CommandIDs::goToCounterpart, | |||
| CommandIDs::showProjectSettings, | |||
| CommandIDs::showProjectTab, | |||
| CommandIDs::showBuildTab, | |||
| CommandIDs::showFileExplorerPanel, | |||
| CommandIDs::showModulesPanel, | |||
| CommandIDs::showExportersPanel, | |||
| @@ -732,16 +611,6 @@ void ProjectContentComponent::getAllCommands (Array <CommandID>& commands) | |||
| CommandIDs::createNewExporter, | |||
| CommandIDs::deleteSelectedItem, | |||
| CommandIDs::showTranslationTool, | |||
| CommandIDs::cleanAll, | |||
| CommandIDs::toggleBuildEnabled, | |||
| CommandIDs::buildNow, | |||
| CommandIDs::toggleContinuousBuild, | |||
| CommandIDs::launchApp, | |||
| CommandIDs::killApp, | |||
| CommandIDs::reinstantiateComp, | |||
| CommandIDs::showWarnings, | |||
| CommandIDs::nextError, | |||
| CommandIDs::prevError, | |||
| CommandIDs::addNewGUIFile }); | |||
| } | |||
| @@ -830,22 +699,6 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica | |||
| result.defaultKeypresses.add ({ 'x', cmdCtrl, 0 }); | |||
| break; | |||
| case CommandIDs::showProjectTab: | |||
| result.setInfo ("Show Project Tab", | |||
| "Shows the tab containing the project information", | |||
| CommandCategories::general, 0); | |||
| result.setActive (project != nullptr); | |||
| result.defaultKeypresses.add ({ 'p', cmdCtrl, 0 }); | |||
| break; | |||
| case CommandIDs::showBuildTab: | |||
| result.setInfo ("Show Build Tab", | |||
| "Shows the tab containing the build panel", | |||
| CommandCategories::general, 0); | |||
| result.setActive (project != nullptr && isLiveBuildEnabled); | |||
| result.defaultKeypresses.add ({ 'b', cmdCtrl, 0 }); | |||
| break; | |||
| case CommandIDs::showFileExplorerPanel: | |||
| result.setInfo ("Show File Explorer Panel", | |||
| "Shows the panel containing the tree of files for this project", | |||
| @@ -906,7 +759,6 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica | |||
| CommandCategories::general, 0); | |||
| result.defaultKeypresses.add ({ KeyPress::deleteKey, 0, 0 }); | |||
| result.defaultKeypresses.add ({ KeyPress::backspaceKey, 0, 0 }); | |||
| result.setActive (sidebarTabs.getCurrentTabIndex() == 0); | |||
| break; | |||
| case CommandIDs::showTranslationTool: | |||
| @@ -915,87 +767,6 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica | |||
| CommandCategories::general, 0); | |||
| break; | |||
| case CommandIDs::cleanAll: | |||
| result.setInfo ("Clean All", | |||
| "Cleans all intermediate files", | |||
| CommandCategories::general, 0); | |||
| result.defaultKeypresses.add ({ 'k', ModifierKeys::commandModifier | ModifierKeys::shiftModifier, 0 }); | |||
| result.setActive (project != nullptr); | |||
| break; | |||
| case CommandIDs::toggleBuildEnabled: | |||
| result.setInfo ("Enable Compilation", | |||
| "Enables/disables the compiler", | |||
| CommandCategories::general, 0); | |||
| result.defaultKeypresses.add ({ 'b', ModifierKeys::commandModifier | ModifierKeys::shiftModifier, 0 }); | |||
| result.setActive (project != nullptr); | |||
| result.setTicked (childProcess != nullptr); | |||
| break; | |||
| case CommandIDs::buildNow: | |||
| result.setInfo ("Build Now", | |||
| "Recompiles any out-of-date files and updates the JIT engine", | |||
| CommandCategories::general, 0); | |||
| result.defaultKeypresses.add ({ 'b', ModifierKeys::commandModifier, 0 }); | |||
| result.setActive (childProcess != nullptr); | |||
| break; | |||
| case CommandIDs::toggleContinuousBuild: | |||
| result.setInfo ("Enable Continuous Recompiling", | |||
| "Continuously recompiles any changes made in code editors", | |||
| CommandCategories::general, 0); | |||
| result.setActive (childProcess != nullptr); | |||
| result.setTicked (isContinuousRebuildEnabled()); | |||
| break; | |||
| case CommandIDs::launchApp: | |||
| result.setInfo ("Launch Application", | |||
| "Invokes the app's main() function", | |||
| CommandCategories::general, 0); | |||
| result.defaultKeypresses.add ({ 'r', ModifierKeys::commandModifier, 0 }); | |||
| result.setActive (childProcess != nullptr && childProcess->canLaunchApp()); | |||
| break; | |||
| case CommandIDs::killApp: | |||
| result.setInfo ("Stop Application", | |||
| "Kills the app if it's running", | |||
| CommandCategories::general, 0); | |||
| result.defaultKeypresses.add ({ '.', ModifierKeys::commandModifier, 0 }); | |||
| result.setActive (childProcess != nullptr && childProcess->canKillApp()); | |||
| break; | |||
| case CommandIDs::reinstantiateComp: | |||
| result.setInfo ("Re-instantiate Components", | |||
| "Re-loads any component editors that are open", | |||
| CommandCategories::general, 0); | |||
| result.defaultKeypresses.add ({ 'r', ModifierKeys::commandModifier | ModifierKeys::shiftModifier, 0 }); | |||
| result.setActive (childProcess != nullptr); | |||
| break; | |||
| case CommandIDs::showWarnings: | |||
| result.setInfo ("Show Warnings", | |||
| "Shows or hides compilation warnings", | |||
| CommandCategories::general, 0); | |||
| result.setActive (project != nullptr); | |||
| result.setTicked (areWarningsEnabled()); | |||
| break; | |||
| case CommandIDs::nextError: | |||
| result.setInfo ("Highlight next error", | |||
| "Jumps to the next error or warning", | |||
| CommandCategories::general, 0); | |||
| result.defaultKeypresses.add ({ '\'', ModifierKeys::commandModifier, 0 }); | |||
| result.setActive (childProcess != nullptr && ! childProcess->errorList.isEmpty()); | |||
| break; | |||
| case CommandIDs::prevError: | |||
| result.setInfo ("Highlight previous error", | |||
| "Jumps to the last error or warning", | |||
| CommandCategories::general, 0); | |||
| result.defaultKeypresses.add ({ '\"', ModifierKeys::commandModifier, 0 }); | |||
| result.setActive (childProcess != nullptr && ! childProcess->errorList.isEmpty()); | |||
| break; | |||
| case CommandIDs::addNewGUIFile: | |||
| result.setInfo ("Add new GUI Component...", | |||
| "Adds a new GUI Component file to the project", | |||
| @@ -1052,8 +823,6 @@ bool ProjectContentComponent::perform (const InvocationInfo& info) | |||
| case CommandIDs::goToCounterpart: goToCounterpart(); break; | |||
| case CommandIDs::showProjectSettings: showProjectSettings(); break; | |||
| case CommandIDs::showProjectTab: showProjectTab(); break; | |||
| case CommandIDs::showBuildTab: showBuildTab(); break; | |||
| case CommandIDs::showFileExplorerPanel: showFilesPanel(); break; | |||
| case CommandIDs::showModulesPanel: showModulesPanel(); break; | |||
| case CommandIDs::showExportersPanel: showExportersPanel(); break; | |||
| @@ -1068,17 +837,6 @@ bool ProjectContentComponent::perform (const InvocationInfo& info) | |||
| case CommandIDs::showTranslationTool: showTranslationTool(); break; | |||
| case CommandIDs::cleanAll: cleanAll(); break; | |||
| case CommandIDs::toggleBuildEnabled: setBuildEnabled (! isBuildEnabled()); break; | |||
| case CommandIDs::buildNow: rebuildNow(); break; | |||
| case CommandIDs::toggleContinuousBuild: setContinuousRebuildEnabled (! isContinuousRebuildEnabled()); break; | |||
| case CommandIDs::launchApp: launchApp(); break; | |||
| case CommandIDs::killApp: killApp(); break; | |||
| case CommandIDs::reinstantiateComp: reinstantiateLivePreviewWindows(); break; | |||
| case CommandIDs::showWarnings: toggleWarnings(); break; | |||
| case CommandIDs::nextError: showNextError(); break; | |||
| case CommandIDs::prevError: showPreviousError(); break; | |||
| case CommandIDs::addNewGUIFile: addNewGUIFile(); break; | |||
| default: | |||
| @@ -1099,122 +857,6 @@ void ProjectContentComponent::getSelectedProjectItemsBeingDragged (const DragAnd | |||
| TreeItemTypes::FileTreeItemBase::getSelectedProjectItemsBeingDragged (dragSourceDetails, selectedNodes); | |||
| } | |||
| //============================================================================== | |||
| void ProjectContentComponent::killChildProcess() | |||
| { | |||
| if (childProcess != nullptr) | |||
| { | |||
| deleteProjectTabs(); | |||
| childProcess = nullptr; | |||
| ProjucerApplication::getApp().childProcessCache->removeOrphans(); | |||
| } | |||
| } | |||
| void ProjectContentComponent::setBuildEnabled (bool isEnabled, bool displayError) | |||
| { | |||
| if (project != nullptr && isEnabled != isBuildEnabled()) | |||
| { | |||
| if (! displayError) | |||
| lastCrashMessage = {}; | |||
| project->getCompileEngineSettings().setBuildEnabled (isEnabled); | |||
| killChildProcess(); | |||
| refreshTabsIfBuildStatusChanged(); | |||
| } | |||
| } | |||
| void ProjectContentComponent::cleanAll() | |||
| { | |||
| lastCrashMessage = {}; | |||
| if (childProcess != nullptr) | |||
| childProcess->cleanAll(); | |||
| else if (auto* p = getProject()) | |||
| CompileEngineChildProcess::cleanAllCachedFilesForProject (*p); | |||
| } | |||
| void ProjectContentComponent::handleCrash (const String& message) | |||
| { | |||
| lastCrashMessage = message.isEmpty() ? TRANS("JIT process stopped responding!") | |||
| : (TRANS("JIT process crashed!") + ":\n\n" + message); | |||
| if (project != nullptr) | |||
| { | |||
| setBuildEnabled (false, true); | |||
| showBuildTab(); | |||
| } | |||
| } | |||
| bool ProjectContentComponent::isBuildEnabled() const | |||
| { | |||
| return isLiveBuildEnabled | |||
| && project != nullptr | |||
| && project->getCompileEngineSettings().isBuildEnabled() | |||
| && CompileEngineDLL::getInstance()->isLoaded(); | |||
| } | |||
| void ProjectContentComponent::refreshTabsIfBuildStatusChanged() | |||
| { | |||
| if (project != nullptr | |||
| && isLiveBuildEnabled | |||
| && (sidebarTabs.getNumTabs() < 2 || isBuildEnabled() != isBuildTabEnabled())) | |||
| { | |||
| rebuildProjectUI(); | |||
| } | |||
| } | |||
| bool ProjectContentComponent::areWarningsEnabled() const | |||
| { | |||
| return project != nullptr && project->getCompileEngineSettings().areWarningsEnabled(); | |||
| } | |||
| void ProjectContentComponent::updateWarningState() | |||
| { | |||
| if (childProcess != nullptr) | |||
| childProcess->errorList.setWarningsEnabled (areWarningsEnabled()); | |||
| } | |||
| void ProjectContentComponent::toggleWarnings() | |||
| { | |||
| if (project != nullptr) | |||
| { | |||
| project->getCompileEngineSettings().setWarningsEnabled (! areWarningsEnabled()); | |||
| updateWarningState(); | |||
| } | |||
| } | |||
| static ProjucerAppClasses::ErrorListComp* findErrorListComp (const TabbedComponent& tabs) | |||
| { | |||
| if (auto* bt = findBuildTab (tabs)) | |||
| return bt->errorListComp; | |||
| return nullptr; | |||
| } | |||
| void ProjectContentComponent::showNextError() | |||
| { | |||
| if (auto* el = findErrorListComp (sidebarTabs)) | |||
| { | |||
| showBuildTab(); | |||
| el->showNext(); | |||
| } | |||
| } | |||
| void ProjectContentComponent::showPreviousError() | |||
| { | |||
| if (auto* el = findErrorListComp (sidebarTabs)) | |||
| { | |||
| showBuildTab(); | |||
| el->showPrevious(); | |||
| } | |||
| } | |||
| void ProjectContentComponent::reinstantiateLivePreviewWindows() | |||
| { | |||
| if (childProcess != nullptr) | |||
| childProcess->reinstantiatePreviews(); | |||
| } | |||
| void ProjectContentComponent::addNewGUIFile() | |||
| { | |||
| if (project != nullptr) | |||
| @@ -1224,131 +866,8 @@ void ProjectContentComponent::addNewGUIFile() | |||
| } | |||
| } | |||
| void ProjectContentComponent::launchApp() | |||
| { | |||
| if (childProcess != nullptr) | |||
| childProcess->launchApp(); | |||
| } | |||
| void ProjectContentComponent::killApp() | |||
| { | |||
| if (childProcess != nullptr) | |||
| childProcess->killApp(); | |||
| } | |||
| void ProjectContentComponent::rebuildNow() | |||
| { | |||
| if (childProcess != nullptr) | |||
| childProcess->flushEditorChanges(); | |||
| } | |||
| void ProjectContentComponent::globalFocusChanged (Component* focusedComponent) | |||
| { | |||
| auto nowForeground = (Process::isForegroundProcess() | |||
| && (focusedComponent == this || isParentOf (focusedComponent))); | |||
| if (nowForeground != isForeground) | |||
| { | |||
| isForeground = nowForeground; | |||
| if (childProcess != nullptr) | |||
| childProcess->processActivationChanged (isForeground); | |||
| } | |||
| } | |||
| void ProjectContentComponent::timerCallback() | |||
| { | |||
| if (! isBuildEnabled()) | |||
| killChildProcess(); | |||
| refreshTabsIfBuildStatusChanged(); | |||
| } | |||
| void ProjectContentComponent::liveBuildEnablementChanged (bool isEnabled) | |||
| { | |||
| isLiveBuildEnabled = isEnabled; | |||
| if (isLiveBuildEnabled) | |||
| { | |||
| startTimer (1600); | |||
| } | |||
| else | |||
| { | |||
| stopTimer(); | |||
| killChildProcess(); | |||
| } | |||
| rebuildProjectUI(); | |||
| headerComponent.liveBuildEnablementChanged (isLiveBuildEnabled); | |||
| } | |||
| bool ProjectContentComponent::isContinuousRebuildEnabled() | |||
| { | |||
| return project != nullptr && project->getCompileEngineSettings().isContinuousRebuildEnabled(); | |||
| } | |||
| void ProjectContentComponent::setContinuousRebuildEnabled (bool b) | |||
| { | |||
| if (project != nullptr && childProcess != nullptr) | |||
| { | |||
| project->getCompileEngineSettings().setContinuousRebuildEnabled (b); | |||
| ProjucerApplication::getCommandManager().commandStatusChanged(); | |||
| } | |||
| } | |||
| ReferenceCountedObjectPtr<CompileEngineChildProcess> ProjectContentComponent::getChildProcess() | |||
| { | |||
| if (childProcess == nullptr && isBuildEnabled()) | |||
| childProcess = ProjucerApplication::getApp().childProcessCache->getOrCreate (*project); | |||
| return childProcess; | |||
| } | |||
| void ProjectContentComponent::handleMissingSystemHeaders() | |||
| { | |||
| #if JUCE_MAC | |||
| String tabMessage ("Compiler not available due to missing system headers\nPlease install a recent version of Xcode"); | |||
| String alertWindowMessage ("Missing system headers\nPlease install a recent version of Xcode"); | |||
| #elif JUCE_WINDOWS | |||
| String tabMessage ("Compiler not available due to missing system headers\nPlease install a recent version of Visual Studio and the Windows Desktop SDK"); | |||
| String alertWindowMessage ("Missing system headers\nPlease install a recent version of Visual Studio and the Windows Desktop SDK"); | |||
| #elif JUCE_LINUX || JUCE_BSD | |||
| String tabMessage ("Compiler not available due to missing system headers\nPlease install using your package manager"); | |||
| String alertWindowMessage ("Missing system headers\nPlease install using your package manager"); | |||
| #endif | |||
| setBuildEnabled (false, true); | |||
| deleteProjectTabs(); | |||
| createProjectTabs(); | |||
| if (auto* bt = getLiveBuildTab()) | |||
| { | |||
| bt->isEnabled = false; | |||
| bt->errorMessage = tabMessage; | |||
| } | |||
| showBuildTab(); | |||
| AlertWindow::showMessageBox (AlertWindow::AlertIconType::WarningIcon, | |||
| "Missing system headers", alertWindowMessage); | |||
| } | |||
| //============================================================================== | |||
| void ProjectContentComponent::showProjectPanel (const int index) | |||
| { | |||
| showProjectTab(); | |||
| if (auto* pTab = getProjectTab()) | |||
| pTab->showPanel (index); | |||
| } | |||
| ProjectTab* ProjectContentComponent::getProjectTab() | |||
| { | |||
| return dynamic_cast<ProjectTab*> (sidebarTabs.getTabContentComponent (0)); | |||
| } | |||
| LiveBuildTab* ProjectContentComponent::getLiveBuildTab() | |||
| { | |||
| return dynamic_cast<LiveBuildTab*> (sidebarTabs.getTabContentComponent (1)); | |||
| sidebar->showPanel (index); | |||
| } | |||
| @@ -30,17 +30,13 @@ | |||
| #include "jucer_ProjectMessagesComponent.h" | |||
| #include "jucer_ContentViewComponent.h" | |||
| class CompileEngineChildProcess; | |||
| class ProjectTab; | |||
| class LiveBuildTab; | |||
| class Sidebar; | |||
| //============================================================================== | |||
| class ProjectContentComponent : public Component, | |||
| public ApplicationCommandTarget, | |||
| private ChangeListener, | |||
| private OpenDocumentManager::DocumentCloseListener, | |||
| private FocusChangeListener, | |||
| private Timer | |||
| private OpenDocumentManager::DocumentCloseListener | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| @@ -70,7 +66,7 @@ public: | |||
| void setEditorDocument (std::unique_ptr<Component> component, OpenDocumentManager::Document* doc); | |||
| Component* getEditorComponent(); | |||
| Component& getSidebarComponent() { return sidebarTabs; } | |||
| Component& getSidebarComponent(); | |||
| bool goToPreviousFile(); | |||
| bool goToNextFile(); | |||
| @@ -82,10 +78,6 @@ public: | |||
| void openInSelectedIDE (bool saveFirst); | |||
| void showNewExporterMenu(); | |||
| void showProjectTab() { sidebarTabs.setCurrentTabIndex (0); } | |||
| void showBuildTab() { sidebarTabs.setCurrentTabIndex (1); } | |||
| int getCurrentTabIndex() { return sidebarTabs.getCurrentTabIndex(); } | |||
| void showFilesPanel() { showProjectPanel (0); } | |||
| void showModulesPanel() { showProjectPanel (1); } | |||
| void showExportersPanel() { showProjectPanel (2); } | |||
| @@ -94,21 +86,12 @@ public: | |||
| void showCurrentExporterSettings(); | |||
| void showExporterSettings (const String& exporterName); | |||
| void showModule (const String& moduleID); | |||
| void showLiveBuildSettings(); | |||
| void showUserSettings(); | |||
| void deleteSelectedTreeItems(); | |||
| void refreshProjectTreeFileStatuses(); | |||
| void updateMissingFileStatuses(); | |||
| void createProjectTabs(); | |||
| void deleteProjectTabs(); | |||
| void rebuildProjectUI(); | |||
| void refreshTabsIfBuildStatusChanged(); | |||
| void toggleWarnings(); | |||
| void showNextError(); | |||
| void showPreviousError(); | |||
| void reinstantiateLivePreviewWindows(); | |||
| void addNewGUIFile(); | |||
| void showBubbleMessage (Rectangle<int>, const String&); | |||
| @@ -118,15 +101,6 @@ public: | |||
| static void getSelectedProjectItemsBeingDragged (const DragAndDropTarget::SourceDetails&, | |||
| OwnedArray<Project::Item>& selectedNodes); | |||
| //============================================================================== | |||
| void killChildProcess(); | |||
| void cleanAll(); | |||
| void handleMissingSystemHeaders(); | |||
| bool isBuildTabEnabled() const; | |||
| void setBuildEnabled (bool enabled, bool displayError = false); | |||
| bool isBuildEnabled() const; | |||
| bool areWarningsEnabled() const; | |||
| //============================================================================== | |||
| ApplicationCommandTarget* getNextCommandTarget() override; | |||
| void getAllCommands (Array<CommandID>&) override; | |||
| @@ -143,7 +117,6 @@ public: | |||
| ProjectMessagesComponent& getProjectMessagesComponent() { return projectMessagesComponent; } | |||
| static String getProjectTabName() { return "Project"; } | |||
| static String getBuildTabName() { return "Build"; } | |||
| private: | |||
| //============================================================================== | |||
| @@ -151,26 +124,8 @@ private: | |||
| void changeListenerCallback (ChangeBroadcaster*) override; | |||
| void showTranslationTool(); | |||
| void globalFocusChanged (Component*) override; | |||
| void timerCallback() override; | |||
| void liveBuildEnablementChanged (bool isEnabled); | |||
| bool isContinuousRebuildEnabled(); | |||
| void setContinuousRebuildEnabled (bool b); | |||
| void rebuildNow(); | |||
| void handleCrash (const String& message); | |||
| void updateWarningState(); | |||
| void launchApp(); | |||
| void killApp(); | |||
| ReferenceCountedObjectPtr<CompileEngineChildProcess> getChildProcess(); | |||
| //============================================================================== | |||
| void showProjectPanel (const int index); | |||
| ProjectTab* getProjectTab(); | |||
| LiveBuildTab* getLiveBuildTab(); | |||
| bool canSelectedProjectBeLaunch(); | |||
| //============================================================================== | |||
| @@ -179,7 +134,7 @@ private: | |||
| RecentDocumentList recentDocumentList; | |||
| HeaderComponent headerComponent { this }; | |||
| TabbedComponent sidebarTabs { TabbedButtonBar::TabsAtTop }; | |||
| std::unique_ptr<Sidebar> sidebar; | |||
| ProjectMessagesComponent projectMessagesComponent; | |||
| ContentViewComponent contentViewComponent; | |||
| @@ -188,10 +143,7 @@ private: | |||
| std::unique_ptr<Component> translationTool; | |||
| BubbleMessageComponent bubbleMessage; | |||
| ReferenceCountedObjectPtr<CompileEngineChildProcess> childProcess; | |||
| String lastCrashMessage; | |||
| bool isForeground = false, isLiveBuildEnabled = false; | |||
| bool isForeground = false; | |||
| int lastViewedTab = 0; | |||
| //============================================================================== | |||
| @@ -27,7 +27,6 @@ | |||
| #include "jucer_Project.h" | |||
| #include "../ProjectSaving/jucer_ProjectSaver.h" | |||
| #include "../Application/jucer_Application.h" | |||
| #include "../LiveBuildEngine/jucer_CompileEngineSettings.h" | |||
| //============================================================================== | |||
| Project::ProjectFileModificationPoller::ProjectFileModificationPoller (Project& p) | |||
| @@ -641,8 +640,6 @@ Result Project::loadDocument (const File& file) | |||
| moveOldPropertyFromProjectToAllExporters (Ids::smallIcon); | |||
| getEnabledModules().sortAlphabetically(); | |||
| compileEngineSettings.reset (new CompileEngineSettings (projectRoot)); | |||
| rescanExporterPathModules (! ProjucerApplication::getApp().isRunningCommandLine); | |||
| exporterPathsModulesList.addListener (this); | |||
| @@ -31,7 +31,6 @@ | |||
| class ProjectExporter; | |||
| class LibraryModule; | |||
| class EnabledModulesList; | |||
| class CompileEngineSettings; | |||
| namespace ProjectMessages | |||
| { | |||
| @@ -493,9 +492,6 @@ public: | |||
| File getTemporaryDirectory() const noexcept { return tempDirectory; } | |||
| void setTemporaryDirectory (const File&) noexcept; | |||
| //============================================================================== | |||
| CompileEngineSettings& getCompileEngineSettings() { return *compileEngineSettings; } | |||
| //============================================================================== | |||
| ValueTree getProjectMessages() const { return projectMessages; } | |||
| @@ -547,7 +543,6 @@ private: | |||
| pluginVSTNumMidiInputsValue, pluginVSTNumMidiOutputsValue; | |||
| //============================================================================== | |||
| std::unique_ptr<CompileEngineSettings> compileEngineSettings; | |||
| std::unique_ptr<EnabledModulesList> enabledModulesList; | |||
| AvailableModulesList exporterPathsModulesList; | |||
| @@ -74,19 +74,6 @@ void ProjectSaver::saveBasicProjectItems (const OwnedArray<LibraryModule>& modul | |||
| writeModuleCppWrappers (modules); | |||
| } | |||
| Result ProjectSaver::saveContentNeededForLiveBuild() | |||
| { | |||
| auto modules = getModules(); | |||
| if (errors.isEmpty()) | |||
| { | |||
| saveBasicProjectItems (modules, loadUserContentFromAppConfig()); | |||
| return Result::ok(); | |||
| } | |||
| return Result::fail (errors[0]); | |||
| } | |||
| Project::Item ProjectSaver::addFileToGeneratedGroup (const File& file) | |||
| { | |||
| auto item = generatedFilesGroup.findItemForFile (file); | |||
| @@ -39,7 +39,6 @@ public: | |||
| Result save (ProjectExporter* exporterToSave = nullptr); | |||
| Result saveResourcesOnly(); | |||
| void saveBasicProjectItems (const OwnedArray<LibraryModule>& modules, const String& appConfigUserContent); | |||
| Result saveContentNeededForLiveBuild(); | |||
| Project& getProject() { return project; } | |||
| @@ -25,10 +25,6 @@ | |||
| #include "../../Application/jucer_Headers.h" | |||
| #ifdef BUILDING_JUCE_COMPILEENGINE | |||
| const char* getPreferredLineFeed() { return "\r\n"; } | |||
| #endif | |||
| //============================================================================== | |||
| String joinLinesIntoSourceFile (StringArray& lines) | |||
| { | |||
| @@ -365,9 +365,6 @@ namespace Ids | |||
| DECLARE_ID (website); | |||
| DECLARE_ID (mainClass); | |||
| DECLARE_ID (moduleFlags); | |||
| DECLARE_ID (buildEnabled); | |||
| DECLARE_ID (continuousRebuildEnabled); | |||
| DECLARE_ID (warningsEnabled); | |||
| DECLARE_ID (projectLineFeed); | |||
| DECLARE_ID (compilerFlagSchemes); | |||
| DECLARE_ID (compilerFlagScheme); | |||
| @@ -375,7 +372,6 @@ namespace Ids | |||
| DECLARE_ID (dontAskAboutJUCEPath); | |||
| DECLARE_ID (postExportShellCommandPosix); | |||
| DECLARE_ID (postExportShellCommandWin); | |||
| DECLARE_ID (liveBuildEnabled); | |||
| DECLARE_ID (guiEditorEnabled); | |||
| DECLARE_ID (jucerFormatVersion); | |||
| DECLARE_ID (buildNumber); | |||
| @@ -994,15 +994,6 @@ const uint8 fileExplorer[] = { 110,109,0,0,0,65,0,0,0,0,108,0,0,0,65,0,0,192,64, | |||
| const uint8 file[] = { 110,109,0,0,0,0,0,0,0,0,108,0,0,0,0,0,0,144,65,108,0,0,96,65,0,0,144,65,108,0,0,96,65,0,0,136,65,108,0,0,96,65,0,0,0,65,108,0,0,96,65,0,112,212,64,108,0,128,7,65,0,0,0,0,108,0,0,0,65,0,0,0,0,108,0,0,0,0,0,0,0,0,99,109,0,0,0,64,0,0,0,64,108,0,176,234, | |||
| 64,0,0,0,64,108,0,0,192,64,0,0,192,64,108,0,0,64,65,0,0,240,64,108,0,0,64,65,0,0,128,65,108,0,0,0,64,0,0,128,65,108,0,0,0,64,0,0,0,64,99,101,0,0 }; | |||
| const uint8 buildTab[] = { 110,109,0,128,57,65,0,0,4,62,98,11,216,43,65,224,184,58,62,161,115,30,65,232,197,8,63,0,8,20,65,0,192,151,63,98,0,23,3,65,255,163,15,64,233,164,253,64,158,229,114,64,0,40,7,65,0,112,163,64,98,90,107,6,65,220,190,164,64,12,166,5,65,232,227,165,64,0,240, | |||
| 4,65,0,80,167,64,108,0,128,216,64,0,160,216,64,108,0,80,167,64,0,112,167,64,108,0,192,153,64,0,64,117,64,108,0,64,4,64,0,32,20,64,108,0,128,186,63,0,32,59,64,108,0,96,62,64,0,48,181,64,108,0,240,139,64,0,192,194,64,108,0,48,189,64,0,0,244,64,108,0,128, | |||
| 196,63,0,8,64,65,98,79,40,52,63,123,85,77,65,134,196,251,62,36,134,95,65,0,0,136,63,0,168,104,65,98,223,14,209,63,220,201,113,65,20,74,49,64,124,109,110,65,0,128,102,64,255,31,97,65,108,0,96,255,64,0,16,27,65,108,0,216,20,65,0,56,48,65,108,0,216,10,65, | |||
| 0,56,58,65,108,0,80,49,65,0,176,96,65,98,123,157,62,65,123,253,109,65,37,206,80,65,220,97,113,65,0,240,89,65,0,64,104,65,98,221,17,99,65,35,30,95,65,122,173,95,65,122,237,76,65,1,96,82,65,255,159,63,65,108,0,232,43,65,0,40,25,65,108,0,128,34,65,0,144, | |||
| 34,65,108,0,88,13,65,0,104,13,65,108,0,0,38,65,0,112,233,64,98,12,182,38,65,232,3,232,64,147,72,39,65,76,121,230,64,0,240,39,65,0,0,229,64,98,146,240,60,65,13,181,245,64,125,188,85,65,7,55,237,64,0,176,102,65,0,80,203,64,98,215,148,116,65,81,134,175, | |||
| 64,202,251,121,65,136,33,137,64,1,224,118,65,0,32,74,64,108,0,56,85,65,0,96,168,64,108,255,159,47,65,0,16,148,64,108,0,128,37,65,0,192,17,64,108,255,31,71,65,0,0,52,62,98,208,157,66,65,94,67,2,62,82,13,62,65,191,132,227,61,0,128,57,65,0,0,4,62,99,109, | |||
| 0,96,248,64,0,0,185,64,108,0,40,29,65,0,240,250,64,108,0,72,13,65,0,88,13,65,108,0,160,216,64,0,192,216,64,108,0,96,248,64,0,0,185,64,99,109,0,80,189,64,0,16,244,64,108,0,64,255,64,0,0,27,65,108,0,112,224,64,0,104,42,65,108,0,128,158,64,0,112,9,65,108, | |||
| 0,80,189,64,0,16,244,64,99,101,0,0 }; | |||
| const uint8 modules[] = { 110,109,193,202,222,64,80,50,21,64,108,0,0,48,65,0,0,0,0,108,160,154,112,65,80,50,21,64,108,0,0,48,65,80,50,149,64,108,193,202,222,64,80,50,21,64,99,109,0,0,192,64,251,220,127,64,108,160,154,32,65,165,135,202,64,108,160,154,32,65,250,220,47,65,108,0, | |||
| 0,192,64,102,144,10,65,108,0,0,192,64,251,220,127,64,99,109,0,0,128,65,251,220,127,64,108,0,0,128,65,103,144,10,65,108,96,101,63,65,251,220,47,65,108,96,101,63,65,166,135,202,64,108,0,0,128,65,251,220,127,64,99,109,96,101,79,65,148,76,69,65,108,0,0,136, | |||
| 65,0,0,32,65,108,80,77,168,65,148,76,69,65,108,0,0,136,65,40,153,106,65,108,96,101,79,65,148,76,69,65,99,109,0,0,64,65,63,247,95,65,108,80,77,128,65,233,161,130,65,108,80,77,128,65,125,238,167,65,108,0,0,64,65,51,72,149,65,108,0,0,64,65,63,247,95,65, | |||
| @@ -1549,7 +1540,6 @@ Icons::Icons() | |||
| JUCE_LOAD_PATH_DATA (exporter) | |||
| JUCE_LOAD_PATH_DATA (fileExplorer) | |||
| JUCE_LOAD_PATH_DATA (file) | |||
| JUCE_LOAD_PATH_DATA (buildTab) | |||
| JUCE_LOAD_PATH_DATA (modules) | |||
| JUCE_LOAD_PATH_DATA (openFolder) | |||
| JUCE_LOAD_PATH_DATA (play) | |||
| @@ -76,7 +76,7 @@ public: | |||
| Icons(); | |||
| Path folder, document, imageDoc, config, juceLogo, graph, jigsaw, info, warning, bug, | |||
| code, box, mainJuceLogo, user, closedFolder, exporter, fileExplorer, file, buildTab, | |||
| code, box, mainJuceLogo, user, closedFolder, exporter, fileExplorer, file, | |||
| modules, openFolder, play, settings, singleModule, edit, plus, android, codeBlocks, | |||
| linux, xcode, visualStudio, clion; | |||
| @@ -84,6 +84,4 @@ private: | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Icons) | |||
| }; | |||
| #ifndef BUILDING_JUCE_COMPILEENGINE | |||
| const Icons& getIcons(); | |||
| #endif | |||
| const Icons& getIcons(); | |||
| @@ -28,10 +28,10 @@ | |||
| #include "../../Project/UI/jucer_ProjectContentComponent.h" | |||
| //============================================================================== | |||
| void TreePanelBase::setRoot (JucerTreeViewBase* root) | |||
| void TreePanelBase::setRoot (std::unique_ptr<JucerTreeViewBase> root) | |||
| { | |||
| rootItem.reset (root); | |||
| tree.setRootItem (root); | |||
| rootItem = std::move (root); | |||
| tree.setRootItem (rootItem.get()); | |||
| tree.getRootItem()->setOpen (true); | |||
| if (project != nullptr) | |||
| @@ -139,7 +139,7 @@ public: | |||
| tree.setRootItem (nullptr); | |||
| } | |||
| void setRoot (JucerTreeViewBase*); | |||
| void setRoot (std::unique_ptr<JucerTreeViewBase>); | |||
| void saveOpenness(); | |||
| virtual void deleteSelectedItems() | |||
| @@ -26,9 +26,7 @@ | |||
| #include "../../Application/jucer_Headers.h" | |||
| #include "jucer_ProjucerLookAndFeel.h" | |||
| #ifndef BUILDING_JUCE_COMPILEENGINE | |||
| #include "../../Project/UI/jucer_ProjectContentComponent.h" | |||
| #endif | |||
| #include "../../Project/UI/jucer_ProjectContentComponent.h" | |||
| //============================================================================== | |||
| ProjucerLookAndFeel::ProjucerLookAndFeel() | |||
| @@ -50,16 +48,14 @@ void ProjucerLookAndFeel::drawTabButton (TabBarButton& button, Graphics& g, bool | |||
| const auto alpha = button.isEnabled() ? ((isMouseOver || isMouseDown) ? 1.0f : 0.8f) : 0.3f; | |||
| auto textColour = findColour (defaultTextColourId).withMultipliedAlpha (alpha); | |||
| #ifndef BUILDING_JUCE_COMPILEENGINE | |||
| auto iconColour = findColour (button.isFrontTab() ? activeTabIconColourId | |||
| : inactiveTabIconColourId); | |||
| auto isProjectTab = button.getName() == ProjectContentComponent::getProjectTabName(); | |||
| auto isBuildTab = button.getName() == ProjectContentComponent::getBuildTabName(); | |||
| if (isProjectTab || isBuildTab) | |||
| if (isProjectTab) | |||
| { | |||
| auto icon = Icon (isProjectTab ? getIcons().closedFolder : getIcons().buildTab, | |||
| auto icon = Icon (getIcons().closedFolder, | |||
| iconColour.withMultipliedAlpha (alpha)); | |||
| auto isSingleTab = (button.getTabbedButtonBar().getNumTabs() == 1); | |||
| @@ -73,7 +69,7 @@ void ProjucerLookAndFeel::drawTabButton (TabBarButton& button, Graphics& g, bool | |||
| activeArea.removeFromLeft (10); | |||
| g.setColour (textColour); | |||
| g.drawFittedText (isProjectTab ? ProjectContentComponent::getProjectTabName() : ProjectContentComponent::getBuildTabName(), | |||
| g.drawFittedText (ProjectContentComponent::getProjectTabName(), | |||
| activeArea, Justification::centredLeft, 1); | |||
| } | |||
| else | |||
| @@ -82,7 +78,6 @@ void ProjucerLookAndFeel::drawTabButton (TabBarButton& button, Graphics& g, bool | |||
| } | |||
| } | |||
| else | |||
| #endif | |||
| { | |||
| TextLayout textLayout; | |||
| LookAndFeel_V3::createTabTextLayout (button, (float) area.getWidth(), (float) area.getHeight(), textColour, textLayout); | |||
| @@ -1128,7 +1128,7 @@ private: | |||
| void allocateData() | |||
| { | |||
| #if ! JUCE_PROJUCER_LIVE_BUILD && (! JUCE_GCC || (__GNUC__ * 100 + __GNUC_MINOR__) >= 409) | |||
| #if (! JUCE_GCC || (__GNUC__ * 100 + __GNUC_MINOR__) >= 409) | |||
| static_assert (alignof (Type) <= detail::maxAlignment, | |||
| "AudioBuffer cannot hold types with alignment requirements larger than that guaranteed by malloc"); | |||
| #endif | |||
| @@ -146,7 +146,7 @@ static __inline void vorbis_fpu_restore(vorbis_fpu_control fpu){ | |||
| /* Optimized code path for x86_64 builds. Uses SSE2 intrinsics. This can be | |||
| done safely because all x86_64 CPUs supports SSE2. */ | |||
| #if ! JUCE_PROJUCER_LIVE_BUILD && ((JUCE_MSVC && JUCE_64BIT) || (JUCE_GCC && defined (__x86_64__))) | |||
| #if ((JUCE_MSVC && JUCE_64BIT) || (JUCE_GCC && defined (__x86_64__))) | |||
| # define VORBIS_FPU_CONTROL | |||
| typedef ogg_int16_t vorbis_fpu_control; | |||
| @@ -50,7 +50,6 @@ | |||
| #pragma clang diagnostic ignored "-Wdeprecated-declarations" | |||
| #include <TargetConditionals.h> | |||
| #include <juce_core/native/juce_mac_ClangBugWorkaround.h> | |||
| #if TARGET_OS_MAC | |||
| #include <pthread.h> | |||
| @@ -47,8 +47,6 @@ | |||
| #ifndef __AUBuffer_h__ | |||
| #define __AUBuffer_h__ | |||
| #include <juce_core/native/juce_mac_ClangBugWorkaround.h> | |||
| #include <TargetConditionals.h> | |||
| #if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) | |||
| #include <AudioUnit/AudioUnit.h> | |||
| @@ -48,7 +48,6 @@ | |||
| #define __AUCarbonViewBase_h__ | |||
| #pragma clang diagnostic ignored "-Wdeprecated-declarations" | |||
| #include <juce_core/native/juce_mac_ClangBugWorkaround.h> | |||
| #include <vector> | |||
| #include "AUCarbonViewControl.h" | |||
| @@ -47,7 +47,6 @@ | |||
| #ifndef __AUCarbonViewControl_h__ | |||
| #define __AUCarbonViewControl_h__ | |||
| #include <juce_core/native/juce_mac_ClangBugWorkaround.h> | |||
| #include <Carbon/Carbon.h> | |||
| #include <AudioUnit/AudioUnitCarbonView.h> | |||
| #include <AudioToolbox/AudioUnitUtilities.h> | |||
| @@ -45,7 +45,6 @@ | |||
| */ | |||
| #include <juce_core/native/juce_mac_ClangBugWorkaround.h> | |||
| #include "AUOutputElement.h" | |||
| #include "AUBase.h" | |||
| @@ -45,7 +45,6 @@ | |||
| */ | |||
| #include <juce_core/native/juce_mac_ClangBugWorkaround.h> | |||
| #include "AUScopeElement.h" | |||
| #include "AUBase.h" | |||
| @@ -45,7 +45,6 @@ | |||
| */ | |||
| #include <juce_core/native/juce_mac_ClangBugWorkaround.h> | |||
| #include "CAAUParameter.h" | |||
| CAAUParameter::CAAUParameter() | |||
| @@ -48,8 +48,6 @@ | |||
| #define __CADebugMacros_h__ | |||
| #pragma clang diagnostic ignored "-Wdeprecated-declarations" | |||
| #include <juce_core/native/juce_mac_ClangBugWorkaround.h> | |||
| //============================================================================= | |||
| // Includes | |||
| @@ -45,7 +45,6 @@ | |||
| */ | |||
| #include <juce_core/native/juce_mac_ClangBugWorkaround.h> | |||
| #include "CarbonEventHandler.h" | |||
| static pascal OSStatus TheEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData) | |||
| @@ -1,41 +0,0 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file is part of the JUCE library. | |||
| Copyright (c) 2020 - Raw Material Software Limited | |||
| JUCE is an open source library subject to commercial or open-source | |||
| licensing. | |||
| The code included in this file is provided under the terms of the ISC license | |||
| http://www.isc.org/downloads/software-support-policy/isc-license. Permission | |||
| To use, copy, modify, and/or distribute this software for any purpose with or | |||
| without fee is hereby granted provided that the above copyright notice and | |||
| this permission notice appear in all copies. | |||
| JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | |||
| EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | |||
| DISCLAIMED. | |||
| ============================================================================== | |||
| */ | |||
| #if JUCE_PROJUCER_LIVE_BUILD && (defined (__APPLE_CPP__) || defined(__APPLE_CC__)) | |||
| // This hack is a workaround for a bug (?) in Apple's 10.11 SDK headers | |||
| // which cause some configurations of Clang to throw out a spurious error.. | |||
| #include <CoreFoundation/CFAvailability.h> | |||
| #undef CF_OPTIONS | |||
| #define CF_OPTIONS(_type, _name) _type _name; enum | |||
| // This is a workaround for the Xcode 9 version of NSUUID.h causing some errors | |||
| // in the live-build engine. | |||
| #define _Nullable | |||
| #define _Nonnull | |||
| // A workaround for compiling the 10.15 headers with an older compiler version | |||
| #undef API_UNAVAILABLE_BEGIN | |||
| #define API_UNAVAILABLE_BEGIN(...) | |||
| #undef API_UNAVAILABLE_END | |||
| #define API_UNAVAILABLE_END | |||
| #endif | |||
| @@ -62,11 +62,7 @@ static void callCPUID (int result[4], uint32 type) | |||
| #else | |||
| static void callCPUID (int result[4], int infoType) | |||
| { | |||
| #if JUCE_PROJUCER_LIVE_BUILD | |||
| std::fill (result, result + 4, 0); | |||
| #else | |||
| __cpuid (result, infoType); | |||
| #endif | |||
| } | |||
| #endif | |||
| @@ -70,7 +70,6 @@ | |||
| #define CF_EXCLUDE_CSTD_HEADERS 1 | |||
| #include <TargetConditionals.h> // (needed to find out what platform we're using) | |||
| #include <AvailabilityMacros.h> | |||
| #include "../native/juce_mac_ClangBugWorkaround.h" | |||
| #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR | |||
| #define JUCE_IPHONE 1 | |||
| @@ -1134,94 +1134,6 @@ public: | |||
| auto numDigitsBeforePoint = (int) std::ceil (std::log10 (number < 0 ? -number : number)); | |||
| #if JUCE_PROJUCER_LIVE_BUILD | |||
| auto doubleNumber = (double) number; | |||
| constexpr int bufferSize = 311; | |||
| char buffer[bufferSize]; | |||
| auto* ptr = &(buffer[0]); | |||
| auto* const safeEnd = ptr + (bufferSize - 1); | |||
| auto numSigFigsParsed = 0; | |||
| auto writeToBuffer = [safeEnd] (char* destination, char data) | |||
| { | |||
| *destination++ = data; | |||
| if (destination == safeEnd) | |||
| { | |||
| *destination = '\0'; | |||
| return true; | |||
| } | |||
| return false; | |||
| }; | |||
| auto truncateOrRound = [numberOfSignificantFigures] (double fractional, int sigFigsParsed) | |||
| { | |||
| return (sigFigsParsed == numberOfSignificantFigures - 1) ? (int) std::round (fractional) | |||
| : (int) fractional; | |||
| }; | |||
| if (doubleNumber < 0) | |||
| { | |||
| doubleNumber *= -1; | |||
| *ptr++ = '-'; | |||
| } | |||
| if (numDigitsBeforePoint > 0) | |||
| { | |||
| doubleNumber /= std::pow (10.0, numDigitsBeforePoint); | |||
| while (numDigitsBeforePoint-- > 0) | |||
| { | |||
| if (numSigFigsParsed == numberOfSignificantFigures) | |||
| { | |||
| if (writeToBuffer (ptr++, '0')) | |||
| return buffer; | |||
| continue; | |||
| } | |||
| doubleNumber *= 10; | |||
| auto digit = truncateOrRound (doubleNumber, numSigFigsParsed); | |||
| if (writeToBuffer (ptr++, (char) ('0' + digit))) | |||
| return buffer; | |||
| ++numSigFigsParsed; | |||
| doubleNumber -= digit; | |||
| } | |||
| if (numSigFigsParsed == numberOfSignificantFigures) | |||
| { | |||
| *ptr++ = '\0'; | |||
| return buffer; | |||
| } | |||
| } | |||
| else | |||
| { | |||
| *ptr++ = '0'; | |||
| } | |||
| if (writeToBuffer (ptr++, '.')) | |||
| return buffer; | |||
| while (numSigFigsParsed < numberOfSignificantFigures) | |||
| { | |||
| doubleNumber *= 10; | |||
| auto digit = truncateOrRound (doubleNumber, numSigFigsParsed); | |||
| if (writeToBuffer (ptr++, (char) ('0' + digit))) | |||
| return buffer; | |||
| if (numSigFigsParsed != 0 || digit != 0) | |||
| ++numSigFigsParsed; | |||
| doubleNumber -= digit; | |||
| } | |||
| *ptr++ = '\0'; | |||
| return buffer; | |||
| #else | |||
| auto shift = numberOfSignificantFigures - numDigitsBeforePoint; | |||
| auto factor = std::pow (10.0, shift); | |||
| auto rounded = std::round (number * factor) / factor; | |||
| @@ -1229,7 +1141,6 @@ public: | |||
| std::stringstream ss; | |||
| ss << std::fixed << std::setprecision (std::max (shift, 0)) << rounded; | |||
| return ss.str(); | |||
| #endif | |||
| } | |||
| //============================================================================== | |||
| @@ -341,9 +341,6 @@ void MessageManager::runDispatchLoop() | |||
| // must only be called by the message thread! | |||
| jassert (isThisTheMessageThread()); | |||
| #if JUCE_PROJUCER_LIVE_BUILD | |||
| runDispatchLoopUntil (std::numeric_limits<int>::max()); | |||
| #else | |||
| #if JUCE_CATCH_UNHANDLED_EXCEPTIONS | |||
| @try | |||
| { | |||
| @@ -361,7 +358,6 @@ void MessageManager::runDispatchLoop() | |||
| #else | |||
| [NSApp run]; | |||
| #endif | |||
| #endif | |||
| } | |||
| } | |||
| } | |||
| @@ -374,10 +370,6 @@ static void shutdownNSApp() | |||
| void MessageManager::stopDispatchLoop() | |||
| { | |||
| #if JUCE_PROJUCER_LIVE_BUILD | |||
| quitMessagePosted = true; | |||
| #else | |||
| if (isThisTheMessageThread()) | |||
| { | |||
| quitMessagePosted = true; | |||
| @@ -393,7 +385,6 @@ void MessageManager::stopDispatchLoop() | |||
| (new QuitCallback())->post(); | |||
| } | |||
| #endif | |||
| } | |||
| #if JUCE_MODAL_LOOPS_PERMITTED | |||
| @@ -26,7 +26,7 @@ | |||
| namespace juce | |||
| { | |||
| #if ! (JUCE_LINUX || JUCE_BSD || JUCE_PROJUCER_LIVE_BUILD) | |||
| #if ! (JUCE_LINUX || JUCE_BSD) | |||
| #if JUCE_MAC || JUCE_IOS | |||
| #include "../native/juce_mac_Video.h" | |||