Merge branch 'tp32' into tp33

Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/84c3ff40
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/84c3ff40
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/84c3ff40

Branch: refs/heads/master
Commit: 84c3ff40e19b748886eabbb4f12c74f932d1383d
Parents: b87a555 160c1de
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jun 27 12:30:13 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jun 27 12:30:13 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                  |  1 +
 .../apache/tinkerpop/gremlin/console/Console.groovy | 16 +++++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/84c3ff40/CHANGELOG.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/84c3ff40/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
----------------------------------------------------------------------
diff --cc 
gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index 096d329,ad41d6c..d45b49a
--- 
a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ 
b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@@ -111,21 -127,30 +111,23 @@@ class Console 
  
          GremlinLoader.load()
  
-         // check for available plugins.  if they are in the "active" plugins 
strategies then "activate" them
+         // check for available plugins on the path and track them by plugin 
class name
          def activePlugins = Mediator.readPluginState()
 -        def pluginClass = mediator.useV3d3 ? 
org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin : GremlinPlugin
 -        ServiceLoader.load(pluginClass, 
groovy.getInterp().getClassLoader()).each { plugin ->
 +        ServiceLoader.load(GremlinPlugin, 
groovy.getInterp().getClassLoader()).each { plugin ->
              if (!mediator.availablePlugins.containsKey(plugin.class.name)) {
 -                def pluggedIn
 -
 -                if (Mediator.useV3d3) {
 -                    pluggedIn = new PluggedIn(new 
PluggedIn.GremlinPluginAdapter((org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin)
 plugin, groovy, io), groovy, io, false)
 -                } else {
 -                    pluggedIn = new PluggedIn((GremlinPlugin) plugin, groovy, 
io, false)
 -                }
 +                def pluggedIn = new PluggedIn((GremlinPlugin) plugin, groovy, 
io, false)
  
                  mediator.availablePlugins.put(plugin.class.name, pluggedIn)
+             }
+         }
  
-                 if (activePlugins.contains(plugin.class.name)) {
-                     pluggedIn.activate()
+         // if there are active plugins then initialize them in the order that 
they are listed
+         activePlugins.each { pluginName ->
+             def pluggedIn = mediator.availablePlugins[pluginName]
+             pluggedIn.activate()
  
-                     if (!io.quiet)
-                         
io.out.println(Colorizer.render(Preferences.infoColor, "plugin activated: " + 
plugin.getName()))
-                 }
-             }
+             if (!io.quiet)
+                 io.out.println(Colorizer.render(Preferences.infoColor, 
"plugin activated: " + pluggedIn.getPlugin().getName()))
          }
  
          // remove any "uninstalled" plugins from plugin state as it means 
they were installed, activated, but not

Reply via email to