~do-core/do/trunk

« back to all changes in this revision

Viewing changes to Do/src/Do.Core/PluginManager.cs

  • Committer: David Siegel
  • Date: 2008-11-23 21:51:31 UTC
  • Revision ID: david@dell-desktop-20081123215131-kfohdq0ntipk782p
Restructured codebase to introduce a new layer of organization, and to begin mass refactorization of Do.Addins (and core) into separate assemblies.

        * Do.Platform: platform-neutral codebase to be used by non-interface plugins and core. Plugins that only use code from this assembly are cross-platform.
                * Do.Platform.UniverseFactory: create abstract items, like Applications (IApplicationItem) and Files (IFileItem).
                * Do.Platform.*: Platform-neutral logging, preferences, other utilities.

        * Do.Platform.Linux: Linux-specific implementations to be used by classes in Do.Platform. Plugins that use code from this assembly are Linux-dependent.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
using Mono.Addins.Setup;
29
29
 
30
30
using Do;
 
31
using Do.UI;
31
32
using Do.Addins;
 
33
using Do.Platform;
32
34
using Do.Universe;
33
 
using Do.UI;
34
35
 
35
36
namespace Do.Core {
36
37
 
287
288
                                        IObject plugin = node.GetInstance () as IObject;
288
289
                                        // Wrap in a DoObject for safety.
289
290
                                        IObject o = new DoObject (plugin);
290
 
                                        if (plugin is Pluggable)
291
 
                                                (plugin as Pluggable).NotifyLoad ();
292
291
                                        Log.Info ("Loaded \"{0}\".", o.Name);
293
292
                                } catch (Exception e) {
294
293
                                        Log.Error ("Encountered error loading \"{0}\": {0}", e.Message);
298
297
                                try {
299
298
                                        IObject plugin = node.GetInstance() as IObject;
300
299
                                        IObject o = new DoObject (plugin);
301
 
                                        if (plugin is Pluggable)
302
 
                                                (plugin as Pluggable).NotifyUnload ();
303
300
                                        Log.Info ("Unloaded \"{0}\".", o.Name);
304
301
                                } catch (Exception e) {
305
302
                                        Log.Error ("Encountered error unloading plugin: {0}", e.Message);