You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2020/04/02 17:07:13 UTC

[tinkerpop] branch TINKERPOP-2357 updated: wip

This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch TINKERPOP-2357
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/TINKERPOP-2357 by this push:
     new 51ec5de  wip
51ec5de is described below

commit 51ec5de3dd21448be0f961310e7758b50c474a60
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Thu Apr 2 13:06:50 2020 -0400

    wip
---
 .../gremlin/console/commands/ResetCommand.groovy   | 43 ++++++++++++++++++++++
 .../console/commands/ResetCommand.properties       | 20 ++++++++++
 2 files changed, 63 insertions(+)

diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/ResetCommand.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/ResetCommand.groovy
new file mode 100644
index 0000000..d6c9a28
--- /dev/null
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/ResetCommand.groovy
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License 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 org.apache.tinkerpop.gremlin.console.commands
+
+import org.apache.tinkerpop.gremlin.console.Mediator
+import org.codehaus.groovy.tools.shell.CommandSupport
+import org.codehaus.groovy.tools.shell.Groovysh
+
+/**
+ * Clear the console.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+class ResetCommand extends CommandSupport {
+
+    private final Mediator mediator
+
+    public ResetCommand(final Groovysh shell, final Mediator mediator) {
+        super(shell, ":reset", ":cls")
+        this.mediator = mediator
+    }
+
+    @Override
+    def Object execute(final List<String> arguments) {
+        mediator.console.clear();
+    }
+}
\ No newline at end of file
diff --git a/gremlin-console/src/main/resources/org/apache/tinkerpop/gremlin/console/commands/ResetCommand.properties b/gremlin-console/src/main/resources/org/apache/tinkerpop/gremlin/console/commands/ResetCommand.properties
new file mode 100644
index 0000000..1d17cb6
--- /dev/null
+++ b/gremlin-console/src/main/resources/org/apache/tinkerpop/gremlin/console/commands/ResetCommand.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License 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.
+
+command.description=Clear the screen.
+command.usage=
+command.help=Clear the screen.
\ No newline at end of file