Examples of PsiElementVisitor


Examples of com.intellij.psi.PsiElementVisitor

  }

  @Nullable
  private static Pair<YAMLKeyValue, DocumentFragment> extractBasePathPair(@NotNull YAMLDocument yamlDocument) {
    final Ref<Pair<YAMLKeyValue, DocumentFragment>> result = Ref.create(null);
    yamlDocument.acceptChildren(new PsiElementVisitor() {
      @Override
      public void visitElement(PsiElement element) {
        YAMLKeyValue keyValue = ObjectUtils.tryCast(element, YAMLKeyValue.class);
        if (keyValue != null && isBasePathKey(keyValue) && result.isNull()) {
          DocumentFragment valueFragment = JstdConfigFileUtils.extractValueAsDocumentFragment(keyValue);
View Full Code Here

Examples of com.intellij.psi.PsiElementVisitor

*/
public class UnknownManifestPackageInspection extends LocalInspectionTool {
  @NotNull
  @Override
  public PsiElementVisitor buildVisitor(final @NotNull ProblemsHolder holder, boolean isOnTheFly) {
    return new PsiElementVisitor() {

      public void visitElement(final PsiElement element) {
        if (element instanceof HeaderValuePart && OsmorcFacet.hasOsmorcFacet(element) && !element.getText().isEmpty()) {
          PsiReference[] references = element.getReferences();
          for (int i = 0; i < references.length; i++) {
View Full Code Here

Examples of com.intellij.psi.PsiElementVisitor

*/
public class WrongImportPackageInspection extends LocalInspectionTool {
  @NotNull
  @Override
  public PsiElementVisitor buildVisitor(final @NotNull ProblemsHolder holder, boolean isOnTheFly) {
    return new PsiElementVisitor() {
      private final BundleManager myBundleManager = BundleManager.getInstance(holder.getProject());

      @Override
      public void visitElement(PsiElement element) {
        if (OsgiPsiUtil.isHeader(element, Constants.IMPORT_PACKAGE) && OsmorcFacet.hasOsmorcFacet(element)) {
View Full Code Here

Examples of com.intellij.psi.PsiElementVisitor

    return ((NavigationItem) myElement).canNavigateToSource();
  }

  public StructureViewTreeElement[] getChildren() {
    final List<ClojurePsiElement> childrenElements = new ArrayList<ClojurePsiElement>();
    myElement.acceptChildren(new PsiElementVisitor() {
      public void visitElement(PsiElement element) {
        if (isBrowsableElement(element)) {
          childrenElements.add((ClojurePsiElement) element);
        } else {
          element.acceptChildren(this);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.