You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "lkishalmi (via GitHub)" <gi...@apache.org> on 2023/03/06 06:30:42 UTC

[GitHub] [netbeans] lkishalmi opened a new pull request, #5612: Initial HCL Support

lkishalmi opened a new pull request, #5612:
URL: https://github.com/apache/netbeans/pull/5612

   Well, I've restarted my HCL/Terraform Support efforts. This is just the base lexer supporting `tfvar` files, though the lexer, I hope, would work correctly on any HCL files. Parsers are in progress.
   
   @matthiasblaesing could you have a glimpse on the licensing please?
   
   The Terraform icon svg is coming from https://github.com/PKief/vscode-material-icon-theme/ repository. I kept the original as `vscode-terraform.svg`. Unfortunately it seems if I keep the name as `terraform.svg` the IDE would use that one over the png and fails as the svg has no size information.
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


[GitHub] [netbeans] lkishalmi merged pull request #5612: Initial HCL Support

Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi merged PR #5612:
URL: https://github.com/apache/netbeans/pull/5612


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


[GitHub] [netbeans] matthiasblaesing commented on pull request #5612: Initial HCL Support

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on PR #5612:
URL: https://github.com/apache/netbeans/pull/5612#issuecomment-1465019175

   > @matthiasblaesing Thanks for the SVG! It seems to work, so I've removed the `licenseinfo.xml` and the derived png. I think the `nbbuild/licenses/MIT-vscode-material-icon-theme` is still into the play, is it?
   
   I think we have no instance of icons where we only store the SVG version. Providing a png fallback makes it possible for people to run without batik, to keep it common, IMHO you should keep the png.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


[GitHub] [netbeans] lkishalmi commented on a diff in pull request #5612: Initial HCL Support

Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi commented on code in PR #5612:
URL: https://github.com/apache/netbeans/pull/5612#discussion_r1169022085


##########
ide/languages.hcl/src/org/netbeans/modules/languages/hcl/AnstractHCLLexer.java:
##########
@@ -0,0 +1,103 @@
+/*
+ * 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.languages.hcl;
+
+import java.text.Normalizer;
+import java.util.BitSet;
+import java.util.LinkedList;
+import java.util.function.Function;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.antlr.v4.runtime.ANTLRErrorListener;
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.Parser;
+import org.antlr.v4.runtime.RecognitionException;
+import org.antlr.v4.runtime.Recognizer;
+import org.antlr.v4.runtime.atn.ATNConfigSet;
+import org.antlr.v4.runtime.dfa.DFA;
+import org.antlr.v4.runtime.misc.ParseCancellationException;
+import org.netbeans.api.lexer.Token;
+import org.netbeans.modules.languages.hcl.grammar.HCLLexer;
+import org.netbeans.spi.lexer.LexerRestartInfo;
+import org.netbeans.spi.lexer.antlr4.AbstractAntlrLexerBridge;
+
+import static org.netbeans.modules.languages.hcl.HCLTokenId.*;
+import static org.netbeans.modules.languages.hcl.grammar.HCLLexer.*;
+
+
+/**
+ *
+ * @author lkishalmi
+ */
+public abstract class AnstractHCLLexer extends AbstractAntlrLexerBridge<HCLHereDocAdaptor, HCLTokenId> {

Review Comment:
   Good eyes! Thank you!



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


[GitHub] [netbeans] matthiasblaesing commented on pull request #5612: Initial HCL Support

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on PR #5612:
URL: https://github.com/apache/netbeans/pull/5612#issuecomment-1465023212

   For the commit validation problem on JDK 8, I suggest to drop `javac.target` from `project.properties` and change `javac.source` to 8. The javac task is modified to switch to using the `release` flag instead of `target`/`source`.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


[GitHub] [netbeans] lkishalmi commented on pull request #5612: Initial HCL Support

Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi commented on PR #5612:
URL: https://github.com/apache/netbeans/pull/5612#issuecomment-1464986678

   @matthiasblaesing Thanks for the SVG! It seems to work, so I've removed the `licenseinfo.xml` and the derived png.
   I think the `nbbuild/licenses/MIT-vscode-material-icon-theme` is still into the play, is it?


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


[GitHub] [netbeans] mbien commented on pull request #5612: Initial HCL Support

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5612:
URL: https://github.com/apache/netbeans/pull/5612#issuecomment-1465304684

   @lkishalmi I think @matthiasblaesing meant to downgrade the property to 8. You can't remove the properties otherwise NB won't know what language level the module has and everything will be red in the editor.
   
   basically:
   `javac.source=1.8` and either remove target or set it to the same value which is fine too.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


[GitHub] [netbeans] matthiasblaesing commented on pull request #5612: Initial HCL Support

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on PR #5612:
URL: https://github.com/apache/netbeans/pull/5612#issuecomment-1464313335

   For the icon, I would suggest this approach:
   
   https://github.com/matthiasblaesing/netbeans/commit/7d522935670f181fdecb1c93a22c835cb1c8c82f
   
   - License information was put directly into the SVG. This should still be ok, as we are required to provide the license, but that is done through the file itself.
   - I renamed the svg to match the png and modified the SVG to make it possible to use it as icon source in NetBeans
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


[GitHub] [netbeans] lkishalmi commented on pull request #5612: Initial HCL Support

Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi commented on PR #5612:
URL: https://github.com/apache/netbeans/pull/5612#issuecomment-1509467325

   Well, this one is far from being complete. I even question some of my design decisions, though the base HCL lexer was as close to the (specs)[https://github.com/hashicorp/hcl/blob/main/hclsyntax/spec.md]  as I could get. 
   
   I'm not so sure that I'd keep the TerraformLexer, most probably it would be better to have parser adjusted highlight for different HCL flavors, but till I get there it is how it is.
   
   The AST classes are also some very early implementations.
   
   Anyway, the implementation works providing syntax highlight and folding for tfvars and tf files:
   ![image](https://user-images.githubusercontent.com/1381701/232177996-8a140e97-1860-49a6-b2b0-921e89377d96.png)
   
   It also adds code templates for Terraform files.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


[GitHub] [netbeans] mbien commented on a diff in pull request #5612: Initial HCL Support

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #5612:
URL: https://github.com/apache/netbeans/pull/5612#discussion_r1168035392


##########
ide/languages.hcl/src/org/netbeans/modules/languages/hcl/HCLHereDocAdaptor.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * 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.languages.hcl;
+
+import java.util.LinkedList;
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.Lexer;
+
+/**
+ *
+ * @author Laszlo Kishalmi
+ */
+public abstract class HCLHereDocAdaptor extends Lexer {
+
+    LinkedList<String> hereDocStack = new LinkedList<>();
+    String currentHereDocVar;
+
+    public HCLHereDocAdaptor(CharStream input) {
+        super(input);
+    }
+
+    protected  void pushHereDocVar(String hereDocHead) {
+        String hereDocVar = hereDocHead.replaceAll("^<<-?", "");
+        hereDocVar = hereDocVar.substring(0, hereDocVar.length() - 1);
+        if (currentHereDocVar != null) {
+            hereDocStack.addFirst(currentHereDocVar);
+        }
+        currentHereDocVar = hereDocVar;
+    }
+
+    protected void popHereDocVar() {
+        currentHereDocVar = hereDocStack.isEmpty() ? null : hereDocStack.removeFirst();
+    }
+
+    protected boolean heredocEndAhead(String partialHeredoc) {
+        int n = 1;
+        int c = _input.LA(1);
+        while ( c == 9 || c == 32) { // Skip leading space and tabs

Review Comment:
   this is only for space and tab? not for other whitespace as in `Character.isWhitespace()`?
   
   btw you could also write this as: c == ' ' || c == '\t' which would make the comment redundant



##########
ide/languages.hcl/src/org/netbeans/modules/languages/hcl/ast/HCLBlock.java:
##########
@@ -0,0 +1,54 @@
+/*
+ * 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.languages.hcl.ast;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ *
+ * @author Laszlo Kishalmi
+ */
+public class HCLBlock extends HCLContainer {
+
+    final List<HCLIdentifier> declaration;
+    final String id;
+
+
+    public HCLBlock(List<HCLIdentifier> declaration) {
+        this.declaration = Collections.unmodifiableList(declaration);
+        StringBuilder idb = new StringBuilder(100);
+        String delim = "";
+        for (HCLIdentifier hi : this.declaration) {
+            idb.append(delim).append(hi.id());
+            delim = ".";
+        }
+        id = idb.toString();

Review Comment:
   potentially easier with `StringJoiner`?



##########
ide/languages.hcl/src/org/netbeans/modules/languages/hcl/AnstractHCLLexer.java:
##########
@@ -0,0 +1,103 @@
+/*
+ * 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.languages.hcl;
+
+import java.text.Normalizer;
+import java.util.BitSet;
+import java.util.LinkedList;
+import java.util.function.Function;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.antlr.v4.runtime.ANTLRErrorListener;
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.Parser;
+import org.antlr.v4.runtime.RecognitionException;
+import org.antlr.v4.runtime.Recognizer;
+import org.antlr.v4.runtime.atn.ATNConfigSet;
+import org.antlr.v4.runtime.dfa.DFA;
+import org.antlr.v4.runtime.misc.ParseCancellationException;
+import org.netbeans.api.lexer.Token;
+import org.netbeans.modules.languages.hcl.grammar.HCLLexer;
+import org.netbeans.spi.lexer.LexerRestartInfo;
+import org.netbeans.spi.lexer.antlr4.AbstractAntlrLexerBridge;
+
+import static org.netbeans.modules.languages.hcl.HCLTokenId.*;
+import static org.netbeans.modules.languages.hcl.grammar.HCLLexer.*;
+
+
+/**
+ *
+ * @author lkishalmi
+ */
+public abstract class AnstractHCLLexer extends AbstractAntlrLexerBridge<HCLHereDocAdaptor, HCLTokenId> {

Review Comment:
   typo. -> `Abstract`



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


[GitHub] [netbeans] lkishalmi commented on a diff in pull request #5612: Initial HCL Support

Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi commented on code in PR #5612:
URL: https://github.com/apache/netbeans/pull/5612#discussion_r1169023723


##########
ide/languages.hcl/src/org/netbeans/modules/languages/hcl/HCLHereDocAdaptor.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * 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.languages.hcl;
+
+import java.util.LinkedList;
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.Lexer;
+
+/**
+ *
+ * @author Laszlo Kishalmi
+ */
+public abstract class HCLHereDocAdaptor extends Lexer {
+
+    LinkedList<String> hereDocStack = new LinkedList<>();
+    String currentHereDocVar;
+
+    public HCLHereDocAdaptor(CharStream input) {
+        super(input);
+    }
+
+    protected  void pushHereDocVar(String hereDocHead) {
+        String hereDocVar = hereDocHead.replaceAll("^<<-?", "");
+        hereDocVar = hereDocVar.substring(0, hereDocVar.length() - 1);
+        if (currentHereDocVar != null) {
+            hereDocStack.addFirst(currentHereDocVar);
+        }
+        currentHereDocVar = hereDocVar;
+    }
+
+    protected void popHereDocVar() {
+        currentHereDocVar = hereDocStack.isEmpty() ? null : hereDocStack.removeFirst();
+    }
+
+    protected boolean heredocEndAhead(String partialHeredoc) {
+        int n = 1;
+        int c = _input.LA(1);
+        while ( c == 9 || c == 32) { // Skip leading space and tabs

Review Comment:
   Checked the Go parser. You are right, it does unicode whitespace.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


[GitHub] [netbeans] lkishalmi commented on a diff in pull request #5612: Initial HCL Support

Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi commented on code in PR #5612:
URL: https://github.com/apache/netbeans/pull/5612#discussion_r1169027751


##########
ide/languages.hcl/src/org/netbeans/modules/languages/hcl/ast/HCLBlock.java:
##########
@@ -0,0 +1,54 @@
+/*
+ * 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.languages.hcl.ast;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ *
+ * @author Laszlo Kishalmi
+ */
+public class HCLBlock extends HCLContainer {
+
+    final List<HCLIdentifier> declaration;
+    final String id;
+
+
+    public HCLBlock(List<HCLIdentifier> declaration) {
+        this.declaration = Collections.unmodifiableList(declaration);
+        StringBuilder idb = new StringBuilder(100);
+        String delim = "";
+        for (HCLIdentifier hi : this.declaration) {
+            idb.append(delim).append(hi.id());
+            delim = ".";
+        }
+        id = idb.toString();

Review Comment:
   Learnt something new today!
   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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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