本文整理汇总了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);
}
示例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();
}
};
}
示例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;
}
};
}
示例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);
}
};
}
示例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";
}
};
}
示例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";
}
};
}
示例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;
}
};
}
示例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");
}
};
}
示例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");
}
};
}
示例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");
}
};
}
示例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;
}
};
}
示例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");
}
};
}
示例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");
}
};
}
示例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());
}
};
}
示例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);
}
}