chore(BaseLangDoc): add @NotNull @Nullable etc.

This commit is contained in:
林万程
2024-01-26 20:03:09 +08:00
parent 25caa79a68
commit 8273d15feb
6 changed files with 9 additions and 7 deletions

View File

@@ -82,7 +82,7 @@ tasks.withType(Javadoc) {
patchPluginXml {
// The performance of 2019.3 has been greatly improved.
// change plugins without restarting the IDE in 2020.1.
// 2020.2 JCEF, 2022.3 JDK17, 2023.3 AI
// 2020.2 JCEF, 2022.2 JDK17 java2d perf improved, 2023.3 AI
sinceBuild = '201.1'
untilBuild = ''
changeNotes = """

View File

@@ -98,7 +98,7 @@ public class AnnoDoc {
}
@Nullable
private static String annoDocValue(PsiAnnotationMemberValue value) {
private static String annoDocValue(@Nullable PsiAnnotationMemberValue value) {
if (value == null) {
return null;
}

View File

@@ -91,7 +91,7 @@ public class LineEnd extends EditorLinePainter {
}
@NotNull
public static LineExtensionInfo lineExtText(@NotNull LineInfo info, String text) {
public static LineExtensionInfo lineExtText(@NotNull LineInfo info, @NotNull String text) {
@NotNull TextAttributes textAttr = info.file.getFileType().equals(JsonFileType.INSTANCE)
|| info.file.getFileType().equals(Json5FileType.INSTANCE)
? info.appSettings.lineEndJsonTextAttr

View File

@@ -65,7 +65,7 @@ public class LineEndCacheUtils {
private static volatile boolean isRun = false;
private static void checkScheduleAndInit(Project project) {
private static void checkScheduleAndInit(@NotNull Project project) {
if (!isRun) {
if (DumbService.isDumb(project)) {
return;
@@ -119,7 +119,7 @@ public class LineEndCacheUtils {
if (list != null) {
list.add(lineExt);
} else {
ArrayList<LineExtensionInfo> lineExtList = new ArrayList<>(1);
@NotNull ArrayList<LineExtensionInfo> lineExtList = new ArrayList<>(1);
lineExtList.add(lineExt);
lineCache.map.put(info.text, lineExtList);
}

View File

@@ -40,7 +40,7 @@ public class TreeCacheUtils {
private static volatile boolean isRun = false;
private static void checkScheduleAndInit(Project project) {
private static void checkScheduleAndInit(@NotNull Project project) {
if (!isRun) {
if (DumbService.isDumb(project)) {
return;

View File

@@ -10,6 +10,7 @@ import javax.swing.*;
public class ProjectSettingsComponent extends AbstractSettingsComponent {
@NotNull
private final JBScrollPane myMainPanel;
private final JBCheckBox globalFilterEffective = new JBCheckBox(ShowBundle.message("global.settings.effective"));
private final JBCheckBox projectFilterEffective = new JBCheckBox(ShowBundle.message("project.settings.effective"));
@@ -25,11 +26,12 @@ public class ProjectSettingsComponent extends AbstractSettingsComponent {
.addComponent(commonPanel(), 1)
.addComponentFillVertically(new JPanel(), 0)
.getPanel();
JBScrollPane scrollPane = new JBScrollPane(panel);
@NotNull JBScrollPane scrollPane = new JBScrollPane(panel);
scrollPane.setBorder(null);
myMainPanel = scrollPane;
}
@NotNull
public JBScrollPane getPanel() {
return myMainPanel;
}