Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move code from the shell extension to the core #111

Closed
8 tasks done
end2endzone opened this issue Jun 29, 2022 · 0 comments
Closed
8 tasks done

Move code from the shell extension to the core #111

end2endzone opened this issue Jun 29, 2022 · 0 comments
Labels
code cleanup The code needs optimization enhancement New feature or request
Milestone

Comments

@end2endzone
Copy link
Owner

end2endzone commented Jun 29, 2022

Is your feature request related to a problem? Please describe.
There is a lot of code in the Shell Extension that could be moved to the core in order to be reusable or tested.

Describe the solution you'd like
What ever code that can be moved to the core is good.

  • Setting global properties:
    • log.directory
  • Create ShellAnythingApp, App or Settings class to store global settings. This class shall be a good candidate for moving code from DLL to the core.
    • Move function InitConfigManager().
    • Move function LogEnvironment(). Won't do. Function is already too much win32/Windows specific. Not appropriate for the core.
    • Move function PropertyManager::SetApplicationPath().
    • Move function InstallDefaultConfigurations().
  • Move code that "execute all actions of a menu" from CContextMenu.cpp to Menu.cpp.
  • Move "menu finding code" from unit test TestConfigManager.cpp#L76:L128 to ConfigManager,Configuration and Menu classes (close to function FindMenuByCommandId()).

Describe alternatives you've considered
Duplicated code ?!?!?

Additional context
N/A

@end2endzone end2endzone added enhancement New feature or request code cleanup The code needs optimization labels Jun 29, 2022
@end2endzone end2endzone added this to the 0.9.0 milestone Jul 3, 2023
end2endzone added a commit that referenced this issue Dec 6, 2023
* feature-issue137:
  * Fixed issue #137: Library independent logging support.
  Fixed error in how to define the application's file name based on running from the shell extension's (i.e: through explorer.exe) or from unit tests executable.
  Fixed warning: 1>CUSTOMBUILD : CMake error : install(EXPORT "shellanything-targets" ...) includes target "sa.shellextension" which requires target "sa.logger.glog" that is not in any export set.
  Removed GLOG dependency from sa.api, sa.shellextension, sa.shared and sa.tests projects. #137
  Created function ShutdownGlog() in GlogUtil to prevent module having a dependency to google's glog/logging.h. Renamed function GlogUtils::InitLogger() to InitGlog(). #137
  Moved GlogUtils functions in shellanything::logging::glog namespace.
  Moved generic code from GlogUtils.cpp to ShellAnything's App class. #137 #111.
  Moved GlogUtils from /src/shared/ to /src/logger/glog/. #137
  Renamed LoggerManager class to App. #137 #111
  Moved glog include instruction from GlogUtils.h to GlogUtils.cpp.
  Removed usage of GLOG's `LOG` macro from files. #137
  Removed usage of GLOG's `LOG` macro from sa.shellextension project. #137
  Removed GLOG dependency from sa.core.dll. #137
  Added a temporary dllmain.cpp DLL un/initialization code for sa.logger.glog.dll. #137
  Created class LoggerGlog which is an implementation of ILogger. #137
  Created ILogger, LoggerManager and LoggerHelper classes. #137
end2endzone added a commit that referenced this issue Dec 6, 2023
@end2endzone end2endzone reopened this Dec 15, 2023
end2endzone added a commit that referenced this issue Dec 16, 2023
…p to Menu.cpp.

- Implemented FindMenuByName() for ConfigManager, Configuration and Menu classes.
#111
end2endzone added a commit that referenced this issue Dec 16, 2023
* feature-issue130:
  * Fixed issue #130: Set a property value from the content of a file.
  Created 1 more tests for <property> element with `file` attribute. #130
  - Move code that "execute all actions of a menu" from CContextMenu.cpp to Menu.cpp. - Implemented FindMenuByName() for ConfigManager, Configuration and Menu classes. #111
  - Fixed a major flaw in Configuration::IsValidConfigFile() which could result in unforgettable errors.
  Created class QuickLoader which can be used to automatically load a Configuration File that matches the current unit test. Simplified unit test TestActionProperty.testCopyFile() with the QuickLoader. #130
  Fixed a documentation error about <file> usage.
  Updated documentation of `file` and `filesize` attributes for property element. #130
  Implemented support of `file` and `filesize` attributes for ActionProperty class. #130
  Created new utility functions in SaUtils.h & matching unit tests. #130
end2endzone added a commit that referenced this issue Dec 23, 2023
…d get deleted when running unit tests. Probably introduced with #111.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code cleanup The code needs optimization enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant