@ -90,6 +90,11 @@ namespace EditorPythonBindings
PythonSymbolEventBus : : Handler : : BusConnect ( ) ;
PythonSymbolEventBus : : Handler : : BusConnect ( ) ;
EditorPythonBindingsNotificationBus : : Handler : : BusConnect ( ) ;
EditorPythonBindingsNotificationBus : : Handler : : BusConnect ( ) ;
AZ : : Interface < AzToolsFramework : : EditorPythonConsoleInterface > : : Register ( this ) ;
AZ : : Interface < AzToolsFramework : : EditorPythonConsoleInterface > : : Register ( this ) ;
if ( PythonSymbolEventBus : : GetTotalNumOfEventHandlers ( ) > 1 )
{
OnPostInitialize ( ) ;
}
}
}
void PythonLogSymbolsComponent : : Deactivate ( )
void PythonLogSymbolsComponent : : Deactivate ( )
@ -111,6 +116,7 @@ namespace EditorPythonBindings
m_basePath = pythonSymbolsPath ;
m_basePath = pythonSymbolsPath ;
}
}
EditorPythonBindingsNotificationBus : : Handler : : BusDisconnect ( ) ;
EditorPythonBindingsNotificationBus : : Handler : : BusDisconnect ( ) ;
PythonSymbolEventBus : : ExecuteQueuedEvents ( ) ;
}
}
void PythonLogSymbolsComponent : : WriteMethod ( AZ : : IO : : HandleType handle , AZStd : : string_view methodName , const AZ : : BehaviorMethod & behaviorMethod , const AZ : : BehaviorClass * behaviorClass )
void PythonLogSymbolsComponent : : WriteMethod ( AZ : : IO : : HandleType handle , AZStd : : string_view methodName , const AZ : : BehaviorMethod & behaviorMethod , const AZ : : BehaviorClass * behaviorClass )
@ -206,12 +212,12 @@ namespace EditorPythonBindings
AZ : : IO : : FileIOBase : : GetInstance ( ) - > Write ( handle , buffer . c_str ( ) , buffer . size ( ) ) ;
AZ : : IO : : FileIOBase : : GetInstance ( ) - > Write ( handle , buffer . c_str ( ) , buffer . size ( ) ) ;
}
}
void PythonLogSymbolsComponent : : LogClass ( AZStd : : string _view moduleName , AZ : : BehaviorClass * behaviorClass )
void PythonLogSymbolsComponent : : LogClass ( const AZStd : : string moduleName , const AZ : : BehaviorClass * behaviorClass )
{
{
LogClassWithName ( moduleName , behaviorClass , behaviorClass - > m_name . c_str ( ) ) ;
LogClassWithName ( moduleName , behaviorClass , behaviorClass - > m_name . c_str ( ) ) ;
}
}
void PythonLogSymbolsComponent : : LogClassWithName ( AZStd : : string _view moduleName , AZ : : BehaviorClass * behaviorClass , AZStd : : string _view className )
void PythonLogSymbolsComponent : : LogClassWithName ( const AZStd : : string moduleName , const AZ : : BehaviorClass * behaviorClass , const AZStd : : string className )
{
{
Internal : : FileHandle fileHandle ( OpenModuleAt ( moduleName ) ) ;
Internal : : FileHandle fileHandle ( OpenModuleAt ( moduleName ) ) ;
if ( fileHandle . IsValid ( ) )
if ( fileHandle . IsValid ( ) )
@ -255,7 +261,11 @@ namespace EditorPythonBindings
}
}
}
}
void PythonLogSymbolsComponent : : LogClassMethod ( AZStd : : string_view moduleName , AZStd : : string_view globalMethodName , AZ : : BehaviorClass * behaviorClass , AZ : : BehaviorMethod * behaviorMethod )
void PythonLogSymbolsComponent : : LogClassMethod (
const AZStd : : string moduleName ,
const AZStd : : string globalMethodName ,
const AZ : : BehaviorClass * behaviorClass ,
const AZ : : BehaviorMethod * behaviorMethod )
{
{
AZ_UNUSED ( behaviorClass ) ;
AZ_UNUSED ( behaviorClass ) ;
Internal : : FileHandle fileHandle ( OpenModuleAt ( moduleName ) ) ;
Internal : : FileHandle fileHandle ( OpenModuleAt ( moduleName ) ) ;
@ -265,7 +275,7 @@ namespace EditorPythonBindings
}
}
}
}
void PythonLogSymbolsComponent : : LogBus ( AZStd : : string _view moduleName , AZStd : : string _view busName , AZ : : BehaviorEBus * behaviorEBus )
void PythonLogSymbolsComponent : : LogBus ( const AZStd : : string moduleName , const AZStd : : string busName , const AZ : : BehaviorEBus * behaviorEBus )
{
{
if ( behaviorEBus - > m_events . empty ( ) )
if ( behaviorEBus - > m_events . empty ( ) )
{
{
@ -404,7 +414,7 @@ namespace EditorPythonBindings
}
}
}
}
void PythonLogSymbolsComponent : : LogGlobalMethod ( AZStd : : string _view moduleName , AZStd : : string _view methodName , AZ : : BehaviorMethod * behaviorMethod )
void PythonLogSymbolsComponent : : LogGlobalMethod ( const AZStd : : string moduleName , const AZStd : : string methodName , const AZ : : BehaviorMethod * behaviorMethod )
{
{
Internal : : FileHandle fileHandle ( OpenModuleAt ( moduleName ) ) ;
Internal : : FileHandle fileHandle ( OpenModuleAt ( moduleName ) ) ;
if ( fileHandle . IsValid ( ) )
if ( fileHandle . IsValid ( ) )
@ -428,7 +438,10 @@ namespace EditorPythonBindings
}
}
}
}
void PythonLogSymbolsComponent : : LogGlobalProperty ( AZStd : : string_view moduleName , AZStd : : string_view propertyName , AZ : : BehaviorProperty * behaviorProperty )
void PythonLogSymbolsComponent : : LogGlobalProperty (
const AZStd : : string moduleName ,
const AZStd : : string propertyName ,
const AZ : : BehaviorProperty * behaviorProperty )
{
{
if ( ! behaviorProperty - > m_getter | | ! behaviorProperty - > m_getter - > GetResult ( ) )
if ( ! behaviorProperty - > m_getter | | ! behaviorProperty - > m_getter - > GetResult ( ) )
{
{