diff --git a/java/java-impl/src/com/intellij/openapi/keymap/JBuilderKeymapProvider.java b/java/java-impl/src/com/intellij/openapi/keymap/JBuilderKeymapProvider.java index 5386c7d2e1f0..430742591302 100644 --- a/java/java-impl/src/com/intellij/openapi/keymap/JBuilderKeymapProvider.java +++ b/java/java-impl/src/com/intellij/openapi/keymap/JBuilderKeymapProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2017 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. @@ -16,6 +16,7 @@ package com.intellij.openapi.keymap; import com.intellij.openapi.keymap.impl.BundledKeymapProvider; +import org.jetbrains.annotations.NotNull; import java.util.Collections; import java.util.List; @@ -24,6 +25,7 @@ import java.util.List; * @author yole */ public class JBuilderKeymapProvider implements BundledKeymapProvider { + @NotNull @Override public List getKeymapFileNames() { return Collections.singletonList("JBuilder.xml"); diff --git a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/BundledKeymapProvider.java b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/BundledKeymapProvider.java index 2b205421b84a..9ed011b207aa 100644 --- a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/BundledKeymapProvider.java +++ b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/BundledKeymapProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2017 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. @@ -16,6 +16,7 @@ package com.intellij.openapi.keymap.impl; import com.intellij.openapi.extensions.ExtensionPointName; +import org.jetbrains.annotations.NotNull; import java.util.List; @@ -26,5 +27,6 @@ import java.util.List; public interface BundledKeymapProvider { ExtensionPointName EP_NAME = ExtensionPointName.create("com.intellij.bundledKeymapProvider"); + @NotNull List getKeymapFileNames(); } diff --git a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/DefaultBundledKeymaps.java b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/DefaultBundledKeymaps.java index a27961487b01..aa968278f741 100644 --- a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/DefaultBundledKeymaps.java +++ b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/DefaultBundledKeymaps.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2017 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. @@ -19,10 +19,13 @@ */ package com.intellij.openapi.keymap.impl; +import org.jetbrains.annotations.NotNull; + import java.util.Arrays; import java.util.List; public class DefaultBundledKeymaps implements BundledKeymapProvider { + @NotNull @Override public List getKeymapFileNames() { return Arrays.asList( diff --git a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/DefaultKeymap.kt b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/DefaultKeymap.kt index 4d6a2f53c087..d3862866ed4c 100644 --- a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/DefaultKeymap.kt +++ b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/DefaultKeymap.kt @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2017 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. @@ -65,7 +65,9 @@ open class DefaultKeymap { LOG.catchAndLog { loadKeymapsFromElement(object: SchemeDataHolder { - override fun read() = JDOMUtil.loadResourceDocument(URL("file:///keymaps/$key")).rootElement + override fun read(): Element { + return JDOMUtil.loadResourceDocument(URL("file:///keymaps/$key")).rootElement + } override fun updateDigest(scheme: KeymapImpl) { } diff --git a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/GenericKeymapManager.java b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/GenericKeymapManager.java index 4106fb7e86ee..e67b26440d09 100644 --- a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/GenericKeymapManager.java +++ b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/GenericKeymapManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2017 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. @@ -20,6 +20,7 @@ import com.intellij.openapi.util.SystemInfo; import org.jetbrains.annotations.NotNull; public class GenericKeymapManager extends DefaultKeymap { + @NotNull @Override public String getDefaultKeymapName() { if (SystemInfo.isMac) { @@ -33,6 +34,7 @@ public class GenericKeymapManager extends DefaultKeymap { } } + @NotNull @Override public String getKeymapPresentableName(@NotNull KeymapImpl keymap) { final String name = keymap.getName();