junichi11 commented on code in PR #8227:
URL: https://github.com/apache/netbeans/pull/8227#discussion_r1951725278


##########
php/php.editor/src/org/netbeans/modules/php/editor/elements/PropertyHookElementImpl.java:
##########
@@ -0,0 +1,203 @@
+/*
+ * 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.editor.elements;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.netbeans.modules.csl.api.OffsetRange;
+import org.netbeans.modules.csl.spi.ParserResult;
+import org.netbeans.modules.php.editor.CodeUtils;
+import org.netbeans.modules.php.editor.api.ElementQuery;
+import org.netbeans.modules.php.editor.api.PhpElementKind;
+import org.netbeans.modules.php.editor.api.elements.ParameterElement;
+import org.netbeans.modules.php.editor.api.elements.PropertyHookElement;
+import org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem;
+import org.netbeans.modules.php.editor.model.nodes.PropertyHookDeclarationInfo;
+import org.netbeans.modules.php.editor.parser.astnodes.PropertyHookDeclaration;
+
+public class PropertyHookElementImpl extends PhpElementImpl implements 
PropertyHookElement {
+
+    private final boolean isReference;
+    private final boolean isAttributed;
+    private final boolean hasBody;
+    private final List<ParameterElement> parameters;
+    private final OffsetRange offsetRange;
+
+    private PropertyHookElementImpl(Builder builder) {
+        super(builder.name, builder.inScope, builder.filenameUrl, 
builder.offsetRange.getStart(), builder.elementQuery, builder.isDeprecated);
+        this.isReference = builder.isReference;
+        this.isAttributed = builder.isAttributed;
+        this.hasBody = builder.hasBody;
+        this.parameters = List.copyOf(builder.parameters);
+        this.offsetRange = builder.offsetRange;
+    }
+
+    @Override
+    public String getSignature() {
+        return 
PropertyHookSignatureItem.getSignatureFromElements(List.of(this));
+    }
+
+    @Override
+    public PhpElementKind getPhpElementKind() {
+        return PhpElementKind.PROPERTY_HOOK;
+    }
+
+    @Override
+    public boolean isReference() {
+        return isReference;
+    }
+
+    @Override
+    public boolean isAttributed() {
+        return isAttributed;
+    }
+
+    @Override
+    public boolean hasBody() {
+        return hasBody;
+    }
+
+    @Override
+    public List<? extends ParameterElement> getParameters() {
+        return parameters;
+    }
+
+    @Override
+    public OffsetRange getOffsetRange() {
+        return offsetRange;
+    }
+
+    @Override
+    public OffsetRange getOffsetRange(ParserResult result) {
+        return getOffsetRange();
+    }
+
+    /**
+     * Create property hook elements form PropertyHookSignatureItems.
+     *
+     * @param signatureItems
+     * @param field
+     * @param filenameUrl
+     * @param elementQuery
+     * @return property hook elements
+     */
+    public static List<PropertyHookElement> fromSignatureItems(final 
List<PropertyHookSignatureItem> signatureItems, final String field, final 
String filenameUrl, final ElementQuery elementQuery) {
+        List<PropertyHookElement> elements = new ArrayList<>();

Review Comment:
   Will fix 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-unsubscr...@netbeans.apache.org

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


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

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

Reply via email to