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


Java Project.putUserData方法代码示例

本文整理汇总了Java中com.intellij.openapi.project.Project.putUserData方法的典型用法代码示例。如果您正苦于以下问题:Java Project.putUserData方法的具体用法?Java Project.putUserData怎么用?Java Project.putUserData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.project.Project的用法示例。


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

示例1: triggerNextAction

import com.intellij.openapi.project.Project; //导入方法依赖的package包/类
private void triggerNextAction() {
    for (Project project : ProjectManager.getInstance().getOpenProjects()) {
        final STATES state = project.getUserData(STATE);
        if (state == null) {
            continue;
        }
        switch (state) {
            case CLEAN_ALL_NEEDED:
                project.putUserData(STATE, STATES.REFRESH_NEEDED);
                triggerCleanAll(project);
                return;
            case REFRESH_NEEDED:
                project.putUserData(STATE, null);
                ProjectRefreshAction.triggerAction(getDataContext(project));
                return;
        }
    }
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:19,代码来源:HybrisAntBuildListener.java

示例2: processNewExtensions

import com.intellij.openapi.project.Project; //导入方法依赖的package包/类
private void processNewExtensions(final Map<Project, AntGenResult> resultMap) {
    if (!resultMap.isEmpty()) {
        final Project project = resultMap.keySet().iterator().next();
        final AntGenResult antGenResult = resultMap.get(project);
        modifyLocalExtensions(project, antGenResult);
        project.putUserData(STATE, STATES.CLEAN_ALL_NEEDED);
    }
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:9,代码来源:HybrisAntBuildListener.java

示例3: configure

import com.intellij.openapi.project.Project; //导入方法依赖的package包/类
@Override
public void configure(
    @NotNull final HybrisProjectDescriptor hybrisProjectDescriptor,
    @NotNull final Project project,
    @NotNull final List<GradleModuleDescriptor> gradleModules,
    @Nullable final String[] gradleRootGroup
) {
    if (gradleModules.isEmpty()) {
        return;
    }
    final ProjectDataManager projectDataManager = ServiceManager.getService(ProjectDataManager.class);
    final GradleProjectImportBuilder gradleProjectImportBuilder = new GradleProjectImportBuilder(projectDataManager);
    final GradleProjectImportProvider gradleProjectImportProvider = new GradleProjectImportProvider(
        gradleProjectImportBuilder);

    gradleModules.forEach(gradleModule -> {
        ApplicationManager.getApplication().invokeAndWait(() -> {
            final AddModuleWizard wizard = new AddModuleWizard(
                project,
                gradleModule.getGradleFile().getPath(),
                gradleProjectImportProvider
            );
            final GradleProjectSettings projectSettings = gradleProjectImportBuilder.getControl(project)
                                                                                    .getProjectSettings();
            projectSettings.setUseAutoImport(true);
            projectSettings.setCreateEmptyContentRootDirectories(false);
            if (wizard.getStepCount() > 0) {
                final ModuleWizardStep step = wizard.getCurrentStepObject();
                if (step.isStepVisible()) {
                    step.updateStep();
                    step.updateDataModel();
                }
            }
            wizard.doFinishAction();
            final List<Module> newModules = ImportModuleAction.createFromWizard(project, wizard);
            if (gradleRootGroup != null && gradleRootGroup.length > 0) {
                moveGradleModulesToGroup(project, newModules, gradleRootGroup);
            }
        });
    });

    project.putUserData(ExternalSystemDataKeys.NEWLY_CREATED_PROJECT, Boolean.TRUE);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:44,代码来源:DefaultGradleConfigurator.java


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