diff --git a/resources/META-INF/lang-optional-dependencies.xml b/resources/META-INF/lang-optional-dependencies.xml index a98722483..d902f2917 100644 --- a/resources/META-INF/lang-optional-dependencies.xml +++ b/resources/META-INF/lang-optional-dependencies.xml @@ -203,10 +203,8 @@ - - - + + * * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -19,8 +19,6 @@ package com.intellij.idea.plugin.hybris.impex.liveTemplates; import com.intellij.codeInsight.template.FileTypeBasedContextType; -import com.intellij.codeInsight.template.TemplateContextType; -import com.intellij.idea.plugin.hybris.impex.ImpexLanguage; import com.intellij.idea.plugin.hybris.impex.file.ImpexFileType; import com.intellij.idea.plugin.hybris.impex.psi.ImpexFile; import com.intellij.psi.PsiFile; @@ -32,7 +30,7 @@ public class ImpexContextType extends FileTypeBasedContextType { protected ImpexContextType() { - super("IMPEX", "Impex", ImpexFileType.getInstance()); + super("Impex", ImpexFileType.getInstance()); } @Override diff --git a/src/com/intellij/idea/plugin/hybris/impex/liveTemplates/ImpexTemplateProvider.java b/src/com/intellij/idea/plugin/hybris/impex/liveTemplates/ImpexTemplateProvider.java deleted file mode 100644 index 7d063260b..000000000 --- a/src/com/intellij/idea/plugin/hybris/impex/liveTemplates/ImpexTemplateProvider.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file is part of "hybris integration" plugin for Intellij IDEA. - * Copyright (C) 2014-2016 Alexander Bartash - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -package com.intellij.idea.plugin.hybris.impex.liveTemplates; - -import com.intellij.codeInsight.template.impl.DefaultLiveTemplatesProvider; -import org.jetbrains.annotations.Nullable; - -/** - * @author Aleksandr Nosov - */ -public class ImpexTemplateProvider implements DefaultLiveTemplatesProvider { - - @Override - public String[] getDefaultLiveTemplateFiles() { - return new String[]{"liveTemplates/Impex"}; - } - - @Nullable - @Override - public String[] getHiddenLiveTemplateFiles() { - return new String[0]; - } -} \ No newline at end of file diff --git a/src/com/intellij/idea/plugin/hybris/tools/remote/console/impl/HybrisImpexConsole.kt b/src/com/intellij/idea/plugin/hybris/tools/remote/console/impl/HybrisImpexConsole.kt index 7cb2b2f3c..0db7d3a97 100644 --- a/src/com/intellij/idea/plugin/hybris/tools/remote/console/impl/HybrisImpexConsole.kt +++ b/src/com/intellij/idea/plugin/hybris/tools/remote/console/impl/HybrisImpexConsole.kt @@ -102,7 +102,7 @@ class HybrisImpexConsole(project: Project) : HybrisConsole(project, HybrisConsta return HybrisHacHttpClient.getInstance(project).importImpex(project, settings) } - override fun title(): String = "Impex" + override fun title(): String = HybrisConstants.IMPEX override fun tip(): String = "Impex Console" diff --git a/src/com/intellij/idea/plugin/hybris/tools/remote/console/persistence/services/impl/DefaultJsonRegionPersistenceService.java b/src/com/intellij/idea/plugin/hybris/tools/remote/console/persistence/services/impl/DefaultJsonRegionPersistenceService.java index ec56e378a..13acb5e7a 100644 --- a/src/com/intellij/idea/plugin/hybris/tools/remote/console/persistence/services/impl/DefaultJsonRegionPersistenceService.java +++ b/src/com/intellij/idea/plugin/hybris/tools/remote/console/persistence/services/impl/DefaultJsonRegionPersistenceService.java @@ -28,12 +28,12 @@ public class DefaultJsonRegionPersistenceService implements RegionPersistenceService { - private Project project; - private RegionService regionService; + private final Project project; + private final RegionService regionService; - public DefaultJsonRegionPersistenceService(final RegionService regionService, final Project project) { + public DefaultJsonRegionPersistenceService(final Project project) { this.project = project; - this.regionService = regionService; + this.regionService = RegionService.getInstance(project); } @Override diff --git a/src/com/intellij/idea/plugin/hybris/tools/remote/console/persistence/services/impl/DefaultRegionService.java b/src/com/intellij/idea/plugin/hybris/tools/remote/console/persistence/services/impl/DefaultRegionService.java index 3036df87f..1b124b548 100644 --- a/src/com/intellij/idea/plugin/hybris/tools/remote/console/persistence/services/impl/DefaultRegionService.java +++ b/src/com/intellij/idea/plugin/hybris/tools/remote/console/persistence/services/impl/DefaultRegionService.java @@ -21,6 +21,7 @@ import com.intellij.idea.plugin.hybris.tools.remote.console.persistence.cache.HybrisConsoleRegionsCache; import com.intellij.idea.plugin.hybris.tools.remote.console.persistence.pojo.Region; import com.intellij.idea.plugin.hybris.tools.remote.console.persistence.services.RegionService; +import com.intellij.openapi.project.Project; import org.jetbrains.annotations.NotNull; import java.util.Map; @@ -28,10 +29,10 @@ public class DefaultRegionService implements RegionService { - private HybrisConsoleRegionsCache cache; + private final HybrisConsoleRegionsCache cache; - public DefaultRegionService(HybrisConsoleRegionsCache cache) { - this.cache = cache; + public DefaultRegionService(final Project project) { + this.cache = HybrisConsoleRegionsCache.getInstance(project); } @Override