AddonManager.CommandAddonManager Class Reference

Classes

class  MissingDependencies
 

Public Member Functions

None activate_table_widgets (self)
 
None Activated (self)
 
None add_addon_repo (self, Addon addon_repo)
 
None append_to_repos_list (self, Addon repo)
 
def cache_macro (self, Addon repo)
 
def cache_package (self, Addon repo)
 
None cancel_dependency_installation (self)
 
def cancel_network_check (self, button)
 
None check_updates (self)
 
None cleanup_workers (self, wait=False)
 
None dependency_dialog_ignore_clicked (self, Addon repo)
 
None dependency_dialog_yes_clicked (self, Addon repo)
 
None dependency_installation_failure (self, str short_message, str details)
 
None determine_cache_update_status (self)
 
None display_dep_resolution_dialog (self, missing, Addon repo)
 
None do_next_startup_phase (self)
 
None enable_updates (self, int number_of_updates)
 
None executemacro (self, Addon repo)
 
None force_check_updates (self, standalone=False)
 
str get_cache_file_name (self, str file)
 
QtGui.QIcon get_icon (self, Addon repo, bool update=False)
 
Dict[str, strGetResources (self)
 
bool handle_disallowed_python (self, List[str] python_required)
 
None hide_progress_widgets (self)
 
None install (self, Addon repo)
 
None launch (self)
 
None load_macro_metadata (self)
 
None mark_repo_update_available (self, Addon repo, bool available)
 
None network_connection_failed (self, str message)
 
None no_pip (self, str command, Addon repo)
 
None no_python_exe (self, Addon repo)
 
None on_buttonBack_clicked (self)
 
None on_buttonUpdateCache_clicked (self)
 
None on_installation_failed (self, Addon _, str message)
 
None on_package_installed (self, Addon repo, str message)
 
None on_package_updated (self, Addon repo)
 
None on_update_all_completed (self)
 
None populate_macros (self)
 
None populate_packages_table (self)
 
None reject (self)
 
None remove (self, Addon repo)
 
None remove_readonly (self, func, path, _)
 
bool report_missing_workbenches (self, str addon_name, wbs)
 
None resolve_dependencies (self, Addon repo)
 
None select_addon (self, str name)
 
def show_connection_check_message (self)
 
None show_information (self, str message)
 
None show_progress_widgets (self)
 
None show_workbench (self, Addon repo)
 
None startup (self)
 
None status_updated (self, Addon repo)
 
None stop_update (self)
 
None table_row_activated (self, Addon selected_repo)
 
None update (self, Addon repo)
 
None update_all (self)
 
None update_allowed_packages_list (self)
 
None update_check_complete (self)
 
None update_metadata_cache (self)
 
None update_progress_bar (self, int current_value, int max_value)
 
def validate (self)
 
def validate_package_xml (self, Addon addon)
 
List[strvalidate_preference_pack_metadata (self, pack)
 
List[strvalidate_workbench_metadata (self, workbench)
 
None write_cache_stopfile (self)
 
def write_macro_cache (self)
 
def write_package_cache (self)
 

Public Attributes

 allowed_packages
 
 check_worker
 
 connection_check_message
 
 connection_checker
 
 connection_message_timer
 
 current_progress_region
 
 dependency_dialog
 
 dependency_installation_dialog
 
 dependency_installation_worker
 
 dialog
 
 install_worker
 
 item_model
 
 load_macro_metadata_worker
 
 macro_cache
 
 macro_repo_dir
 
 macro_worker
 
 number_of_progress_regions
 
 package_cache
 
 packageDetails
 
 packageList
 
 packages_with_updates
 
 restart_required
 
 startup_sequence
 
 subupdates_failed
 
 subupdates_succeeded
 
 trigger_recache
 
 update_all_worker
 
 update_cache
 
 update_metadata_cache_worker
 
 update_worker
 

Static Public Attributes

 lock = threading.Lock()
 
bool restart_required = False
 
list workers
 

Detailed Description

The main Addon Manager class and FreeCAD command

Member Function Documentation

◆ activate_table_widgets()

None AddonManager.CommandAddonManager.activate_table_widgets (   self)

◆ Activated()

◆ add_addon_repo()

None AddonManager.CommandAddonManager.add_addon_repo (   self,
Addon  addon_repo 
)

◆ append_to_repos_list()

None AddonManager.CommandAddonManager.append_to_repos_list (   self,
Addon  repo 
)
this function allows threads to update the main list of workbenches

References AddonManager.CommandAddonManager.item_model, change_branch.ChangeBranchDialog.item_model, and package_list.PackageList.item_model.

◆ cache_macro()

def AddonManager.CommandAddonManager.cache_macro (   self,
Addon  repo 
)

◆ cache_package()

def AddonManager.CommandAddonManager.cache_package (   self,
Addon  repo 
)

◆ cancel_dependency_installation()

None AddonManager.CommandAddonManager.cancel_dependency_installation (   self)

◆ cancel_network_check()

◆ check_updates()

◆ cleanup_workers()

None AddonManager.CommandAddonManager.cleanup_workers (   self,
  wait = False 
)
Ensure that no workers are running by explicitly asking them to stop and waiting for them until they do

References AddonManager.CommandAddonManager.workers, and addonmanager_workers.CacheMacroCode.workers.

Referenced by AddonManager.CommandAddonManager.stop_update().

◆ dependency_dialog_ignore_clicked()

None AddonManager.CommandAddonManager.dependency_dialog_ignore_clicked (   self,
Addon  repo 
)

◆ dependency_dialog_yes_clicked()

◆ dependency_installation_failure()

◆ determine_cache_update_status()

None AddonManager.CommandAddonManager.determine_cache_update_status (   self)
Determine whether we need to update the cache, based on user preference, and previous
cache update status. Sets self.update_cache to either True or False.

References AddonManager.CommandAddonManager.update_cache.

◆ display_dep_resolution_dialog()

None AddonManager.CommandAddonManager.display_dep_resolution_dialog (   self,
  missing,
Addon  repo 
)

◆ do_next_startup_phase()

◆ enable_updates()

◆ executemacro()

◆ force_check_updates()

◆ get_cache_file_name()

◆ get_icon()

QtGui.QIcon AddonManager.CommandAddonManager.get_icon (   self,
Addon  repo,
bool   update = False 
)
Returns an icon for an Addon. Uses a cached icon if possible, unless update is True,
in which case the icon is regenerated.

Referenced by AddonManager.CommandAddonManager.add_addon_repo(), and AddonManager.CommandAddonManager.on_package_updated().

◆ GetResources()

Dict[str, str] AddonManager.CommandAddonManager.GetResources (   self)

◆ handle_disallowed_python()

bool AddonManager.CommandAddonManager.handle_disallowed_python (   self,
List[str python_required 
)
Determine if we are missing any required Python packages that are not in the allowed
packages list. If so, display a message to the user, and return True. Otherwise return
False.

References AddonManager.CommandAddonManager.allowed_packages, Gui::Dialog::DlgParameterFind.dialog, RemoteDebugger.RemoteDebugger.dialog, Gui::Dialog::TaskTextureMapping.dialog, Gui::Dialog::TaskTransform.dialog, AddonManager.CommandAddonManager.dialog, ArchComponent.IfcEditorDelegate.dialog, draftguitools.gui_shapestrings.ShapeString.dialog, draftguitools.gui_texts.Text.dialog, PathScripts.PathJobDlg.JobCreate.dialog, PathScripts.PathJobDlg.JobTemplateExport.dialog, PathScripts.PathPost.DlgSelectPostProcessor.dialog, and AddonManager.CommandAddonManager.update_allowed_packages_list().

Referenced by AddonManager.CommandAddonManager.resolve_dependencies().

◆ hide_progress_widgets()

◆ install()

◆ launch()

None AddonManager.CommandAddonManager.launch (   self)
Shows the Addon Manager UI

Referenced by AddonManager.CommandAddonManager.cancel_network_check().

◆ load_macro_metadata()

None AddonManager.CommandAddonManager.load_macro_metadata (   self)

◆ mark_repo_update_available()

None AddonManager.CommandAddonManager.mark_repo_update_available (   self,
Addon  repo,
bool  available 
)

◆ network_connection_failed()

None AddonManager.CommandAddonManager.network_connection_failed (   self,
str  message 
)

◆ no_pip()

◆ no_python_exe()

◆ on_buttonBack_clicked()

None AddonManager.CommandAddonManager.on_buttonBack_clicked (   self)

◆ on_buttonUpdateCache_clicked()

◆ on_installation_failed()

◆ on_package_installed()

◆ on_package_updated()

◆ on_update_all_completed()

◆ populate_macros()

None AddonManager.CommandAddonManager.populate_macros (   self)

◆ populate_packages_table()

◆ reject()

None AddonManager.CommandAddonManager.reject (   self)
called when the window has been closed

References AddonManager.CommandAddonManager.cache_macro(), AddonManager.CommandAddonManager.cache_package(), Gui::Dialog::DlgParameterFind.dialog, RemoteDebugger.RemoteDebugger.dialog, Gui::Dialog::TaskTextureMapping.dialog, Gui::Dialog::TaskTransform.dialog, AddonManager.CommandAddonManager.dialog, ArchComponent.IfcEditorDelegate.dialog, draftguitools.gui_shapestrings.ShapeString.dialog, draftguitools.gui_texts.Text.dialog, PathScripts.PathJobDlg.JobCreate.dialog, PathScripts.PathJobDlg.JobTemplateExport.dialog, PathScripts.PathPost.DlgSelectPostProcessor.dialog, AddonManager.CommandAddonManager.item_model, change_branch.ChangeBranchDialog.item_model, package_list.PackageList.item_model, AddonManager.CommandAddonManager.restart_required, AddonManager.CommandAddonManager.startup_sequence, AddonManager.CommandAddonManager.workers, addonmanager_workers.CacheMacroCode.workers, AddonManager.CommandAddonManager.write_cache_stopfile(), AddonManager.CommandAddonManager.write_macro_cache(), and AddonManager.CommandAddonManager.write_package_cache().

Referenced by draftguitools.gui_hatch.Draft_Hatch_TaskPanel.accept(), draftguitools.gui_setstyle.Draft_SetStyle_TaskPanel.accept(), drafttaskpanels.task_shapestring.ShapeStringTaskPanelCmd.accept(), drafttaskpanels.task_shapestring.ShapeStringTaskPanelEdit.accept(), drafttaskpanels.task_shapestring.ShapeStringTaskPanel.action(), femexamples.examplesgui.FemExamples.clicked(), and PathScripts.PathToolBitLibraryGui.ToolBitLibrary.toolEdit().

◆ remove()

◆ remove_readonly()

None AddonManager.CommandAddonManager.remove_readonly (   self,
  func,
  path,
  _ 
)

◆ report_missing_workbenches()

◆ resolve_dependencies()

◆ select_addon()

◆ show_connection_check_message()

def AddonManager.CommandAddonManager.show_connection_check_message (   self)

◆ show_information()

None AddonManager.CommandAddonManager.show_information (   self,
str  message 
)

◆ show_progress_widgets()

◆ show_workbench()

None AddonManager.CommandAddonManager.show_workbench (   self,
Addon  repo 
)

◆ startup()

None AddonManager.CommandAddonManager.startup (   self)
Downloads the available packages listings and populates the table

This proceeds in four stages: first, the main GitHub repository is queried for a list of possible
addons. Each addon is specified as a git submodule with name and branch information. The actual specific
commit ID of the submodule (as listed on Github) is ignored. Any extra repositories specified by the
user are appended to this list.

Second, the list of macros is downloaded from the FreeCAD/FreeCAD-macros repository and the wiki

Third, each of these items is queried for a package.xml metadata file. If that file exists it is
downloaded, cached, and any icons that it references are also downloaded and cached.

Finally, for workbenches that are not contained within a package (e.g. they provide no metadata), an
additional git query is made to see if an update is available. Macros are checked for file changes.

Each of these stages is launched in a separate thread to ensure that the UI remains responsive, and
the operation can be cancelled.

Each stage is also subject to caching, so may return immediately, if no cache update has been requested.

References AddonManager.CommandAddonManager.activate_table_widgets(), AddonManager.CommandAddonManager.check_updates(), AddonManager.CommandAddonManager.load_macro_metadata(), AddonManager.CommandAddonManager.populate_macros(), AddonManager.CommandAddonManager.populate_packages_table(), AddonManager.CommandAddonManager.select_addon(), AddonManager.CommandAddonManager.startup_sequence, AddonManager.CommandAddonManager.update_metadata_cache(), Py::Object.validate(), PartGui::DlgExtrusion.validate(), PartGui::DlgRevolution.validate(), Sandbox::DocumentProtector.validate(), Sandbox::DocumentObjectProtector.validate(), Gui::UnsignedValidator.validate(), Gui::QuantitySpinBoxPrivate.validate(), Gui::InputValidator.validate(), Gui::InputField.validate(), Gui::QuantitySpinBox.validate(), Gui::UIntSpinBox.validate(), and AddonManager.CommandAddonManager.validate().

Referenced by AddonManager.CommandAddonManager.on_buttonUpdateCache_clicked().

◆ status_updated()

◆ stop_update()

◆ table_row_activated()

None AddonManager.CommandAddonManager.table_row_activated (   self,
Addon  selected_repo 
)

◆ update()

◆ update_all()

None AddonManager.CommandAddonManager.update_all (   self)
Asynchronously apply all available updates: individual failures are noted, but do not stop other updates

References AddonManager.CommandAddonManager.update_all_worker.

◆ update_allowed_packages_list()

None AddonManager.CommandAddonManager.update_allowed_packages_list (   self)

◆ update_check_complete()

◆ update_metadata_cache()

None AddonManager.CommandAddonManager.update_metadata_cache (   self)

◆ update_progress_bar()

◆ validate()

◆ validate_package_xml()

◆ validate_preference_pack_metadata()

List[str] AddonManager.CommandAddonManager.validate_preference_pack_metadata (   self,
  pack 
)

◆ validate_workbench_metadata()

List[str] AddonManager.CommandAddonManager.validate_workbench_metadata (   self,
  workbench 
)

◆ write_cache_stopfile()

None AddonManager.CommandAddonManager.write_cache_stopfile (   self)

◆ write_macro_cache()

def AddonManager.CommandAddonManager.write_macro_cache (   self)

◆ write_package_cache()

def AddonManager.CommandAddonManager.write_package_cache (   self)

Member Data Documentation

◆ allowed_packages

◆ check_worker

AddonManager.CommandAddonManager.check_worker

◆ connection_check_message

AddonManager.CommandAddonManager.connection_check_message

◆ connection_checker

◆ connection_message_timer

AddonManager.CommandAddonManager.connection_message_timer

◆ current_progress_region

AddonManager.CommandAddonManager.current_progress_region

◆ dependency_dialog

AddonManager.CommandAddonManager.dependency_dialog

◆ dependency_installation_dialog

◆ dependency_installation_worker

AddonManager.CommandAddonManager.dependency_installation_worker

◆ dialog

AddonManager.CommandAddonManager.dialog

Referenced by RemoteDebugger.RemoteDebugger.accept(), PathScripts.PathJobDlg.JobTemplateExport.checkUncheckTools(), AddonManager.CommandAddonManager.dependency_installation_failure(), AddonManager.CommandAddonManager.do_next_startup_phase(), AddonManager.CommandAddonManager.enable_updates(), RemoteDebugger.RemoteDebugger.exec_(), PathScripts.PathJobDlg.JobCreate.exec_(), PathScripts.PathJobDlg.JobTemplateExport.exec_(), PathScripts.PathPost.DlgSelectPostProcessor.exec_(), AddonManager.CommandAddonManager.executemacro(), PathScripts.PathJobDlg.JobTemplateExport.exportButton(), draftguitools.gui_texts.Text.finish(), AddonManager.CommandAddonManager.force_check_updates(), PathScripts.PathJobDlg.JobCreate.getTemplate(), AddonManager.CommandAddonManager.handle_disallowed_python(), AddonManager.CommandAddonManager.hide_progress_widgets(), PathScripts.PathJobDlg.JobTemplateExport.includePostProcessing(), PathScripts.PathJobDlg.JobTemplateExport.includeSettingCoolant(), PathScripts.PathJobDlg.JobTemplateExport.includeSettingOperationDepths(), PathScripts.PathJobDlg.JobTemplateExport.includeSettingOperationHeights(), PathScripts.PathJobDlg.JobTemplateExport.includeSettingOpsSettings(), PathScripts.PathJobDlg.JobTemplateExport.includeSettings(), PathScripts.PathJobDlg.JobTemplateExport.includeSettingToolRapid(), PathScripts.PathJobDlg.JobTemplateExport.includeStock(), PathScripts.PathJobDlg.JobTemplateExport.includeStockExtent(), PathScripts.PathJobDlg.JobTemplateExport.includeStockPlacement(), PathScripts.PathJobDlg.JobTemplateExport.includeToolControllers(), AddonManager.CommandAddonManager.no_pip(), AddonManager.CommandAddonManager.no_python_exe(), AddonManager.CommandAddonManager.on_buttonUpdateCache_clicked(), AddonManager.CommandAddonManager.on_installation_failed(), AddonManager.CommandAddonManager.on_package_installed(), AddonManager.CommandAddonManager.on_update_all_completed(), RemoteDebugger.RemoteDebugger.reject(), AddonManager.CommandAddonManager.reject(), AddonManager.CommandAddonManager.remove(), AddonManager.CommandAddonManager.report_missing_workbenches(), ArchComponent.IfcEditorDelegate.setModelData(), PathScripts.PathJobDlg.JobCreate.setupModel(), PathScripts.PathJobDlg.JobCreate.setupTemplate(), PathScripts.PathJobDlg.JobCreate.setupTitle(), AddonManager.CommandAddonManager.show_information(), AddonManager.CommandAddonManager.show_progress_widgets(), AddonManager.CommandAddonManager.stop_update(), AddonManager.CommandAddonManager.update_check_complete(), AddonManager.CommandAddonManager.update_progress_bar(), PathScripts.PathPost.DlgSelectPostProcessor.updateTooltip(), and PathScripts.PathJobDlg.JobTemplateExport.updateUI().

◆ install_worker

AddonManager.CommandAddonManager.install_worker

◆ item_model

◆ load_macro_metadata_worker

AddonManager.CommandAddonManager.load_macro_metadata_worker

◆ lock

◆ macro_cache

AddonManager.CommandAddonManager.macro_cache

◆ macro_repo_dir

AddonManager.CommandAddonManager.macro_repo_dir

◆ macro_worker

AddonManager.CommandAddonManager.macro_worker

◆ number_of_progress_regions

AddonManager.CommandAddonManager.number_of_progress_regions

◆ package_cache

AddonManager.CommandAddonManager.package_cache

◆ packageDetails

◆ packageList

◆ packages_with_updates

◆ restart_required [1/2]

◆ restart_required [2/2]

◆ startup_sequence

◆ subupdates_failed

AddonManager.CommandAddonManager.subupdates_failed

◆ subupdates_succeeded

AddonManager.CommandAddonManager.subupdates_succeeded

◆ trigger_recache

AddonManager.CommandAddonManager.trigger_recache

◆ update_all_worker

AddonManager.CommandAddonManager.update_all_worker

◆ update_cache

◆ update_metadata_cache_worker

AddonManager.CommandAddonManager.update_metadata_cache_worker

◆ update_worker

AddonManager.CommandAddonManager.update_worker

◆ workers

list AddonManager.CommandAddonManager.workers
static
Initial value:
= [
"connection_checker",
"update_worker",
"check_worker",
"show_worker",
"showmacro_worker",
"macro_worker",
"install_worker",
"update_metadata_cache_worker",
"load_macro_metadata_worker",
"update_all_worker",
"dependency_installation_worker",
]

Referenced by AddonManager.CommandAddonManager.cleanup_workers(), AddonManager.CommandAddonManager.reject(), and addonmanager_workers.CacheMacroCode.update_and_advance().


The documentation for this class was generated from the following file: