diff --git a/java/java-psi-api/src/com/intellij/psi/compiled/ClassFileDecompilers.java b/java/java-psi-api/src/com/intellij/psi/compiled/ClassFileDecompilers.java index 4bd2973a486d..e277eb3c3409 100644 --- a/java/java-psi-api/src/com/intellij/psi/compiled/ClassFileDecompilers.java +++ b/java/java-psi-api/src/com/intellij/psi/compiled/ClassFileDecompilers.java @@ -80,7 +80,7 @@ public final class ClassFileDecompilers { return ApplicationManager.getApplication().getService(ClassFileDecompilers.class); } - public final ExtensionPointName EP_NAME = ExtensionPointName.create("com.intellij.psi.classFileDecompiler"); + public final ExtensionPointName EP_NAME = new ExtensionPointName<>("com.intellij.psi.classFileDecompiler"); private ClassFileDecompilers() { EP_NAME.addChangeListener(() -> BinaryFileTypeDecompilers.getInstance().notifyDecompilersChange(), null); diff --git a/platform/analysis-api/src/com/intellij/openapi/vfs/newvfs/RefreshQueue.java b/platform/analysis-api/src/com/intellij/openapi/vfs/newvfs/RefreshQueue.java index 4eba8b80ce7f..f0fdfcfb14b8 100644 --- a/platform/analysis-api/src/com/intellij/openapi/vfs/newvfs/RefreshQueue.java +++ b/platform/analysis-api/src/com/intellij/openapi/vfs/newvfs/RefreshQueue.java @@ -5,6 +5,7 @@ import com.intellij.openapi.application.ModalityState; import com.intellij.openapi.components.ServiceManager; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.newvfs.events.VFileEvent; +import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -51,7 +52,8 @@ public abstract class RefreshQueue { session.launch(); } + @ApiStatus.Internal public abstract void processSingleEvent(@NotNull VFileEvent event); public abstract void cancelSession(long id); -} +} \ No newline at end of file diff --git a/platform/core-api/src/com/intellij/openapi/fileEditor/FileDocumentManager.java b/platform/core-api/src/com/intellij/openapi/fileEditor/FileDocumentManager.java index b6d4ac087c7e..0c6203145732 100644 --- a/platform/core-api/src/com/intellij/openapi/fileEditor/FileDocumentManager.java +++ b/platform/core-api/src/com/intellij/openapi/fileEditor/FileDocumentManager.java @@ -27,8 +27,9 @@ public abstract class FileDocumentManager implements SavingRequestor { /** * Returns the document for the specified virtual file.

* - * Documents are cached on weak or strong references, depending on the nature of the virtual file. If the document for the given virtual file is not yet cached, - * the file's contents are read from VFS and loaded into heap memory. An appropriate encoding is used. All line separators are converted to {@code \n}.

+ * Documents are cached on weak or strong references, depending on the nature of the virtual file. If the document + * for the given virtual file is not yet cached, the file's contents are read from VFS and loaded into heap memory. + * An appropriate encoding is used. All line separators are converted to {@code \n}.

* * Should be invoked in a read action. * @@ -169,7 +170,7 @@ public abstract class FileDocumentManager implements SavingRequestor { public static final WriteAccessStatus WRITABLE = new WriteAccessStatus(true); private final boolean myWithWriteAccess; - @NotNull private final String myReadOnlyMessage; + private final @NotNull String myReadOnlyMessage; private WriteAccessStatus(boolean withWriteAccess) { myWithWriteAccess = withWriteAccess; @@ -186,4 +187,4 @@ public abstract class FileDocumentManager implements SavingRequestor { @NotNull public String getReadOnlyMessage() {return myReadOnlyMessage;} } -} +} \ No newline at end of file diff --git a/platform/core-api/src/com/intellij/openapi/fileTypes/BinaryFileDecompiler.java b/platform/core-api/src/com/intellij/openapi/fileTypes/BinaryFileDecompiler.java index 3e9b7e1472c2..2e952c74dba6 100644 --- a/platform/core-api/src/com/intellij/openapi/fileTypes/BinaryFileDecompiler.java +++ b/platform/core-api/src/com/intellij/openapi/fileTypes/BinaryFileDecompiler.java @@ -1,28 +1,12 @@ -/* - * Copyright 2000-2009 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. - */ - -/* - * @author max - */ +// Copyright 2000-2020 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.openapi.fileTypes; import com.intellij.openapi.vfs.VirtualFile; import org.jetbrains.annotations.NotNull; +/** + * @author max + */ public interface BinaryFileDecompiler { - @NotNull - CharSequence decompile(@NotNull VirtualFile file); + @NotNull CharSequence decompile(@NotNull VirtualFile file); } \ No newline at end of file diff --git a/platform/core-api/src/com/intellij/psi/stubs/BinaryFileStubBuilder.java b/platform/core-api/src/com/intellij/psi/stubs/BinaryFileStubBuilder.java index e726b6d92bac..ef1bb8e9b8ed 100644 --- a/platform/core-api/src/com/intellij/psi/stubs/BinaryFileStubBuilder.java +++ b/platform/core-api/src/com/intellij/psi/stubs/BinaryFileStubBuilder.java @@ -1,22 +1,4 @@ -/* - * Copyright 2000-2016 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. - */ - -/* - * @author max - */ +// Copyright 2000-2020 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.psi.stubs; import com.intellij.openapi.vfs.VirtualFile; @@ -26,30 +8,27 @@ import org.jetbrains.annotations.Nullable; import java.util.stream.Stream; +/** + * @author max + */ public interface BinaryFileStubBuilder { boolean acceptsFile(@NotNull VirtualFile file); - @Nullable - Stub buildStubTree(@NotNull FileContent fileContent); + @Nullable Stub buildStubTree(@NotNull FileContent fileContent); int getStubVersion(); interface CompositeBinaryFileStubBuilder extends BinaryFileStubBuilder { - @NotNull - Stream getAllSubBuilders(); + @NotNull Stream getAllSubBuilders(); - @Nullable - SubBuilder getSubBuilder(@NotNull FileContent fileContent); + @Nullable SubBuilder getSubBuilder(@NotNull FileContent fileContent); - @NotNull - String getSubBuilderVersion(@Nullable SubBuilder subBuilder); + @NotNull String getSubBuilderVersion(@Nullable SubBuilder subBuilder); - @Nullable - Stub buildStubTree(@NotNull FileContent fileContent, @Nullable SubBuilder builder); + @Nullable Stub buildStubTree(@NotNull FileContent fileContent, @Nullable SubBuilder builder); - @Nullable @Override - default Stub buildStubTree(@NotNull FileContent fileContent) { + default @Nullable Stub buildStubTree(@NotNull FileContent fileContent) { return buildStubTree(fileContent, getSubBuilder(fileContent)); } } diff --git a/platform/platform-api/resources/messages/IdeBundle.properties b/platform/platform-api/resources/messages/IdeBundle.properties index 50b238976048..924b5e164017 100644 --- a/platform/platform-api/resources/messages/IdeBundle.properties +++ b/platform/platform-api/resources/messages/IdeBundle.properties @@ -2065,7 +2065,7 @@ welcome.screen.empty.projects.create.comment= Create a new project to start from welcome.screen.empty.projects.open.comment=Open existing project from disk or version control. welcome.screen.empty.projects.more.text=More Actions -progress.title.file.system.synchronization=File System Synchronization +progress.title.file.system.synchronization=File system synchronization progress.text.processing.detected.file.changes=Processing {0} detected file {0,choice,1#change|2#changes}... popup.title.add.run.options=Add Run Options dialog.message.new.name=New {0} name: diff --git a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/FileDocumentManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/FileDocumentManagerImpl.java index 87553bfd2898..434785376914 100644 --- a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/FileDocumentManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/FileDocumentManagerImpl.java @@ -883,6 +883,7 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Safe /** @deprecated another dirty Rider hack; don't use */ @Deprecated + @SuppressWarnings("StaticNonFinalField") public static boolean ourConflictsSolverEnabled = true; protected void cacheDocument(@NotNull VirtualFile file, @NotNull Document document) { diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshSessionImpl.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshSessionImpl.java index ee8991148f52..79cfb4d00708 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshSessionImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshSessionImpl.java @@ -54,11 +54,8 @@ class RefreshSessionImpl extends RefreshSession { } private Throwable rememberStartTrace() { - if (ApplicationManager.getApplication().isUnitTestMode() && - (myIsAsync || !ApplicationManager.getApplication().isDispatchThread())) { - return new Throwable(); - } - return null; + boolean trace = ApplicationManager.getApplication().isUnitTestMode() && (myIsAsync || !ApplicationManager.getApplication().isDispatchThread()); + return trace ? new Throwable() : null; } RefreshSessionImpl(@NotNull List events) {