mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Migrate to defaultLiveTemplatesEP
GitOrigin-RevId: ff5058fbd0212bd0ceec5b56cfcd9d565216f020
This commit is contained in:
committed by
intellij-monorepo-bot
parent
810d512713
commit
3ccf932304
@@ -532,7 +532,9 @@
|
||||
<lang.implementationTextSelectioner language="XML"
|
||||
implementationClass="com.intellij.codeInsight.hint.XmlImplementationTextSelectioner"/>
|
||||
<basicWordSelectionFilter implementation="com.intellij.codeInsight.editorActions.XmlBasicWordSelectionFilter"/>
|
||||
<defaultLiveTemplatesProvider implementation="com.intellij.codeInsight.template.XmlDefaultLiveTemplatesProvider"/>
|
||||
<defaultLiveTemplates file="liveTemplates/html_xml.xml"/>
|
||||
<defaultLiveTemplates file="liveTemplates/zen_html.xml"/>
|
||||
<defaultLiveTemplates file="liveTemplates/zen_xsl.xml"/>
|
||||
<productivityFeaturesProvider implementation="com.intellij.featureStatistics.XmlProductivityFeatureProvider"/>
|
||||
|
||||
<idIndexer filetype="XML" implementationClass="com.intellij.psi.impl.cache.impl.idCache.XmlIdIndexer"/>
|
||||
|
||||
@@ -461,7 +461,7 @@
|
||||
<liveTemplateContext implementation="org.jetbrains.plugins.groovy.template.GroovyTemplateContextType$Statement"/>
|
||||
<liveTemplateContext implementation="org.jetbrains.plugins.groovy.template.GroovyTemplateContextType$Declaration"/>
|
||||
|
||||
<defaultLiveTemplatesProvider implementation="org.jetbrains.plugins.groovy.template.GroovyTemplatesProvider"/>
|
||||
<defaultLiveTemplates file="liveTemplates/Groovy.xml"/>
|
||||
|
||||
<liveTemplateOptionalProcessor implementation="org.jetbrains.plugins.groovy.template.GroovyShortenFQNamesProcessor"/>
|
||||
<variableTypeCalculator implementation="org.jetbrains.plugins.groovy.template.GroovyVariableTypeCalculator"/>
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jetbrains.plugins.groovy.template;
|
||||
|
||||
import com.intellij.codeInsight.template.impl.DefaultLiveTemplatesProvider;
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
*/
|
||||
public class GroovyTemplatesProvider implements DefaultLiveTemplatesProvider{
|
||||
@Override
|
||||
public String[] getDefaultLiveTemplateFiles() {
|
||||
return new String[]{"liveTemplates/Groovy"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getHiddenLiveTemplateFiles() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2010 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jetbrains.idea.maven.utils;
|
||||
|
||||
import com.intellij.codeInsight.template.impl.DefaultLiveTemplatesProvider;
|
||||
|
||||
public class MavenLiveTemplatesProvider implements DefaultLiveTemplatesProvider {
|
||||
@Override
|
||||
public String[] getDefaultLiveTemplateFiles() {
|
||||
return new String[]{"/liveTemplates/maven_xml"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getHiddenLiveTemplateFiles() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -105,7 +105,7 @@
|
||||
<attachSourcesProvider implementation="org.jetbrains.idea.maven.utils.MavenAttachSourcesProvider"/>
|
||||
|
||||
<liveTemplateContext implementation="org.jetbrains.idea.maven.utils.MavenLiveTemplateContextType"/>
|
||||
<defaultLiveTemplatesProvider implementation="org.jetbrains.idea.maven.utils.MavenLiveTemplatesProvider"/>
|
||||
<defaultLiveTemplates file="liveTemplates/maven_xml.xml"/>
|
||||
<projectTemplateFileProcessor implementation="org.jetbrains.idea.maven.utils.MavenTemplateFileProcessor"/>
|
||||
|
||||
<xml.elementDescriptorProvider implementation="org.jetbrains.idea.maven.dom.MavenDomElementDescriptorProvider"/>
|
||||
|
||||
@@ -42,9 +42,9 @@ Adds support for working with shell script files
|
||||
<runConfigurationProducer implementation="com.intellij.sh.run.ShRunConfigurationProducer"/>
|
||||
<runLineMarkerContributor language="Shell Script" implementationClass="com.intellij.sh.run.ShRunLineMarkerContributor"/>
|
||||
|
||||
<defaultLiveTemplates file="/liveTemplates/ShellScript"/>
|
||||
<defaultLiveTemplates file="/liveTemplates/ShellScriptArray"/>
|
||||
<defaultLiveTemplates file="/liveTemplates/ShellScriptHidden" hidden="true"/>
|
||||
<defaultLiveTemplates file="liveTemplates/ShellScript.xml"/>
|
||||
<defaultLiveTemplates file="liveTemplates/ShellScriptArray.xml"/>
|
||||
<defaultLiveTemplates file="liveTemplates/ShellScriptHidden.xml" hidden="true"/>
|
||||
<liveTemplateContext implementation="com.intellij.sh.template.ShContextType"/>
|
||||
<lineIndentProvider implementation="com.intellij.sh.formatter.ShLineIndentProvider"/>
|
||||
<langCodeStyleSettingsProvider implementation="com.intellij.sh.codeStyle.ShLanguageCodeStyleSettingsProvider"/>
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.sh.template;
|
||||
|
||||
import com.intellij.codeInsight.template.impl.DefaultLiveTemplatesProvider;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class ShTemplateProvider implements DefaultLiveTemplatesProvider {
|
||||
@Override
|
||||
public String[] getDefaultLiveTemplateFiles() {
|
||||
return new String[]{"liveTemplates/ShellScript", "liveTemplates/ShellScriptArray"};
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String[] getHiddenLiveTemplateFiles() {
|
||||
return new String[]{"liveTemplates/ShellScriptHidden"};
|
||||
}
|
||||
}
|
||||
@@ -155,7 +155,7 @@
|
||||
<psi.referenceContributor language="XML" implementation="org.intellij.lang.xpath.xslt.impl.XsltReferenceContributor$XML"/>
|
||||
<psi.referenceContributor language="XPath" implementation="org.intellij.lang.xpath.xslt.impl.XsltReferenceContributor$XPath"/>
|
||||
<standardResourceProvider implementation="org.intellij.lang.xpath.xslt.impl.XsltResourceProvider"/>
|
||||
<defaultLiveTemplatesProvider implementation="org.intellij.plugins.xpathView.XPathAppComponent" />
|
||||
<defaultLiveTemplates file="liveTemplates/xsl.xml"/>
|
||||
|
||||
<implicitUsageProvider implementation="org.intellij.lang.xpath.xslt.impl.XsltImplicitUsagesProvider" />
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ package org.intellij.plugins.xpathView;
|
||||
import com.intellij.codeInsight.hint.HintManager;
|
||||
import com.intellij.codeInsight.hint.HintManagerImpl;
|
||||
import com.intellij.codeInsight.hint.HintUtil;
|
||||
import com.intellij.codeInsight.template.impl.DefaultLiveTemplatesProvider;
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.actionSystem.DataContext;
|
||||
import com.intellij.openapi.actionSystem.IdeActions;
|
||||
import com.intellij.openapi.components.PersistentStateComponent;
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import com.intellij.openapi.components.State;
|
||||
@@ -50,7 +50,7 @@ import java.util.List;
|
||||
* Also used to manage highlighters.
|
||||
*/
|
||||
@State(name = "XPathView.XPathViewPlugin", storages = @Storage("xpath.xml"))
|
||||
public final class XPathAppComponent implements PersistentStateComponent<Config>, DefaultLiveTemplatesProvider {
|
||||
public final class XPathAppComponent implements PersistentStateComponent<Config> {
|
||||
private Config configuration = new Config();
|
||||
|
||||
@Nullable
|
||||
@@ -158,7 +158,7 @@ public final class XPathAppComponent implements PersistentStateComponent<Config>
|
||||
public static void showEditorHint(final String info, final Editor editor) {
|
||||
final JLabel label = new JLabel(info);
|
||||
label.setBorder(BorderFactory.createCompoundBorder(
|
||||
BorderFactory.createBevelBorder(BevelBorder.RAISED, Color.WHITE, Gray._128),
|
||||
BorderFactory.createBevelBorder(BevelBorder.RAISED, JBColor.WHITE, Gray._128),
|
||||
BorderFactory.createEmptyBorder(3, 5, 3, 5)));
|
||||
label.setForeground(JBColor.foreground());
|
||||
label.setBackground(HintUtil.getInformationColor());
|
||||
@@ -194,14 +194,4 @@ public final class XPathAppComponent implements PersistentStateComponent<Config>
|
||||
final int flags = HintManager.HIDE_BY_ANY_KEY | HintManager.HIDE_BY_SCROLLING;
|
||||
HintManagerImpl.getInstanceImpl().showEditorHint(h, editor, point, flags, 0, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDefaultLiveTemplateFiles() {
|
||||
return new String[]{"/liveTemplates/xsl"};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getHiddenLiveTemplateFiles() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -406,7 +406,7 @@
|
||||
<localInspection language="Python" shortName="PyFinalInspection" suppressId="PyFinal" displayName="Final classes, methods and variables" groupKey="INSP.GROUP.python" enabledByDefault="true" level="WARNING" implementationClass="com.jetbrains.python.inspections.PyFinalInspection"/>
|
||||
<localInspection language="Python" shortName="PyTypedDictInspection" suppressId="PyTypedDict" displayName="TypedDict definition and usages" groupKey="INSP.GROUP.python" enabledByDefault="true" level="WARNING" implementationClass="com.jetbrains.python.inspections.PyTypedDictInspection"/>
|
||||
|
||||
<defaultLiveTemplatesProvider implementation="com.jetbrains.python.codeInsight.liveTemplates.PyDefaultLiveTemplatesProvider"/>
|
||||
<defaultLiveTemplates file="liveTemplates/Python.xml"/>
|
||||
<liveTemplateContext implementation="com.jetbrains.python.codeInsight.liveTemplates.PythonTemplateContextType$General"/>
|
||||
<liveTemplateContext implementation="com.jetbrains.python.codeInsight.liveTemplates.PythonTemplateContextType$Class"/>
|
||||
<liveTemplateMacro implementation="com.jetbrains.python.codeInsight.liveTemplates.CollectionElementNameMacro"/>
|
||||
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.jetbrains.python.codeInsight.liveTemplates;
|
||||
|
||||
import com.intellij.codeInsight.template.impl.DefaultLiveTemplatesProvider;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public class PyDefaultLiveTemplatesProvider implements DefaultLiveTemplatesProvider {
|
||||
private static final @NonNls String[] DEFAULT_TEMPLATES = new String[]{
|
||||
"/liveTemplates/Python"
|
||||
};
|
||||
|
||||
@Override
|
||||
public String[] getDefaultLiveTemplateFiles() {
|
||||
return DEFAULT_TEMPLATES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getHiddenLiveTemplateFiles() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.codeInsight.template;
|
||||
|
||||
import com.intellij.codeInsight.template.impl.DefaultLiveTemplatesProvider;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public class XmlDefaultLiveTemplatesProvider implements DefaultLiveTemplatesProvider {
|
||||
@Override
|
||||
public String[] getDefaultLiveTemplateFiles() {
|
||||
return new String[] { "/liveTemplates/html_xml", "/liveTemplates/zen_html", "/liveTemplates/zen_xsl" };
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getHiddenLiveTemplateFiles() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user