[
https://issues.apache.org/jira/browse/TINKERPOP-2371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17111262#comment-17111262
]
ASF GitHub Bot commented on TINKERPOP-2371:
-------------------------------------------
spmallette commented on a change in pull request #1287:
URL: https://github.com/apache/tinkerpop/pull/1287#discussion_r427381517
##########
File path:
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/jsr223/ImportGremlinPluginTest.java
##########
@@ -24,13 +24,16 @@
import org.apache.tinkerpop.gremlin.util.Gremlin;
import org.junit.Test;
+import com.google.common.collect.ImmutableSet;
+
+import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Collections;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.core.IsCollectionContaining.hasItems;
+import static org.hamcrest.Matchers.*;
Review comment:
could you please remove the wildcard here (it's not our code style to
allow that - all imports are explicit)? thanks.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Add possibility to import constants with ImportGremlinPlugin
> ------------------------------------------------------------
>
> Key: TINKERPOP-2371
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2371
> Project: TinkerPop
> Issue Type: Improvement
> Components: plugin
> Affects Versions: 3.4.6
> Reporter: Nicolas Trangosi
> Priority: Minor
>
> We use Gremlin Requests in Java, and we want to use them in a personalized
> Gremlin console. The main interest of having this console is to use our DSL,
> which is made up with methods and constants defined in Java, which complete
> the Gremlin language. Therefore, we want to be able to import constants with
> ImportGremlinPlugin, just as we can import methods.
> For example, in the file Labels.java, we have defined the constant:
> {code:java}
> public static class MyProject {
> public static final String DEVICE = "device";
> public static final String NAME = "name";
> }
> {code}
> And, in our console, we want to be able to submit the request:{color}
> {code:java}
> g.addV(DEVICE).property(NAME, "foo"){code}
> {color:#000000}instead of using the request:{color}
> {code:java}
> g.addV("device").property("name", "foo")
> {code}
> Note: We have been able to make following code works: {{g.addV(MyProject
> .DEVICE).property(MyProject .NAME, "foo")}} but we would prefer to static
> import of {{MyProject.*}}.
> We are ready to developed a pull request, but before starting it, we would
> like to know if another solution exists or if such improvement may be
> accepted ?
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)