commit/galaxy-central: jmchilton: Shield ToolBox details from Tool.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/6268351b242f/ Changeset: 6268351b242f User: jmchilton Date: 2014-12-29 17:14:41+00:00 Summary: Shield ToolBox details from Tool. Better seperation of concerns. Affected #: 1 file diff -r 069b1c6c5f67e74c88d8109ba89cb52ed28deee4 -r 6268351b242feb5c2167b35996e264e8a51c11a9 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -304,6 +304,23 @@ tool_section = None return tool_panel_section_key, tool_section + def get_integrated_section_for_tool( self, tool ): + tool_id = tool.id + for key, item in self.integrated_tool_panel.items(): + if item: + if isinstance( item, Tool ): + if item.id == tool_id: + return '', '' + if isinstance( item, ToolSection ): + section_id = item.id or '' + section_name = item.name or '' + for section_key, section_item in item.elems.items(): + if isinstance( section_item, Tool ): + if section_item: + if section_item.id == tool_id: + return section_id, section_name + return None, None + def __resolve_tool_path(self, tool_path, config_filename): if not tool_path: # Default to backward compatible config setting. @@ -1553,20 +1570,7 @@ return self.app.job_config.get_destination(self.__get_job_tool_configuration(job_params=job_params).destination) def get_panel_section( self ): - for key, item in self.app.toolbox.integrated_tool_panel.items(): - if item: - if isinstance( item, Tool ): - if item.id == self.id: - return '', '' - if isinstance( item, ToolSection ): - section_id = item.id or '' - section_name = item.name or '' - for section_key, section_item in item.elems.items(): - if isinstance( section_item, Tool ): - if section_item: - if section_item.id == self.id: - return section_id, section_name - return None, None + return self.app.toolbox.get_integrated_section_for_tool( self ) def parse( self, tool_source, guid=None ): """ Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org