forked from External/mage
Refactor resource paths and constants:
- delete duplicate consts; - correct paths and it uses; - fix loading icons from user defined dir;
This commit is contained in:
parent
5cda60270c
commit
f400cd5231
7 changed files with 42 additions and 47 deletions
|
|
@ -34,7 +34,7 @@ import org.mage.plugins.theme.ThemePluginImpl;
|
|||
|
||||
public enum Plugins implements MagePlugins {
|
||||
instance;
|
||||
public static final String PLUGINS_DIRECTORY = "plugins/";
|
||||
public static final String PLUGINS_DIRECTORY = File.separator + "plugins";
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(Plugins.class);
|
||||
private static PluginManager pm;
|
||||
|
|
@ -50,7 +50,7 @@ public enum Plugins implements MagePlugins {
|
|||
public void loadPlugins() {
|
||||
LOGGER.info("Loading plugins...");
|
||||
pm = PluginManagerFactory.createPluginManager();
|
||||
pm.addPluginsFrom(new File(PLUGINS_DIRECTORY).toURI());
|
||||
pm.addPluginsFrom(new File(PLUGINS_DIRECTORY + File.separator).toURI());
|
||||
this.cardPlugin = new CardPluginImpl();
|
||||
this.counterPlugin = pm.getPlugin(CounterPlugin.class);
|
||||
this.themePlugin = new ThemePluginImpl();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue