diff --git a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/Utils.java b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/Utils.java index b7e6a185b8b6..9af1d30c28bf 100644 --- a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/Utils.java +++ b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/Utils.java @@ -117,9 +117,7 @@ public class Utils{ actionManager, 0 ); - if (!doUpdate(group, e, presentation)) { - return; - } + if (!doUpdate(group, e, presentation)) return; if (!presentation.isVisible()) { // don't process invisible groups return; @@ -138,9 +136,7 @@ public class Utils{ e1.setInjectedContext(child.isInInjectedContext()); if (transparentOnly && child.isTransparentUpdate() || !transparentOnly) { - if (!doUpdate(child, e1, presentation)) { - continue; - } + if (!doUpdate(child, e1, presentation)) continue; } if (!presentation.isVisible() || (!presentation.isEnabled() && hideDisabled)) { // don't create invisible items in the menu @@ -180,7 +176,6 @@ public class Utils{ list.add(child); } } - int i = 1; } // returns false if exception was thrown and handled diff --git a/python/openapi/src/com/jetbrains/python/templateLanguages/PythonTemplateLanguage.java b/python/openapi/src/com/jetbrains/python/templateLanguages/PythonTemplateLanguage.java index 64c867f6961f..28a7e082ec65 100644 --- a/python/openapi/src/com/jetbrains/python/templateLanguages/PythonTemplateLanguage.java +++ b/python/openapi/src/com/jetbrains/python/templateLanguages/PythonTemplateLanguage.java @@ -1,23 +1,22 @@ package com.jetbrains.python.templateLanguages; import com.intellij.lang.Language; +import com.intellij.openapi.module.Module; import com.intellij.psi.templateLanguages.TemplateLanguage; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; /** - * TODO: Make this class implemeent {@link com.intellij.lang.html.HtmlCompatibleLanguage} to prevent copy/paste by fixing dependencies * Python template language - * * @author Ilya.Kazakevich */ public abstract class PythonTemplateLanguage extends Language implements TemplateLanguage { protected PythonTemplateLanguage(@Nullable final Language baseLanguage, - @NotNull @NonNls final String ID, - @NotNull @NonNls final String... mimeTypes) { + @NotNull @NonNls final String ID, + @NotNull @NonNls final String... mimeTypes) { super(baseLanguage, ID, mimeTypes); } diff --git a/xml/impl/src/com/intellij/ide/browsers/impl/WebBrowserServiceImpl.java b/xml/impl/src/com/intellij/ide/browsers/impl/WebBrowserServiceImpl.java index 46571e865ce8..c85ceea8b2d4 100644 --- a/xml/impl/src/com/intellij/ide/browsers/impl/WebBrowserServiceImpl.java +++ b/xml/impl/src/com/intellij/ide/browsers/impl/WebBrowserServiceImpl.java @@ -20,7 +20,6 @@ import com.intellij.ide.browsers.WebBrowserService; import com.intellij.ide.browsers.WebBrowserUrlProvider; import com.intellij.lang.Language; import com.intellij.lang.html.HTMLLanguage; -import com.intellij.lang.html.HtmlCompatibleLanguage; import com.intellij.lang.xhtml.XHTMLLanguage; import com.intellij.lang.xml.XMLLanguage; import com.intellij.openapi.project.DumbService; @@ -39,7 +38,7 @@ import java.util.Collections; public class WebBrowserServiceImpl extends WebBrowserService { public static boolean isHtmlOrXmlFile(@NotNull Language language) { - return language instanceof HtmlCompatibleLanguage || language == HTMLLanguage.INSTANCE || language == XHTMLLanguage.INSTANCE || language == XMLLanguage.INSTANCE; + return language == HTMLLanguage.INSTANCE || language == XHTMLLanguage.INSTANCE || language == XMLLanguage.INSTANCE; } @NotNull diff --git a/xml/xml-psi-api/src/com/intellij/lang/html/HTMLLanguage.java b/xml/xml-psi-api/src/com/intellij/lang/html/HTMLLanguage.java index 4df6a9be82a7..b401e7a65496 100644 --- a/xml/xml-psi-api/src/com/intellij/lang/html/HTMLLanguage.java +++ b/xml/xml-psi-api/src/com/intellij/lang/html/HTMLLanguage.java @@ -20,7 +20,7 @@ import com.intellij.lang.xml.XMLLanguage; /** * @author max */ -public class HTMLLanguage extends XMLLanguage implements HtmlCompatibleLanguage { +public class HTMLLanguage extends XMLLanguage { public static final HTMLLanguage INSTANCE = new HTMLLanguage(); diff --git a/xml/xml-psi-api/src/com/intellij/lang/html/HtmlCompatibleLanguage.java b/xml/xml-psi-api/src/com/intellij/lang/html/HtmlCompatibleLanguage.java deleted file mode 100644 index 77aaf44a1b98..000000000000 --- a/xml/xml-psi-api/src/com/intellij/lang/html/HtmlCompatibleLanguage.java +++ /dev/null @@ -1,23 +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.lang.html; - -/** - * Language that is based on HTML (like some template languages) - * @author Ilya.Kazakevich - */ -public interface HtmlCompatibleLanguage { -}