Examples of PsiNameValuePair


Examples of com.intellij.psi.PsiNameValuePair

    final PsiFile file = myAnnotation.getContainingFile();
    final Editor editor = CodeInsightUtil.positionCursor(project, file, myAnnotation);
    if (editor != null) {
      new WriteCommandAction(project, file) {
        protected void run(Result result) throws Throwable {
          final PsiNameValuePair valuePair = selectAnnotationAttribute();

          if (null != valuePair) {
            // delete this parameter
            valuePair.delete();
          }

          if (null != myNewValue) {
            //add new parameter
            final PsiElementFactory elementFactory = JavaPsiFacade.getInstance(myAnnotation.getProject()).getElementFactory();
View Full Code Here

Examples of com.intellij.psi.PsiNameValuePair

      }.execute();
    }
  }

  private PsiNameValuePair selectAnnotationAttribute() {
    PsiNameValuePair result = null;
    PsiNameValuePair[] attributes = myAnnotation.getParameterList().getAttributes();
    for (PsiNameValuePair attribute : attributes) {
      @NonNls final String attributeName = attribute.getName();
      if (equals(myName, attributeName) || attributeName == null && myName.equals(PsiAnnotation.DEFAULT_REFERENCED_METHOD_NAME)) {
        result = attribute;
View Full Code Here

Examples of com.intellij.psi.PsiNameValuePair

    final PsiFile file = myAnnotation.getContainingFile();
    final Editor editor = CodeInsightUtil.positionCursor(project, file, myAnnotation);
    if (editor != null) {
      new WriteCommandAction(project, file) {
        protected void run(Result result) throws Throwable {
          final PsiNameValuePair valuePair = selectAnnotationAttribute();

          if (null != valuePair) {
            // delete this parameter
            valuePair.delete();
          }

          if (null != myNewValue) {
            //add new parameter
            final PsiElementFactory elementFactory = JavaPsiFacade.getInstance(myAnnotation.getProject()).getElementFactory();
View Full Code Here

Examples of com.intellij.psi.PsiNameValuePair

      }.execute();
    }
  }

  private PsiNameValuePair selectAnnotationAttribute() {
    PsiNameValuePair result = null;
    PsiNameValuePair[] attributes = myAnnotation.getParameterList().getAttributes();
    for (PsiNameValuePair attribute : attributes) {
      @NonNls final String attributeName = attribute.getName();
      if (Comparing.equal(myName, attributeName) || attributeName == null && myName.equals(PsiAnnotation.DEFAULT_REFERENCED_METHOD_NAME)) {
        result = attribute;
View Full Code Here

Examples of com.intellij.psi.PsiNameValuePair

    final PsiFile file = myAnnotation.getContainingFile();
    final Editor editor = CodeInsightUtil.positionCursor(project, file, myAnnotation);
    if (editor != null) {
      new WriteCommandAction(project, file) {
        protected void run(@NotNull Result result) throws Throwable {
          final PsiNameValuePair valuePair = selectAnnotationAttribute();

          if (null != valuePair) {
            // delete this parameter
            valuePair.delete();
          }

          if (null != myNewValue) {
            //add new parameter
            final PsiElementFactory elementFactory = JavaPsiFacade.getInstance(myAnnotation.getProject()).getElementFactory();
View Full Code Here

Examples of com.intellij.psi.PsiNameValuePair

      }.execute();
    }
  }

  private PsiNameValuePair selectAnnotationAttribute() {
    PsiNameValuePair result = null;
    PsiNameValuePair[] attributes = myAnnotation.getParameterList().getAttributes();
    for (PsiNameValuePair attribute : attributes) {
      @NonNls final String attributeName = attribute.getName();
      if (equals(myName, attributeName) || attributeName == null && myName.equals(PsiAnnotation.DEFAULT_REFERENCED_METHOD_NAME)) {
        result = attribute;
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.