当前位置: 首页>>代码示例>>Java>>正文


Java UsageViewDescriptor类代码示例

本文整理汇总了Java中com.intellij.usageView.UsageViewDescriptor的典型用法代码示例。如果您正苦于以下问题:Java UsageViewDescriptor类的具体用法?Java UsageViewDescriptor怎么用?Java UsageViewDescriptor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


UsageViewDescriptor类属于com.intellij.usageView包,在下文中一共展示了UsageViewDescriptor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: customizeUsagesView

import com.intellij.usageView.UsageViewDescriptor; //导入依赖的package包/类
protected void customizeUsagesView(@NotNull final UsageViewDescriptor viewDescriptor, @NotNull final UsageView usageView) {
  final Runnable refactoringRunnable = new Runnable() {
    @Override
    public void run() {
      Set<UsageInfo> usagesToRefactor = UsageViewUtil.getNotExcludedUsageInfos(usageView);
      final UsageInfo[] infos = usagesToRefactor.toArray(new UsageInfo[usagesToRefactor.size()]);
      if (ensureElementsWritable(infos, viewDescriptor)) {
        execute(infos);
      }
    }
  };

  String canNotMakeString = RefactoringBundle.message("usageView.need.reRun");

  addDoRefactoringAction(usageView, refactoringRunnable, canNotMakeString);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:BaseRefactoringProcessor.java

示例2: createUsageViewDescriptor

import com.intellij.usageView.UsageViewDescriptor; //导入依赖的package包/类
@NotNull
@Override
protected final UsageViewDescriptor createUsageViewDescriptor(@NotNull UsageInfo[] usages) {
  return new UsageViewDescriptorAdapter() {
    @NotNull
    @Override
    public PsiElement[] getElements() {
      return new PsiElement[] {myFunction};
    }

    @Override
    public String getProcessedElementsHeader() {
      return getRefactoringName();
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:PyBaseMakeFunctionTopLevelProcessor.java

示例3: createUsageViewDescriptor

import com.intellij.usageView.UsageViewDescriptor; //导入依赖的package包/类
@NotNull
@Override
protected UsageViewDescriptor createUsageViewDescriptor(@NotNull final UsageInfo[] usages) {
  return new UsageViewDescriptorAdapter() {
    @NotNull
    @Override
    public PsiElement[] getElements() {
      return myElements;
    }

    @Override
    public String getProcessedElementsHeader() {
      return REFACTORING_NAME;
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:PyMoveModuleMembersProcessor.java

示例4: createUsageViewDescriptor

import com.intellij.usageView.UsageViewDescriptor; //导入依赖的package包/类
@NotNull
@Override
protected UsageViewDescriptor createUsageViewDescriptor(@NotNull UsageInfo[] usages) {
  return new UsageViewDescriptorAdapter() {
    @NotNull
    @Override
    public PsiElement[] getElements() {
      return new PsiElement[]{myStyleTag};
    }

    @Override
    public String getProcessedElementsHeader() {
      return "Style to use";
    }

    @Override
    public String getCodeReferencesText(int usagesCount, int filesCount) {
      return "Tags the reference to the style will be added to " +
             UsageViewBundle.getOccurencesString(usagesCount, filesCount);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:AndroidFindStyleApplicationsProcessor.java

示例5: createUsageViewDescriptor

import com.intellij.usageView.UsageViewDescriptor; //导入依赖的package包/类
@NotNull
@Override
protected UsageViewDescriptor createUsageViewDescriptor(@NotNull UsageInfo[] usages) {
  return new UsageViewDescriptorAdapter() {
    @NotNull
    @Override
    public PsiElement[] getElements() {
      return new PsiElement[]{myLayoutFile};
    }

    @Override
    public String getCodeReferencesText(int usagesCount, int filesCount) {
      return "References to be inlined" + UsageViewBundle.getReferencesString(usagesCount, filesCount);
    }

    @Override
    public String getProcessedElementsHeader() {
      return "Layout file to inline";
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:AndroidInlineLayoutProcessor.java

示例6: createUsageViewDescriptor

import com.intellij.usageView.UsageViewDescriptor; //导入依赖的package包/类
@NotNull
@Override
protected UsageViewDescriptor createUsageViewDescriptor(@NotNull UsageInfo[] usages) {
  return new UsageViewDescriptorAdapter() {
    @NotNull
    @Override
    public PsiElement[] getElements() {
      return new PsiElement[]{myStyleElement};
    }

    @Override
    public String getCodeReferencesText(int usagesCount, int filesCount) {
      return "References to be inlined" + UsageViewBundle.getReferencesString(usagesCount, filesCount);
    }

    @Override
    public String getProcessedElementsHeader() {
      return "Style to inline";
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:AndroidInlineAllStyleUsagesProcessor.java

示例7: createUsageViewDescriptor

import com.intellij.usageView.UsageViewDescriptor; //导入依赖的package包/类
@NotNull
@Override
protected UsageViewDescriptor createUsageViewDescriptor(@NotNull UsageInfo[] usages) {
  return new UsageViewDescriptorAdapter() {
    @NotNull
    @Override
    public PsiElement[] getElements() {
      return new PsiElement[]{myHelper.getToSearchFor()};
    }

    @Override
    public String getProcessedElementsHeader() {
      return EXTRACT_CLOSURE;
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:ExtractClosureProcessorBase.java

示例8: createUsageViewDescriptor

import com.intellij.usageView.UsageViewDescriptor; //导入依赖的package包/类
@Override
@NotNull
protected UsageViewDescriptor createUsageViewDescriptor(@NotNull final UsageInfo[] usages) {
  return new UsageViewDescriptorAdapter() {
    @NotNull
    @Override
    public PsiElement[] getElements() {
      return new PsiElement[]{toSearchFor != null ? toSearchFor : toReplaceIn};
    }

    @Override
    public String getProcessedElementsHeader() {
      return GroovyRefactoringBundle.message("introduce.closure.parameter.elements.header");
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:GrIntroduceClosureParameterProcessor.java

示例9: createUsageViewDescriptor

import com.intellij.usageView.UsageViewDescriptor; //导入依赖的package包/类
@NotNull
@Override
protected UsageViewDescriptor createUsageViewDescriptor(@NotNull final UsageInfo[] usages) {
  return new UsageViewDescriptorAdapter() {
    @NotNull
    @Override
    public PsiElement[] getElements() {
      return new PsiElement[]{mySettings.getToSearchFor()};
    }

    @Override
    public String getProcessedElementsHeader() {
      return RefactoringBundle.message("introduce.parameter.elements.header");
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:GrIntroduceParameterProcessor.java

示例10: createUsageViewDescriptor

import com.intellij.usageView.UsageViewDescriptor; //导入依赖的package包/类
@NotNull
@Override
protected UsageViewDescriptor createUsageViewDescriptor(@NotNull UsageInfo[] usages) {
  return new UsageViewDescriptorAdapter() {
    @NotNull
    @Override
    public PsiElement[] getElements() {
      return myFiles;
    }

    @Override
    public String getProcessedElementsHeader() {
      return GroovyRefactoringBundle.message("files.to.be.converted");
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:ConvertToJavaProcessor.java

示例11: createUsageViewDescriptor

import com.intellij.usageView.UsageViewDescriptor; //导入依赖的package包/类
@NotNull
@Override
protected UsageViewDescriptor createUsageViewDescriptor(UsageInfo[] usages) {
  return new UsageViewDescriptorAdapter() {
    @NotNull
    @Override
    public PsiElement[] getElements() {
      return new PsiElement[]{myHelper.getToSearchFor()};
    }

    @Override
    public String getProcessedElementsHeader() {
      return EXTRACT_CLOSURE;
    }
  };
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:ExtractClosureProcessorBase.java

示例12: createUsageViewDescriptor

import com.intellij.usageView.UsageViewDescriptor; //导入依赖的package包/类
@NotNull
@Override
protected UsageViewDescriptor createUsageViewDescriptor(final UsageInfo[] usages) {
  return new UsageViewDescriptorAdapter() {
    @NotNull
    @Override
    public PsiElement[] getElements() {
      return new PsiElement[]{mySettings.getToSearchFor()};
    }

    @Override
    public String getProcessedElementsHeader() {
      return RefactoringBundle.message("introduce.parameter.elements.header");
    }
  };
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:GrIntroduceParameterProcessor.java

示例13: createUsageViewDescriptor

import com.intellij.usageView.UsageViewDescriptor; //导入依赖的package包/类
@NotNull
@Override
protected UsageViewDescriptor createUsageViewDescriptor(UsageInfo[] usages) {
  return new UsageViewDescriptorAdapter() {
    @NotNull
    @Override
    public PsiElement[] getElements() {
      return myFiles;
    }

    @Override
    public String getProcessedElementsHeader() {
      return GroovyRefactoringBundle.message("files.to.be.converted");
    }
  };
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:ConvertToJavaProcessor.java

示例14: createRefactoringProcessor

import com.intellij.usageView.UsageViewDescriptor; //导入依赖的package包/类
@Override
@RequiredDispatchThread
protected BaseRefactoringProcessor createRefactoringProcessor()
{
	CSharpChangeInfo changeInfo = generateChangeInfo();

	return new ChangeSignatureProcessorBase(getProject(), changeInfo)
	{
		@NotNull
		@Override
		protected UsageViewDescriptor createUsageViewDescriptor(UsageInfo[] usages)
		{
			return new ChangeSignatureViewDescriptor(myMethod.getMethod());
		}
	};
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:17,代码来源:CSharpChangeSignatureDialog.java

示例15: createUsageViewDescriptor

import com.intellij.usageView.UsageViewDescriptor; //导入依赖的package包/类
@NotNull
protected UsageViewDescriptor createUsageViewDescriptor(@NotNull UsageInfo[] usages) {
  if (myConstructor != null) {
    return new ReplaceConstructorWithFactoryViewDescriptor(myConstructor);
  }
  else {
    return new ReplaceConstructorWithFactoryViewDescriptor(myOriginalClass);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ReplaceConstructorWithFactoryProcessor.java


注:本文中的com.intellij.usageView.UsageViewDescriptor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。