|
|
|
@ -16,7 +16,6 @@
|
|
|
|
|
package com.alibaba.p3c.idea.component
|
|
|
|
|
|
|
|
|
|
import com.alibaba.p3c.idea.compatible.inspection.Inspections
|
|
|
|
|
import com.alibaba.p3c.idea.component.CommonSettingsApplicationComponent.Companion
|
|
|
|
|
import com.alibaba.p3c.idea.config.P3cConfig
|
|
|
|
|
import com.alibaba.p3c.idea.i18n.P3cBundle
|
|
|
|
|
import com.alibaba.p3c.idea.inspection.AliPmdInspectionInvoker
|
|
|
|
@ -36,8 +35,8 @@ import com.intellij.psi.PsiManager
|
|
|
|
|
* @date 2016/12/13
|
|
|
|
|
*/
|
|
|
|
|
class AliProjectComponent(
|
|
|
|
|
private val project: Project,
|
|
|
|
|
val p3cConfig: P3cConfig
|
|
|
|
|
private val project: Project,
|
|
|
|
|
val p3cConfig: P3cConfig
|
|
|
|
|
) : AliBaseProjectComponent {
|
|
|
|
|
private val listener: VirtualFileListener
|
|
|
|
|
private val javaExtension = ".java"
|
|
|
|
@ -64,8 +63,8 @@ class AliProjectComponent(
|
|
|
|
|
|
|
|
|
|
override fun initComponent() {
|
|
|
|
|
I18nResources.changeLanguage(p3cConfig.locale)
|
|
|
|
|
val analyticsGroup = ActionManager.getInstance().getAction(CommonSettingsApplicationComponent.analyticsGroupId)
|
|
|
|
|
analyticsGroup.templatePresentation.text = P3cBundle.getMessage(CommonSettingsApplicationComponent.analyticsGroupText)
|
|
|
|
|
val analyticsGroup = ActionManager.getInstance().getAction(analyticsGroupId)
|
|
|
|
|
analyticsGroup.templatePresentation.text = P3cBundle.getMessage(analyticsGroupText)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override fun projectOpened() {
|
|
|
|
@ -76,4 +75,9 @@ class AliProjectComponent(
|
|
|
|
|
override fun projectClosed() {
|
|
|
|
|
VirtualFileManager.getInstance().removeVirtualFileListener(listener)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
companion object {
|
|
|
|
|
val analyticsGroupId = "com.alibaba.p3c.analytics.action_group"
|
|
|
|
|
val analyticsGroupText = "$analyticsGroupId.text"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|