diff options
author | Stix <stix@phcn.de> | 2015-03-01 17:50:25 +0100 |
---|---|---|
committer | Stix <stix@phcn.de> | 2015-03-01 17:50:25 +0100 |
commit | 8ee33ea45548455f2f3242cd51779cb4f7d5839d (patch) | |
tree | 9630531879bb4b19c0e2afcb96ab19f07a298ef5 /demo_gradle/app/src | |
parent | 0b3ac7fa749e188abbbfd21a550183bfcbbcb8f3 (diff) | |
download | pf4j-8ee33ea45548455f2f3242cd51779cb4f7d5839d.tar.gz pf4j-8ee33ea45548455f2f3242cd51779cb4f7d5839d.zip |
minor fixes
Diffstat (limited to 'demo_gradle/app/src')
-rw-r--r-- | demo_gradle/app/src/main/java/ro/fortsoft/pf4j/demo/Boot.java | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/demo_gradle/app/src/main/java/ro/fortsoft/pf4j/demo/Boot.java b/demo_gradle/app/src/main/java/ro/fortsoft/pf4j/demo/Boot.java index 2619531..503e7c0 100644 --- a/demo_gradle/app/src/main/java/ro/fortsoft/pf4j/demo/Boot.java +++ b/demo_gradle/app/src/main/java/ro/fortsoft/pf4j/demo/Boot.java @@ -15,7 +15,7 @@ package ro.fortsoft.pf4j.demo; import java.util.List;
import java.util.Set;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import ro.fortsoft.pf4j.DefaultPluginManager;
import ro.fortsoft.pf4j.PluginManager;
@@ -45,6 +45,9 @@ public class Boot { // start (active/resolved) the plugins
pluginManager.startPlugins();
+ System.out.println("Plugindirectory: ");
+ System.out.println("\t" + System.getProperty("pf4j.pluginsDir", "plugins") + "\n");
+
// retrieves the extensions for Greeting extension point
List<Greeting> greetings = pluginManager.getExtensions(Greeting.class);
System.out.println(String.format("Found %d extensions for extension point '%s'", greetings.size(), Greeting.class.getName()));
@@ -52,22 +55,22 @@ public class Boot { System.out.println(">>> " + greeting.getGreeting());
}
- // print extensions from classpath (non plugin)
- System.out.println(String.format("Extensions added by classpath:"));
- Set<String> extensionClassNames = pluginManager.getExtensionClassNames(null);
- for (String extension : extensionClassNames) {
- System.out.println(" " + extension);
- }
+ // // print extensions from classpath (non plugin)
+ // System.out.println(String.format("Extensions added by classpath:"));
+ // Set<String> extensionClassNames = pluginManager.getExtensionClassNames(null);
+ // for (String extension : extensionClassNames) {
+ // System.out.println(" " + extension);
+ // }
// print extensions for each started plugin
List<PluginWrapper> startedPlugins = pluginManager.getStartedPlugins();
for (PluginWrapper plugin : startedPlugins) {
String pluginId = plugin.getDescriptor().getPluginId();
System.out.println(String.format("Extensions added by plugin '%s':", pluginId));
- extensionClassNames = pluginManager.getExtensionClassNames(pluginId);
- for (String extension : extensionClassNames) {
- System.out.println(" " + extension);
- }
+ // extensionClassNames = pluginManager.getExtensionClassNames(pluginId);
+ // for (String extension : extensionClassNames) {
+ // System.out.println(" " + extension);
+ // }
}
// stop the plugins
|