aboutsummaryrefslogtreecommitdiffstats
path: root/demo_gradle
diff options
context:
space:
mode:
authorMário Franco <mario.ffranco@gmail.com>2015-06-05 15:21:32 +0100
committerMário Franco <mario.ffranco@gmail.com>2015-06-05 15:21:32 +0100
commit86a38894c252308188c65892d65ca558df666225 (patch)
tree5cfa677f8b30c8abfba8a566b3ca3955f7f8b812 /demo_gradle
parent7711e42392c41f4e04f3fdbef01a71923658bdbc (diff)
downloadpf4j-86a38894c252308188c65892d65ca558df666225.tar.gz
pf4j-86a38894c252308188c65892d65ca558df666225.zip
Editor config style applied
Diffstat (limited to 'demo_gradle')
-rw-r--r--demo_gradle/api/src/main/java/ro/fortsoft/pf4j/demo/api/Greeting.java6
-rw-r--r--demo_gradle/app/src/main/java/ro/fortsoft/pf4j/demo/Boot.java192
-rw-r--r--demo_gradle/plugins/disabled.txt2
-rw-r--r--demo_gradle/plugins/enabled.txt2
-rw-r--r--demo_gradle/plugins/plugin2/src/main/java/ro/fortsoft/pf4j/demo/hello/HelloPlugin.java6
5 files changed, 104 insertions, 104 deletions
diff --git a/demo_gradle/api/src/main/java/ro/fortsoft/pf4j/demo/api/Greeting.java b/demo_gradle/api/src/main/java/ro/fortsoft/pf4j/demo/api/Greeting.java
index 9a700c2..ddf3538 100644
--- a/demo_gradle/api/src/main/java/ro/fortsoft/pf4j/demo/api/Greeting.java
+++ b/demo_gradle/api/src/main/java/ro/fortsoft/pf4j/demo/api/Greeting.java
@@ -1,11 +1,11 @@
/*
* Copyright 2012 Decebal Suiu
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with
* the License. You may obtain a copy of the License in the LICENSE file, or at:
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
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 503e7c0..8c7d8e1 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
@@ -1,96 +1,96 @@
-/*
- * Copyright 2012 Decebal Suiu
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with
- * the License. You may obtain a copy of the License in the LICENSE file, or at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package ro.fortsoft.pf4j.demo;
-
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.lang3.StringUtils;
-
-import ro.fortsoft.pf4j.DefaultPluginManager;
-import ro.fortsoft.pf4j.PluginManager;
-import ro.fortsoft.pf4j.PluginWrapper;
-import ro.fortsoft.pf4j.demo.api.Greeting;
-
-/**
- * A boot class that start the demo.
- *
- * @author Decebal Suiu
- */
-public class Boot {
-
- public static void main(String[] args) {
- // print logo
- printLogo();
-
- // create the plugin manager
- final PluginManager pluginManager = new DefaultPluginManager();
-
- // load the plugins
- pluginManager.loadPlugins();
-
- // enable a disabled plugin
-// pluginManager.enablePlugin("welcome-plugin");
-
- // 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()));
- for (Greeting greeting : greetings) {
- 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 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);
- // }
- }
-
- // stop the plugins
- pluginManager.stopPlugins();
- /*
- Runtime.getRuntime().addShutdownHook(new Thread() {
-
- @Override
- public void run() {
- pluginManager.stopPlugins();
- }
-
- });
- */
- }
-
- private static void printLogo() {
- System.out.println(StringUtils.repeat("#", 40));
- System.out.println(StringUtils.center("PF4J-DEMO", 40));
- System.out.println(StringUtils.repeat("#", 40));
- }
-
-}
+/*
+ * Copyright 2012 Decebal Suiu
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with
+ * the License. You may obtain a copy of the License in the LICENSE file, or at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package ro.fortsoft.pf4j.demo;
+
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.lang3.StringUtils;
+
+import ro.fortsoft.pf4j.DefaultPluginManager;
+import ro.fortsoft.pf4j.PluginManager;
+import ro.fortsoft.pf4j.PluginWrapper;
+import ro.fortsoft.pf4j.demo.api.Greeting;
+
+/**
+ * A boot class that start the demo.
+ *
+ * @author Decebal Suiu
+ */
+public class Boot {
+
+ public static void main(String[] args) {
+ // print logo
+ printLogo();
+
+ // create the plugin manager
+ final PluginManager pluginManager = new DefaultPluginManager();
+
+ // load the plugins
+ pluginManager.loadPlugins();
+
+ // enable a disabled plugin
+// pluginManager.enablePlugin("welcome-plugin");
+
+ // 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()));
+ for (Greeting greeting : greetings) {
+ 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 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);
+ // }
+ }
+
+ // stop the plugins
+ pluginManager.stopPlugins();
+ /*
+ Runtime.getRuntime().addShutdownHook(new Thread() {
+
+ @Override
+ public void run() {
+ pluginManager.stopPlugins();
+ }
+
+ });
+ */
+ }
+
+ private static void printLogo() {
+ System.out.println(StringUtils.repeat("#", 40));
+ System.out.println(StringUtils.center("PF4J-DEMO", 40));
+ System.out.println(StringUtils.repeat("#", 40));
+ }
+
+}
diff --git a/demo_gradle/plugins/disabled.txt b/demo_gradle/plugins/disabled.txt
index fcaef50..45f1801 100644
--- a/demo_gradle/plugins/disabled.txt
+++ b/demo_gradle/plugins/disabled.txt
@@ -3,4 +3,4 @@
# - add one plugin id on each line
# - put this file in plugins folder
########################################
-#welcome-plugin \ No newline at end of file
+#welcome-plugin
diff --git a/demo_gradle/plugins/enabled.txt b/demo_gradle/plugins/enabled.txt
index 5594017..3d76b2f 100644
--- a/demo_gradle/plugins/enabled.txt
+++ b/demo_gradle/plugins/enabled.txt
@@ -3,4 +3,4 @@
# - add one plugin id on each line
# - put this file in plugins folder
########################################
-#welcome-plugin \ No newline at end of file
+#welcome-plugin
diff --git a/demo_gradle/plugins/plugin2/src/main/java/ro/fortsoft/pf4j/demo/hello/HelloPlugin.java b/demo_gradle/plugins/plugin2/src/main/java/ro/fortsoft/pf4j/demo/hello/HelloPlugin.java
index 7072e3d..4502126 100644
--- a/demo_gradle/plugins/plugin2/src/main/java/ro/fortsoft/pf4j/demo/hello/HelloPlugin.java
+++ b/demo_gradle/plugins/plugin2/src/main/java/ro/fortsoft/pf4j/demo/hello/HelloPlugin.java
@@ -1,11 +1,11 @@
/*
* Copyright 2012 Decebal Suiu
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with
* the License. You may obtain a copy of the License in the LICENSE file, or at:
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.