diff --git a/src/org/intellij/plugins/hcl/hcl.bnf b/src/org/intellij/plugins/hcl/hcl.bnf index e48a3138..806c3cdf 100644 --- a/src/org/intellij/plugins/hcl/hcl.bnf +++ b/src/org/intellij/plugins/hcl/hcl.bnf @@ -25,7 +25,7 @@ psiClassPrefix = 'HCL' psiVisitorName = 'HCLElementVisitor' - psiImplUtilClass = 'org.intellij.plugins.hcl.psi.impl.HCLPsiImplUtils' + psiImplUtilClass = 'org.intellij.plugins.hcl.psi.impl.HCLPsiImplUtilJ' tokenTypeClass = 'org.intellij.plugins.hcl.HCLTokenType' implements('value') = 'org.intellij.plugins.hcl.psi.HCLElement' diff --git a/src/org/intellij/plugins/hcl/psi/impl/HCLPsiImplUtilJ.java b/src/org/intellij/plugins/hcl/psi/impl/HCLPsiImplUtilJ.java new file mode 100644 index 00000000..4a9f08ca --- /dev/null +++ b/src/org/intellij/plugins/hcl/psi/impl/HCLPsiImplUtilJ.java @@ -0,0 +1,109 @@ +/* + * Copyright 2000-2015 JetBrains s.r.o. + * + * Licensed 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.intellij.plugins.hcl.psi.impl; + +import com.intellij.navigation.ItemPresentation; +import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.TextRange; +import org.intellij.plugins.hcl.psi.*; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public class HCLPsiImplUtilJ { + @NotNull + public static String getName(@NotNull HCLProperty property) { + return HCLPsiImplUtils.INSTANCE$.getName(property); + } + + @NotNull + public static String getName(@NotNull HCLBlock block) { + return HCLPsiImplUtils.INSTANCE$.getName(block); + } + + @NotNull + public static HCLValue getNameElement(@NotNull HCLProperty property) { + return HCLPsiImplUtils.INSTANCE$.getNameElement(property); + } + + @NotNull + public static HCLElement[] getNameElements(@NotNull HCLBlock block) { + return HCLPsiImplUtils.INSTANCE$.getNameElements(block); + } + + @Nullable + public static HCLValue getValue(@NotNull HCLProperty property) { + return HCLPsiImplUtils.INSTANCE$.getValue(property); + } + + @Nullable + public static HCLValue getObject(@NotNull HCLBlock block) { + return HCLPsiImplUtils.INSTANCE$.getObject(block); + } + + public static boolean isQuotedString(@NotNull HCLLiteral literal) { + return HCLPsiImplUtils.INSTANCE$.isQuotedString(literal); + } + + @Nullable + public static ItemPresentation getPresentation(@NotNull HCLProperty property) { + return HCLPsiImplUtils.INSTANCE$.getPresentation(property); + } + + @Nullable + public static ItemPresentation getPresentation(@NotNull HCLBlock block) { + return HCLPsiImplUtils.INSTANCE$.getPresentation(block); + } + + @Nullable + public static ItemPresentation getPresentation(@NotNull HCLArray array) { + return HCLPsiImplUtils.INSTANCE$.getPresentation(array); + } + + @Nullable + public static ItemPresentation getPresentation(@NotNull HCLObject o) { + return HCLPsiImplUtils.INSTANCE$.getPresentation(o); + } + + @NotNull + public static List> getTextFragments(@NotNull HCLStringLiteral literal) { + return HCLPsiImplUtils.INSTANCE$.getTextFragments(literal); + } + + @Nullable + public static HCLProperty findProperty(@NotNull HCLObject object, @NotNull String name) { + return HCLPsiImplUtils.INSTANCE$.findProperty(object, name); + } + + @NotNull + public static String getValue(@NotNull HCLStringLiteral literal) { + return HCLPsiImplUtils.INSTANCE$.getValue(literal); + } + + public static boolean getValue(@NotNull HCLBooleanLiteral literal) { + return HCLPsiImplUtils.INSTANCE$.getValue(literal); + } + + public static double getValue(@NotNull HCLNumberLiteral literal) { + return HCLPsiImplUtils.INSTANCE$.getValue(literal); + } + + @NotNull + public static String getId(@NotNull HCLIdentifier identifier) { + return HCLPsiImplUtils.INSTANCE$.getId(identifier); + } +}