Examples of registerFix()


Examples of com.intellij.lang.annotation.Annotation.registerFix()

            Annotation annotationHolder = holder.createWarningAnnotation(psiElement, "Missing Translation");
            List<PsiFile> psiElements = TranslationUtil.getDomainPsiFiles(psiElement.getProject(), domainName);
            for(PsiElement psiFile: psiElements) {
                if(psiFile instanceof YAMLFile) {
                    annotationHolder.registerFix(new TranslationKeyIntentionAction((YAMLFile) psiFile, keyName));
                }
            }
        }

    }
View Full Code Here

Examples of com.intellij.lang.annotation.Annotation.registerFix()

        if(!TranslationUtil.hasTranslationKey(psiElement.getProject(), text, domainName)) {
            Annotation annotationHolder = holder.createWarningAnnotation(psiElement, "Missing Translation");
            List<PsiFile> psiElements = TranslationUtil.getDomainPsiFiles(psiElement.getProject(), domainName);
            for(PsiElement psiFile: psiElements) {
                if(psiFile instanceof YAMLFile) {
                    annotationHolder.registerFix(new TranslationKeyIntentionAction((YAMLFile) psiFile, text));
                }
            }
        }

    }
View Full Code Here

Examples of com.intellij.lang.annotation.Annotation.registerFix()

                        final Annotation annotation = annotationHolder.createWarningAnnotation(
                                processor.getSelectionRange(text, currentOffset, errorBean),
                                processor.getMessage(errorBean));

                        for (IntentionAction intentionAction : processor.getFixes(errorBean)) {
                            annotation.registerFix(intentionAction);
                            annotation.setNeedsUpdateOnTyping(true);
                        }
                    }
                }
            }
View Full Code Here

Examples of com.intellij.lang.annotation.Annotation.registerFix()

      TextRange problemRange = TextRange.create(offset, offset + width);
      String message = "Dialyzer: " + problem.myDescription;
      Annotation annotation = holder.createWarningAnnotation(problemRange, message);
      HighlightDisplayKey key = HighlightDisplayKey.find(ErlangDialyzerInspection.INSPECTION_SHORT_NAME);
      annotation.registerFix(new DisableInspectionToolAction(key) {
        @NotNull
        @Override
        public String getName() {
          return "Disable 'Dialyzer-based inspections'";
        }
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.