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


Java MenuResourceProvidersFactory类代码示例

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


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

示例1: actionPerformed

import com.morcinek.android.codegenerator.codegeneration.providers.factories.MenuResourceProvidersFactory; //导入依赖的package包/类
@Override
public void actionPerformed(AnActionEvent event) {
    final Project project = event.getData(PlatformDataKeys.PROJECT);
    final VirtualFile selectedFile = event.getData(PlatformDataKeys.VIRTUAL_FILE);
    try {
        CodeGeneratorController codeGeneratorController = new CodeGeneratorController("Menu_template", new MenuResourceProvidersFactory());
        String generatedCode = codeGeneratorController.generateCode(project, selectedFile, event.getData(PlatformDataKeys.EDITOR));
        final CodeDialogBuilder codeDialogBuilder = new CodeDialogBuilder(project,
                String.format(StringResources.TITLE_FORMAT_TEXT, selectedFile.getName()), generatedCode);
        codeDialogBuilder.addAction(StringResources.COPY_ACTION_LABEL, new Runnable() {
            @Override
            public void run() {
                ClipboardHelper.copy(codeDialogBuilder.getModifiedCode());
                codeDialogBuilder.closeDialog();
            }
        });
        codeDialogBuilder.showDialog();
    } catch (Exception exception) {
        errorHandler.handleError(project, exception);
    }
}
 
开发者ID:cooliean,项目名称:android-codegenerator-plugin-intellij,代码行数:22,代码来源:MenuAction.java

示例2: setUp

import com.morcinek.android.codegenerator.codegeneration.providers.factories.MenuResourceProvidersFactory; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    codeGenerator = new CodeGenerator(XMLResourceExtractor.createResourceExtractor(), new FileNameExtractor(), new TemplateCodeGenerator("Menu_template", new MenuResourceProvidersFactory(), new ResourceTemplatesProvider()));
}
 
开发者ID:cooliean,项目名称:android-codegenerator-plugin-intellij,代码行数:5,代码来源:MenuCodeGeneratorTest.java

示例3: setUp

import com.morcinek.android.codegenerator.codegeneration.providers.factories.MenuResourceProvidersFactory; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    templateCodeGenerator = new TemplateCodeGenerator("Menu_template", new MenuResourceProvidersFactory(), new ResourceTemplatesProvider());
}
 
开发者ID:cooliean,项目名称:android-codegenerator-plugin-intellij,代码行数:5,代码来源:MenuTemplateCodeGeneratorTest.java

示例4: getGeneratedCode

import com.morcinek.android.codegenerator.codegeneration.providers.factories.MenuResourceProvidersFactory; //导入依赖的package包/类
private String getGeneratedCode(IFile selectedFile) throws ParserConfigurationException, SAXException, XPathExpressionException, IOException, CoreException {
    CodeGenerator codeGenerator = Activator.getDefault().createCodeGenerator("Menu_template", new MenuResourceProvidersFactory());
    return codeGenerator.produceCode(selectedFile.getContents(), selectedFile.getName());
}
 
开发者ID:tmorcinek,项目名称:android-codegenerator-plugin-eclipse,代码行数:5,代码来源:MenuActionHandler.java


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