This repository has been archived by the owner on Mar 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d3b4570
commit 52d1e5e
Showing
2 changed files
with
110 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 109 additions & 0 deletions
109
src/org/intellij/plugins/hcl/psi/impl/HCLPsiImplUtilJ.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<Pair<TextRange, String>> 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); | ||
} | ||
} |