lib/origen/application.rb in origen-0.7.24 vs lib/origen/application.rb in origen-0.7.25

- old
+ new

@@ -34,11 +34,11 @@ unless caller[0] =~ /version.rb.*/ root = Pathname.new(caller[0].sub(/(\\|\/)?config(\\|\/)application.rb.*/, '')).realpath app = base.instance app.root = root.to_s if Origen.plugins_loaded? && !Origen.loading_top_level? - Origen.log.warning "The #{app.name} plugin is using a non-standard loading mechanism, upgrade to a newer version to get rid of this error (please report a bug if that does not remove this warning)" + Origen.log.warning "The #{app.name} plugin is using a non-standard loading mechanism, upgrade to a newer version of it to get rid of this warning (please report a bug to its owner if this warning persists)" Origen.app.plugins << app else Origen.register_application(app) end app.add_lib_to_load_path! @@ -258,22 +258,22 @@ # Returns true if the given application instance is the # current top level application def current? # If this is called before the plugins are loaded (i.e. by a plugin's application file), then # it is definitely not the top-level app - if Origen.plugins_loaded? + if Origen.application_loaded? Origen.app == self else - false + Origen.root == root end end alias_method :standalone?, :current? alias_method :running_standalone?, :current? # Returns true if the given application instance is # the current plugin def current_plugin? - if Origen.plugins_loaded? + if Origen.application_loaded? Origen.app.plugins.current == self else puts <<-END current_plugin? cannot be used at this point in your code since the app is not loaded yet.