From 127644ea46ddd80b78789b389ec5108c5f17e93f Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Sun, 30 Jul 2017 14:42:06 -0700 Subject: [PATCH] Remove abacus dependency from PluginManager. --- src/main/java/org/nwapw/abacus/Abacus.java | 2 +- src/main/java/org/nwapw/abacus/plugin/PluginManager.java | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/nwapw/abacus/Abacus.java b/src/main/java/org/nwapw/abacus/Abacus.java index a5c61bb..17aeb90 100644 --- a/src/main/java/org/nwapw/abacus/Abacus.java +++ b/src/main/java/org/nwapw/abacus/Abacus.java @@ -62,7 +62,7 @@ public class Abacus { * Creates a new instance of the Abacus calculator. */ public Abacus(){ - pluginManager = new PluginManager(this); + pluginManager = new PluginManager(); mainUi = new Window(this); numberReducer = new NumberReducer(this); configuration = new ConfigurationObject(CONFIG_FILE); diff --git a/src/main/java/org/nwapw/abacus/plugin/PluginManager.java b/src/main/java/org/nwapw/abacus/plugin/PluginManager.java index 33af14a..ee10747 100644 --- a/src/main/java/org/nwapw/abacus/plugin/PluginManager.java +++ b/src/main/java/org/nwapw/abacus/plugin/PluginManager.java @@ -1,6 +1,5 @@ package org.nwapw.abacus.plugin; -import org.nwapw.abacus.Abacus; import org.nwapw.abacus.function.Function; import org.nwapw.abacus.function.Operator; import org.nwapw.abacus.number.NumberInterface; @@ -53,17 +52,11 @@ public class PluginManager { * The list of plugin listeners attached to this instance. */ private Set listeners; - /** - * The instance of Abacus that is used to interact with its other - * components. - */ - private Abacus abacus; /** * Creates a new plugin manager. */ - public PluginManager(Abacus abacus){ - this.abacus = abacus; + public PluginManager(){ loadedPluginClasses = new HashSet<>(); plugins = new HashSet<>(); cachedFunctions = new HashMap<>();