當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。