本文整理匯總了Java中com.intellij.codeInsight.intention.IntentionAction.getFamilyName方法的典型用法代碼示例。如果您正苦於以下問題:Java IntentionAction.getFamilyName方法的具體用法?Java IntentionAction.getFamilyName怎麽用?Java IntentionAction.getFamilyName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.codeInsight.intention.IntentionAction
的用法示例。
在下文中一共展示了IntentionAction.getFamilyName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: convertToFix
import com.intellij.codeInsight.intention.IntentionAction; //導入方法依賴的package包/類
@Override
@NotNull
public LocalQuickFix convertToFix(@NotNull final IntentionAction action) {
if (action instanceof LocalQuickFix) {
return (LocalQuickFix)action;
}
return new LocalQuickFix() {
@Override
@NotNull
public String getName() {
return action.getText();
}
@Override
@NotNull
public String getFamilyName() {
return action.getFamilyName();
}
@Override
public void applyFix(@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) {
final PsiFile psiFile = descriptor.getPsiElement().getContainingFile();
try {
action.invoke(project, new LazyEditor(psiFile), psiFile);
}
catch (IncorrectOperationException e) {
LOG.error(e);
}
}
};
}
示例2: getFamilyName
import com.intellij.codeInsight.intention.IntentionAction; //導入方法依賴的package包/類
private static String getFamilyName(@NotNull IntentionAction action) {
return action instanceof IntentionActionWrapper ? ((IntentionActionWrapper)action).getFullFamilyName() : action.getFamilyName();
}
示例3: AbstractEditIntentionSettingsAction
import com.intellij.codeInsight.intention.IntentionAction; //導入方法依賴的package包/類
private AbstractEditIntentionSettingsAction(IntentionAction action) {
myFamilyName = action.getFamilyName();
myDisabled = action instanceof IntentionActionWrapper &&
Comparing.equal(action.getFamilyName(), ((IntentionActionWrapper)action).getFullFamilyName());
}