add NotNull

This commit is contained in:
Vladimir Krivosheev
2017-02-01 15:07:44 +01:00
parent aae3af98b0
commit e1766bf61e
5 changed files with 17 additions and 6 deletions
@@ -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<String> getKeymapFileNames() {
return Collections.singletonList("JBuilder.xml");
@@ -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<BundledKeymapProvider> EP_NAME = ExtensionPointName.create("com.intellij.bundledKeymapProvider");
@NotNull
List<String> getKeymapFileNames();
}
@@ -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<String> getKeymapFileNames() {
return Arrays.asList(
@@ -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<KeymapImpl> {
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) {
}
@@ -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();