You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2018/10/20 06:38:37 UTC
[1/3] groovy git commit: remove GGTS, add in a couple of more editors
Repository: groovy
Updated Branches:
refs/heads/GROOVY_2_5_X df5c85907 -> 252a77dcc
remove GGTS, add in a couple of more editors
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/b5d37901
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/b5d37901
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/b5d37901
Branch: refs/heads/GROOVY_2_5_X
Commit: b5d37901ff5297cf40c3251b3f88c0ff05547dc3
Parents: 5489723
Author: Paul King <pa...@asert.com.au>
Authored: Sat Oct 20 14:58:26 2018 +1000
Committer: Paul King <pa...@asert.com.au>
Committed: Sat Oct 20 16:38:25 2018 +1000
----------------------------------------------------------------------
src/spec/doc/tools-ide.adoc | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/b5d37901/src/spec/doc/tools-ide.adoc
----------------------------------------------------------------------
diff --git a/src/spec/doc/tools-ide.adoc b/src/spec/doc/tools-ide.adoc
index fe5d44d..5b40c89 100644
--- a/src/spec/doc/tools-ide.adoc
+++ b/src/spec/doc/tools-ide.adoc
@@ -21,19 +21,19 @@
= IDE integration
-
The Groovy language is supported by lots of IDEs and text editors.
-[cols="1,1,1,1,1",options="header,footer"]
-|=======================================================================
-|Editor|Support level|Syntax highlighting|Code completion|Refactoring
-|https://github.com/groovy/groovy-eclipse[Groovy Eclipse Plugin]|[icon-star]_{empty}_ [icon-star]_{empty}_ [icon-star]_{empty}_|Yes|Yes|Yes
-|http://www.jetbrains.com/idea/features/groovy.html[IntelliJ IDEA]|[icon-star]_{empty}_ [icon-star]_{empty}_ [icon-star]_{empty}_|Yes|Yes|Yes
-|https://netbeans.org/features/groovy/[Netbeans]|[icon-star]_{empty}_ [icon-star]_{empty}_ [icon-star]_{empty}_|Yes|Yes|Yes
-|https://spring.io/tools/ggts[Groovy and Grails Toolsuite]|[icon-star]_{empty}_ [icon-star]_{empty}_ [icon-star]_{empty}_|Yes|Yes|Yes
-|https://github.com/Groovy-Emacs-Modes/groovy-emacs-modes[Groovy Emacs Modes]|[icon-star]_{empty}_ [icon-star]_{empty}_|Yes|No|No
-|https://github.com/textmate/groovy.tmbundle[TextMate]|[icon-star]_{empty}_ [icon-star]_{empty}_|Yes|No|No
-|http://www.vim.org/[vim]|[icon-star]_{empty}_|Yes|No|No
-|http://www.ultraedit.com/[UltraEdit]|[icon-star]_{empty}_|Yes|No|No
-|=======================================================================
-
+[cols="1,1,1,1",options="header,footer"]
+|===============================================================
+|Editor|Syntax highlighting|Code completion|Refactoring
+|https://github.com/groovy/groovy-eclipse[Groovy Eclipse Plugin]|Yes|Yes|Yes
+|http://www.jetbrains.com/idea/features/groovy.html[IntelliJ IDEA]|Yes|Yes|Yes
+|https://netbeans.org/features/groovy/[Netbeans]|Yes|Yes|Yes
+|https://github.com/Groovy-Emacs-Modes/groovy-emacs-modes[Groovy Emacs Modes]|Yes|No|No
+|https://github.com/textmate/groovy.tmbundle[TextMate]|Yes|No|No
+|http://www.vim.org/[vim]|Yes|No|No
+|http://www.ultraedit.com/[UltraEdit]|Yes|No|No
+|https://www.slickedit.com/products/slickedit/419-the-most-powerful-groovy-editor-in-the-world/[SlickEdit]|Yes|No|No
+|https://editrocket.com/features/groovy_editor.html[EditRocket]|Yes|No|No
+|https://code.visualstudio.com/[VSCode]|Yes|No|No
+|===============================================================
[2/3] groovy git commit: fix a broken link plus some minor wording
tweaks
Posted by pa...@apache.org.
fix a broken link plus some minor wording tweaks
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/5489723a
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/5489723a
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/5489723a
Branch: refs/heads/GROOVY_2_5_X
Commit: 5489723a95e50155f313f955a7cfd38540524ad3
Parents: df5c859
Author: Paul King <pa...@asert.com.au>
Authored: Thu Oct 18 20:17:27 2018 +1000
Committer: Paul King <pa...@asert.com.au>
Committed: Sat Oct 20 16:38:25 2018 +1000
----------------------------------------------------------------------
src/spec/doc/core-metaprogramming.adoc | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/5489723a/src/spec/doc/core-metaprogramming.adoc
----------------------------------------------------------------------
diff --git a/src/spec/doc/core-metaprogramming.adoc b/src/spec/doc/core-metaprogramming.adoc
index 4e47196..eaf262d 100644
--- a/src/spec/doc/core-metaprogramming.adoc
+++ b/src/spec/doc/core-metaprogramming.adoc
@@ -26,6 +26,7 @@ The first allows altering the class model and the behavior of a program at runti
at compile-time. Both have pros and cons that we will detail in this section.
== Runtime metaprogramming
+
With runtime metaprogramming we can postpone to runtime the decision to intercept, inject and even synthesize methods of classes and interfaces. For a deep understanding of Groovy's metaobject protocol (MOP) we need to understand Groovy objects and Groovy's method handling.
In Groovy we work with three kinds of objects: POJO, POGO and Groovy Interceptors. Groovy allows metaprogramming for all types of objects but in a different manner.
@@ -357,15 +358,26 @@ Applying the `@Category` annotation has the advantage of being able to use insta
first parameter. The target type class is given as an argument to the annotation instead.
[NOTE]
-There is a distinct section on `@Category` in the <<core-metaprogramming.adoc#xform-Category,compile-time metaprogramming section>>.
+There is a distinct section on `@Category` in the
+<<core-metaprogramming.adoc#xform-Category,compile-time metaprogramming section>>.
=== Metaclasses
-As explained in other section, Metaclasses has a central role in the method resolution. For every method invocation from groovy code, Groovy will find the `MetaClass` for the given object and delegate the method resolution to the metaclass via gapid:groovy.lang.MetaClass#invokeMethod(java.lang.Class,java.lang.Object,java.lang.String,java.lang.Object,boolean,boolean)[MetaClass#invokeMethod] which should not be confused with gapid:groovy.lang.GroovyObject#invokeMethod(java.lang.String,java.lang.Object)[GroovyObject#invokeMethod].
+As explained earlier, Metaclasses play a central role in method resolution.
+For every method invocation from groovy code, Groovy will find the `MetaClass` for the given object
+and delegate the method resolution to the metaclass via
+gapid:groovy.lang.MetaClass#invokeMethod(java.lang.Class,java.lang.Object,java.lang.String,java.lang.Object,boolean,boolean)[MetaClass#invokeMethod]
+which should not be confused with
+gapid:groovy.lang.GroovyObject#invokeMethod(java.lang.String,java.lang.Object)[GroovyObject#invokeMethod]
+which happens to be a method that the metaclass may eventually call.
==== The default metaclass `MetaClassImpl`
-By default objects get an instance of `MetaClassImpl` that implements the default method lookup. This method lookup includes looking up of the method in the object class ("regular" method) but also if no method is found this way it will resort to calling `methodMissing` and ultimately gapid:groovy.lang.GroovyObject.html#invokeMethod(java.lang.String,java.lang.Object)[GroovyObject#invokeMethod]
+
+By default, objects get an instance of `MetaClassImpl` that implements the default method lookup.
+This method lookup includes looking up of the method in the object class ("regular" method) but also if no
+method is found this way it will resort to calling `methodMissing` and ultimately
+gapid:groovy.lang.GroovyObject#invokeMethod(java.lang.String,java.lang.Object)[GroovyObject#invokeMethod]
[source,groovy]
@@ -378,7 +390,6 @@ assert f.metaClass =~ /MetaClassImpl/
----
-
==== Custom metaclasses
You can change the metaclass of any object or class and replace with a custom implementation of the `MetaClass` gapi:groovy.lang.MetaClass[interface]. Usually you will want to subclass one of the existing metaclasses `MetaClassImpl`, `DelegatingMetaClass`, `ExpandoMetaClass`, `ProxyMetaClass`, etc. otherwise you will need to implement the complete method lookup logic. Before using a new metaclass instance you should call gapid:groovy.lang.MetaClass#initialize()[] otherwise the metaclass may or may not behave as expected.
[3/3] groovy git commit: fix a couple of broken links
Posted by pa...@apache.org.
fix a couple of broken links
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/252a77dc
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/252a77dc
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/252a77dc
Branch: refs/heads/GROOVY_2_5_X
Commit: 252a77dcc514f4b25076b4d56adf4ccf02a615ab
Parents: b5d3790
Author: Paul King <pa...@asert.com.au>
Authored: Sat Oct 20 15:16:53 2018 +1000
Committer: Paul King <pa...@asert.com.au>
Committed: Sat Oct 20 16:38:26 2018 +1000
----------------------------------------------------------------------
subprojects/groovy-bsf/src/spec/doc/integrating-bsf.adoc | 2 +-
subprojects/groovy-xml/src/spec/doc/stax-builder.adoc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/252a77dc/subprojects/groovy-bsf/src/spec/doc/integrating-bsf.adoc
----------------------------------------------------------------------
diff --git a/subprojects/groovy-bsf/src/spec/doc/integrating-bsf.adoc b/subprojects/groovy-bsf/src/spec/doc/integrating-bsf.adoc
index 3cd84d3..9267d1b 100644
--- a/subprojects/groovy-bsf/src/spec/doc/integrating-bsf.adoc
+++ b/subprojects/groovy-bsf/src/spec/doc/integrating-bsf.adoc
@@ -30,7 +30,7 @@ normally hidden away by the BSF APIs. You just treat Groovy like any of the othe
API.
NOTE: Since Groovy has its own native support for integration with Java, you only need to worry about BSF if you also
-want to also be able to call other languages, e.g. http://jruby.org/[JRuby] or if you want to remain very
+want to also be able to call other languages, e.g. https://www.jruby.org/[JRuby] or if you want to remain very
loosely coupled from your scripting language.
== Getting started
http://git-wip-us.apache.org/repos/asf/groovy/blob/252a77dc/subprojects/groovy-xml/src/spec/doc/stax-builder.adoc
----------------------------------------------------------------------
diff --git a/subprojects/groovy-xml/src/spec/doc/stax-builder.adoc b/subprojects/groovy-xml/src/spec/doc/stax-builder.adoc
index d452055..9edad3a 100644
--- a/subprojects/groovy-xml/src/spec/doc/stax-builder.adoc
+++ b/subprojects/groovy-xml/src/spec/doc/stax-builder.adoc
@@ -30,7 +30,7 @@ Here is a simple example using the StAX implementation of Java to generate XML:
include::{rootProjectDir}/subprojects/groovy-xml/src/spec/test/StaxBuilderTest.groovy[tags=stax_builder,indent=0]
----
-An external library such as http://jettison.codehaus.org/[Jettison] can be used as follows:
+An external library such as https://github.com/jettison-json/jettison[Jettison] can be used as follows:
[source,groovy]
----