mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
Zero-tolerance warnings fixed
GitOrigin-RevId: c663e0eeb78e4cabd6400d7ed26a5c7f5f215f67
This commit is contained in:
committed by
intellij-monorepo-bot
parent
969a501efb
commit
6f1d4a96a4
@@ -588,7 +588,7 @@ public class GeneratedParserUtilBase {
|
||||
if (latestDoneMarker != null &&
|
||||
frame.position >= latestDoneMarker.getStartIndex() &&
|
||||
frame.position <= latestDoneMarker.getEndIndex()) {
|
||||
extend_marker_impl((PsiBuilder.Marker)latestDoneMarker);
|
||||
extend_marker_impl(latestDoneMarker);
|
||||
}
|
||||
state.suppressErrors = false;
|
||||
if (errorReported || result) {
|
||||
@@ -644,7 +644,7 @@ public class GeneratedParserUtilBase {
|
||||
state.typeExtends(last.getTokenType(), elementType) &&
|
||||
wasAutoSkipped(builder, builder.rawTokenIndex() - last.getEndIndex())) {
|
||||
elementType = last.getTokenType();
|
||||
((PsiBuilder.Marker)last).drop();
|
||||
last.drop();
|
||||
}
|
||||
}
|
||||
if ((frame.modifiers & _UPPER_) != 0) {
|
||||
@@ -792,7 +792,7 @@ public class GeneratedParserUtilBase {
|
||||
if (latestDoneMarker != null &&
|
||||
frame.position >= latestDoneMarker.getStartIndex() &&
|
||||
frame.position <= latestDoneMarker.getEndIndex()) {
|
||||
extend_marker_impl((PsiBuilder.Marker)latestDoneMarker);
|
||||
extend_marker_impl(latestDoneMarker);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -191,7 +191,7 @@ public interface SyntaxTreeBuilder {
|
||||
|
||||
default int getStartIndex() {
|
||||
throw new UnsupportedOperationException("not implemented for this kind of markers");
|
||||
};
|
||||
}
|
||||
|
||||
default int getEndIndex() {
|
||||
throw new UnsupportedOperationException("not implemented for this kind of markers");
|
||||
@@ -200,7 +200,7 @@ public interface SyntaxTreeBuilder {
|
||||
@NlsContexts.DetailedDescription
|
||||
@Nullable default String getErrorMessage() {
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
default boolean isCollapsed() {
|
||||
return false;
|
||||
|
||||
@@ -57,7 +57,7 @@ public final class ExternalSystemProcessingManager implements ExternalSystemTask
|
||||
|
||||
public ExternalSystemProcessingManager() {
|
||||
Application app = ApplicationManager.getApplication();
|
||||
myFacadeManager = app.getService(ExternalSystemFacadeManager.class);
|
||||
myFacadeManager = ExternalSystemFacadeManager.getInstance();
|
||||
if (app.isUnitTestMode()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.openapi.externalSystem.service.project;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.externalSystem.ExternalSystemManager;
|
||||
import com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager;
|
||||
import com.intellij.openapi.externalSystem.settings.AbstractExternalSystemSettings;
|
||||
@@ -15,7 +14,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
public final class ProjectRenameAware {
|
||||
public static void beAware(@NotNull Project project) {
|
||||
final ExternalSystemFacadeManager facadeManager = ApplicationManager.getApplication().getService(ExternalSystemFacadeManager.class);
|
||||
final ExternalSystemFacadeManager facadeManager = ExternalSystemFacadeManager.getInstance();
|
||||
for (ExternalSystemManager<?, ?, ?, ?, ?> manager : ExternalSystemApiUtil.getAllManagers()) {
|
||||
AbstractExternalSystemSettings settings = manager.getSettingsProvider().fun(project);
|
||||
//noinspection unchecked
|
||||
|
||||
@@ -374,10 +374,8 @@ final class PassExecutorService implements Disposable {
|
||||
@Override
|
||||
public void run() {
|
||||
((ApplicationImpl)ApplicationManager.getApplication()).executeByImpatientReader(() -> {
|
||||
try {
|
||||
try (AccessToken ignored = ThreadContext.installThreadContext(myContext, true)) {
|
||||
((FileTypeManagerImpl)FileTypeManager.getInstance()).cacheFileTypesInside(() -> doRun());
|
||||
};
|
||||
try (AccessToken ignored = ThreadContext.installThreadContext(myContext, true)) {
|
||||
((FileTypeManagerImpl)FileTypeManager.getInstance()).cacheFileTypesInside(() -> doRun());
|
||||
}
|
||||
catch (ApplicationUtil.CannotRunReadActionException e) {
|
||||
myUpdateProgress.cancel();
|
||||
|
||||
@@ -519,7 +519,7 @@ public final class SearchEverywhereUI extends BigPopupUI implements DataProvider
|
||||
SearchEverywhereFoundElementInfo info = ContainerUtil.getOnlyItem(selection);
|
||||
return info == null ? null : info.getElement();
|
||||
}
|
||||
if (PlatformCoreDataKeys.SELECTED_ITEMS.is(dataId)) { ;
|
||||
if (PlatformCoreDataKeys.SELECTED_ITEMS.is(dataId)) {
|
||||
if (selection.isEmpty()) return null;
|
||||
return ContainerUtil.map2Array(selection, Object.class, SearchEverywhereFoundElementInfo::getElement);
|
||||
}
|
||||
|
||||
@@ -326,6 +326,6 @@ class UnindexedFilesScannerExecutorImpl(private val project: Project, cs: Corout
|
||||
private val LOG = Logger.getInstance(UnindexedFilesScannerExecutor::class.java)
|
||||
|
||||
@JvmStatic
|
||||
fun getInstance(project: Project): UnindexedFilesScannerExecutorImpl = project.service<UnindexedFilesScannerExecutor>() as UnindexedFilesScannerExecutorImpl
|
||||
fun getInstance(project: Project): UnindexedFilesScannerExecutorImpl = UnindexedFilesScannerExecutor.getInstance(project) as UnindexedFilesScannerExecutorImpl
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,8 +120,7 @@ public class ConsentSettingsUi extends JPanel implements ConfigurableUi<List<Con
|
||||
if (dataSharingDisabledExternally || dataSharingEnabledByFreeLicense) {
|
||||
stateSupplier = new ConsentStateSupplier(consent, () -> consent.isAccepted());
|
||||
cb.setEnabled(false);
|
||||
if (dataSharingDisabledExternally) cb.setSelected(false);
|
||||
else if (dataSharingEnabledByFreeLicense) cb.setSelected(true);
|
||||
cb.setSelected(!dataSharingDisabledExternally);
|
||||
}
|
||||
else {
|
||||
stateSupplier = new ConsentStateSupplier(consent, () -> cb.isSelected());
|
||||
|
||||
@@ -1690,7 +1690,7 @@ public class AbstractPopup implements JBPopup, ScreenAreaConsumer, AlignedPopup
|
||||
if (size == null) return;
|
||||
|
||||
final Window window = getContentWindow(myContent);
|
||||
if (window != null && size != null) {
|
||||
if (window != null) {
|
||||
window.setSize(size);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user