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


Java BaseCodeInsightAction类代码示例

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


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

示例1: actionPerformed

import com.intellij.codeInsight.actions.BaseCodeInsightAction; //导入依赖的package包/类
@Override
public void actionPerformed(final AnActionEvent e)
{
	Editor editor = e.getData(PlatformDataKeys.EDITOR);
	PsiFile psifile = e.getData(LangDataKeys.PSI_FILE);
	Project project = e.getData(PlatformDataKeys.PROJECT);

	final VirtualFile file = e.getData(PlatformDataKeys.VIRTUAL_FILE);
	if(JavaScriptSupportLoader.isFlexMxmFile(file))
	{
		editor = BaseCodeInsightAction.getInjectedEditor(project, editor);
		psifile = PsiUtilBase.getPsiFileInEditor(editor, project);
	}

	new JavaScriptGenerateAccessorHandler(getGenerationMode()).invoke(project, editor, psifile);
}
 
开发者ID:consulo,项目名称:consulo-javascript,代码行数:17,代码来源:BaseJSGenerateAction.java

示例2: getEditor

import com.intellij.codeInsight.actions.BaseCodeInsightAction; //导入依赖的package包/类
@Override
protected Editor getEditor(final DataContext dataContext) {
  final Editor editor = PlatformDataKeys.EDITOR.getData(dataContext);
  if (editor == null) return null;
  Project project = editor.getProject();
  if (project == null) project = PlatformDataKeys.PROJECT.getData(dataContext);
  return project == null ? null : BaseCodeInsightAction.getInjectedEditor(project, editor);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:9,代码来源:SmartEnterAction.java

示例3: doTest

import com.intellij.codeInsight.actions.BaseCodeInsightAction; //导入依赖的package包/类
private void doTest(String beforeFile, String afterFile, int repeatActionTimes, BaseCodeInsightAction action) {
    myFixture.configureByFile(beforeFile);

    while (repeatActionTimes-- > 0) {
        action.actionPerformedImpl(getProject(), myFixture.getEditor());
    }

    myFixture.checkResultByFile(afterFile);
}
 
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:10,代码来源:XQueryStructureNavigationTest.java


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