You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by ma...@apache.org on 2020/12/06 12:06:17 UTC

[netbeans] branch master updated: [NETBEANS-5057] JSF tag attribute help shows default value

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

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


The following commit(s) were added to refs/heads/master by this push:
     new a4da33c  [NETBEANS-5057] JSF tag attribute help shows default value
     new fb89333  Merge pull request #2582 from e-Contract/jsf-editor
a4da33c is described below

commit a4da33c39f056bb0f244b72d495b393a9eb41b1a
Author: Frank Cornelis <in...@e-contract.be>
AuthorDate: Sat Dec 5 13:25:00 2020 +0100

    [NETBEANS-5057] JSF tag attribute help shows default value
---
 .../modules/web/jsf/editor/completion/Bundle.properties  |  2 ++
 .../web/jsf/editor/completion/JsfCompletionItem.java     | 16 +++++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/completion/Bundle.properties b/enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/completion/Bundle.properties
index 146e1ae..be9d5f5 100644
--- a/enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/completion/Bundle.properties
+++ b/enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/completion/Bundle.properties
@@ -22,3 +22,5 @@ MSG_NoAttributeDescription=No Attribute Description Available
 MSG_Tag=Tag
 MSG_Type=Type
 MSG_Library=Library
+MSG_DefaultValue=Default Value
+MSG_MethodSignature=Method Signature
\ No newline at end of file
diff --git a/enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/completion/JsfCompletionItem.java b/enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/completion/JsfCompletionItem.java
index d905b53..bb151e6 100644
--- a/enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/completion/JsfCompletionItem.java
+++ b/enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/completion/JsfCompletionItem.java
@@ -269,6 +269,20 @@ public class JsfCompletionItem {
                 sb.append(attr.getType());
                 sb.append("</div>"); //NOI18N
             }
+            if (attr.getMethodSignature() != null) {
+                sb.append("<div><b>"); //NOI18N
+                sb.append(NbBundle.getMessage(JsfCompletionItem.class, "MSG_MethodSignature"));
+                sb.append(":</b> "); //NOI18N
+                sb.append(attr.getMethodSignature());
+                sb.append("</div>"); //NOI18N
+            }
+            if (attr.getDefaultValue() != null) {
+                sb.append("<div><b>"); //NOI18N
+                sb.append(NbBundle.getMessage(JsfCompletionItem.class, "MSG_DefaultValue"));
+                sb.append(":</b> "); //NOI18N
+                sb.append(attr.getDefaultValue());
+                sb.append("</div>"); //NOI18N
+            }
             if(attr.isRequired()) {
                 sb.append("<p>");
                 sb.append(NbBundle.getMessage(JsfCompletionItem.class, "MSG_RequiredAttribute"));
@@ -307,7 +321,7 @@ public class JsfCompletionItem {
         if (library.getLegacyNamespace() != null) {
             sb.append(", ").append(library.getLegacyNamespace()); //NOI18N
         }
-        if(library.getDisplayName() != null) {
+        if (library.getDisplayName() != null && !library.getDisplayName().equals(library.getNamespace())) {
             sb.append(" ("); //NOI18N
             sb.append(library.getDisplayName());
             sb.append(")"); //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