You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by sk...@apache.org on 2021/08/05 10:09:24 UTC

[netbeans] branch delivery updated: [NETBEANS-4275] Add code completion for @inheritDoc

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

skygo pushed a commit to branch delivery
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/delivery by this push:
     new 2e5f316  [NETBEANS-4275] Add code completion for @inheritDoc
     new c6718e6  Merge pull request #3090 from junichi11/netbeans-4275-cc-for-inheritDoc
2e5f316 is described below

commit 2e5f31696963b2fa0efca6419d5c24bf042f34dd
Author: Junichi Yamamoto <ju...@apache.org>
AuthorDate: Thu Aug 5 09:29:02 2021 +0900

    [NETBEANS-4275] Add code completion for @inheritDoc
    
    https://issues.apache.org/jira/browse/NETBEANS-4275
---
 .../annotations/ApiGenAnnotationsProvider.java     |  3 ++
 .../php/apigen/annotations/Bundle.properties       | 28 +++++++++++++++++-
 .../php/apigen/annotations/InheritDocTag.java      | 34 ++++++++++++++++++++++
 3 files changed, 64 insertions(+), 1 deletion(-)

diff --git a/php/php.apigen/src/org/netbeans/modules/php/apigen/annotations/ApiGenAnnotationsProvider.java b/php/php.apigen/src/org/netbeans/modules/php/apigen/annotations/ApiGenAnnotationsProvider.java
index 71c22ee..1992134 100644
--- a/php/php.apigen/src/org/netbeans/modules/php/apigen/annotations/ApiGenAnnotationsProvider.java
+++ b/php/php.apigen/src/org/netbeans/modules/php/apigen/annotations/ApiGenAnnotationsProvider.java
@@ -86,6 +86,7 @@ public class ApiGenAnnotationsProvider extends AnnotationCompletionTagProvider {
                 new FilesourceTag(),
                 new GlobalTag(),
                 new IgnoreTag(),
+                new InheritDocTag(),
                 new InternalTag(),
                 new LicenseTag(),
                 new LinkTag(),
@@ -116,6 +117,7 @@ public class ApiGenAnnotationsProvider extends AnnotationCompletionTagProvider {
                 new ExampleTag(),
                 new GlobalTag(),
                 new IgnoreTag(),
+                new InheritDocTag(),
                 new InternalTag(),
                 new LicenseTag(),
                 new LinkTag(),
@@ -143,6 +145,7 @@ public class ApiGenAnnotationsProvider extends AnnotationCompletionTagProvider {
                 new FinalTag(),
                 new GlobalTag(),
                 new IgnoreTag(),
+                new InheritDocTag(),
                 new InternalTag(),
                 new LicenseTag(),
                 new LinkTag(),
diff --git a/php/php.apigen/src/org/netbeans/modules/php/apigen/annotations/Bundle.properties b/php/php.apigen/src/org/netbeans/modules/php/apigen/annotations/Bundle.properties
index a0dcc36..37cae40 100644
--- a/php/php.apigen/src/org/netbeans/modules/php/apigen/annotations/Bundle.properties
+++ b/php/php.apigen/src/org/netbeans/modules/php/apigen/annotations/Bundle.properties
@@ -500,6 +500,32 @@ if ($ostest) {\n\
 }\n\
 </code></pre>
 
+InheritDocTag.documentation=<p style="font-weight: bold; font-size: 1.2em">inline {@inheritDoc}</p>\
+<p>\
+This inline tag is used to inherit a description from a parent class into child classes.\
+</p>\
+<p>\
+<code>{@inheritDoc}</code>\
+</p>\
+<p style="font-weight: bold; font-size: 1.1em">Example</p>\
+<pre><code>\n\
+/**\n\
+\ * Parent title.\n\
+\ *\n\
+\ * Parent Description.\n\
+\ */\n\
+class ParentClass\n\
+{\n\
+}\n\
+\n\
+/**\n\
+\ * {@inheritdoc}\n\
+\ */\n\
+class ChildClass extends ParentClass\n\
+{\n\
+}\n\
+</code></pre>
+
 InternalTag.documentation=<p style="font-weight: bold; font-size: 1.2em">@internal</p>\
 <p>\
 Mark documentation as private, internal to the software project.\
@@ -1443,4 +1469,4 @@ function dataFunction() {\n\
 class Blah {\n\
 \    ...\n\
 }\n\
-</code></pre>
\ No newline at end of file
+</code></pre>
diff --git a/php/php.apigen/src/org/netbeans/modules/php/apigen/annotations/InheritDocTag.java b/php/php.apigen/src/org/netbeans/modules/php/apigen/annotations/InheritDocTag.java
new file mode 100644
index 0000000..f982bab
--- /dev/null
+++ b/php/php.apigen/src/org/netbeans/modules/php/apigen/annotations/InheritDocTag.java
@@ -0,0 +1,34 @@
+/*
+ * 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.netbeans.modules.php.apigen.annotations;
+
+import org.netbeans.modules.php.spi.annotation.AnnotationCompletionTag;
+import org.openide.util.NbBundle;
+
+/**
+ * inline {@code {@inheritDoc}} tag.
+ */
+public class InheritDocTag extends AnnotationCompletionTag {
+
+    public InheritDocTag() {
+        super("inheritDoc", "@inheritDoc", // NOI18N
+                NbBundle.getMessage(UsesTag.class, "InheritDocTag.documentation")); // NOI18N
+    }
+
+}

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists