From 53cf69375419ab4f6b0ea678708954ee32231a32 Mon Sep 17 00:00:00 2001 From: Alexandr Evstigneev Date: Mon, 22 Mar 2021 14:40:51 +0300 Subject: [PATCH] RUBY-27895 removed trusted project customization for learning plugin For now no one can imagine such case, also for new project wizard same logic is unconditional IJ-CR-7422 GitOrigin-RevId: aaab02b1620ff740d298a4da4a9dd1693557e3ea --- .../ide-features-trainer/src/training/lang/LangSupport.kt | 6 ------ .../src/training/project/ProjectUtils.kt | 4 +--- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/plugins/ide-features-trainer/src/training/lang/LangSupport.kt b/plugins/ide-features-trainer/src/training/lang/LangSupport.kt index dcfd236113fe..e4407b64ff0c 100644 --- a/plugins/ide-features-trainer/src/training/lang/LangSupport.kt +++ b/plugins/ide-features-trainer/src/training/lang/LangSupport.kt @@ -39,12 +39,6 @@ interface LangSupport { fun copyLearningProjectFiles(projectDirectory: File, destinationFilter: FileFilter? = null): Boolean - /** - * @return true iff newly created project should be marked as trusted after creation. Otherwise project will have UNSURE status. - * @see com.intellij.ide.impl.TrustedProjectSettings - */ - fun isTrusted(project: Project): Boolean = true - /** * Implement that method to define SDK lookup depending on a given project. * diff --git a/plugins/ide-features-trainer/src/training/project/ProjectUtils.kt b/plugins/ide-features-trainer/src/training/project/ProjectUtils.kt index 3f2d8dfbf102..b7ed4d5453ce 100644 --- a/plugins/ide-features-trainer/src/training/project/ProjectUtils.kt +++ b/plugins/ide-features-trainer/src/training/project/ProjectUtils.kt @@ -126,9 +126,7 @@ object ProjectUtils { val project = ProjectUtil.openOrImport(projectDirectoryVirtualFile.toNioPath(), task) ?: error("Could not create project for ${langSupport.primaryLanguage}") PropertiesComponent.getInstance(project).setValue(LEARNING_PROJECT_MODIFICATION, System.currentTimeMillis().toString()) - if (langSupport.isTrusted(project)) { - project.setTrusted(true) - } + project.setTrusted(true) postInitCallback(project) } }