本文整理汇总了Java中com.intellij.lang.refactoring.InlineActionHandler.inlineElement方法的典型用法代码示例。如果您正苦于以下问题:Java InlineActionHandler.inlineElement方法的具体用法?Java InlineActionHandler.inlineElement怎么用?Java InlineActionHandler.inlineElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.lang.refactoring.InlineActionHandler
的用法示例。
在下文中一共展示了InlineActionHandler.inlineElement方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: invoke
import com.intellij.lang.refactoring.InlineActionHandler; //导入方法依赖的package包/类
@Override
public void invoke(@NotNull Project project, @NotNull PsiElement[] elements, DataContext dataContext) {
LOG.assertTrue(elements.length == 1);
if (dataContext == null) {
dataContext = DataManager.getInstance().getDataContext();
}
final Editor editor = CommonDataKeys.EDITOR.getData(dataContext);
for(InlineActionHandler handler: Extensions.getExtensions(InlineActionHandler.EP_NAME)) {
if (handler.canInlineElement(elements[0])) {
handler.inlineElement(project, editor, elements [0]);
return;
}
}
invokeInliner(editor, elements[0]);
}
示例2: invoke
import com.intellij.lang.refactoring.InlineActionHandler; //导入方法依赖的package包/类
@Override
public void invoke(@NotNull Project project, @NotNull PsiElement[] elements, DataContext dataContext) {
LOG.assertTrue(elements.length == 1);
if (dataContext == null) {
dataContext = DataManager.getInstance().getDataContext();
}
final Editor editor = PlatformDataKeys.EDITOR.getData(dataContext);
for(InlineActionHandler handler: Extensions.getExtensions(InlineActionHandler.EP_NAME)) {
if (handler.canInlineElement(elements[0])) {
handler.inlineElement(project, editor, elements [0]);
return;
}
}
invokeInliner(editor, elements[0]);
}
示例3: invoke
import com.intellij.lang.refactoring.InlineActionHandler; //导入方法依赖的package包/类
@Override
public void invoke(@Nonnull Project project, @Nonnull PsiElement[] elements, DataContext dataContext) {
LOG.assertTrue(elements.length == 1);
if (dataContext == null) {
dataContext = DataManager.getInstance().getDataContext();
}
final Editor editor = dataContext.getData(PlatformDataKeys.EDITOR);
for(InlineActionHandler handler: Extensions.getExtensions(InlineActionHandler.EP_NAME)) {
if (handler.canInlineElement(elements[0])) {
handler.inlineElement(project, editor, elements [0]);
return;
}
}
invokeInliner(editor, elements[0]);
}
示例4: inlineElement
import com.intellij.lang.refactoring.InlineActionHandler; //导入方法依赖的package包/类
private void inlineElement(final PsiElement element){
if (element == null) return;
if (!(element instanceof PsiModifierListOwner)) return;
boolean isPublic = ((PsiModifierListOwner) element).hasModifierProperty("public");
if (isPublic) return;
for (final InlineActionHandler handler : Extensions.getExtensions(InlineActionHandler.EP_NAME)) {
if (handler.canInlineElement(element)) {
handler.inlineElement(element.getProject(), null, element);
return;
}
}
}