Skip to content

[CQ] remove (dead) empty methods #8106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions flutter-idea/src/io/flutter/editor/OutlineLocation.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,6 @@ public OutlineLocation(
this.indent = indent;
}

public void dispose() {
}

/**
* This method must be called if the location is set to update to reflect
* edits to the document.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public List<String> getArgs() {
args.add(org);
}

if (kotlin == null || Boolean.FALSE.equals(kotlin)) {
if (kotlin == null || !kotlin) {
args.add("--android-language");
args.add("java");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private void updateFlutterPluginsImpl() {
}

for (String packagePath : packagesMap.values()) {
if (packagePath == null) continue;;
if (packagePath == null) continue;
final VirtualFile libFolder = LocalFileSystem.getInstance().findFileByPath(packagePath);
if (libFolder == null) {
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@
import com.intellij.openapi.vfs.VirtualFileContentsChangedAdapter;
import com.intellij.openapi.vfs.VirtualFileManager;
import com.intellij.serviceContainer.ComponentManagerImpl;
import com.intellij.util.ReflectionUtil;
import com.intellij.util.ReflectionUtil;
import com.intellij.util.modules.CircularModuleDependenciesDetector;
import io.flutter.sdk.AbstractLibraryManager;
import io.flutter.sdk.FlutterSdkUtil;
import io.flutter.settings.FlutterSettings;
import io.flutter.utils.FlutterModuleUtils;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.file.Path;
Expand All @@ -62,6 +63,7 @@
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Function;
import java.util.stream.Collectors;

import org.jetbrains.android.facet.AndroidFacet;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -91,7 +93,7 @@ public AndroidModuleLibraryManager(@NotNull Project project) {
}

public void update() {
doGradleSync(getProject(), this::scheduleAddAndroidLibraryDeps);
doGradleSync(getProject(), androidProject -> androidProject != null ? scheduleAddAndroidLibraryDeps(androidProject) : null);
}

private Void scheduleAddAndroidLibraryDeps(@NotNull Project androidProject) {
Expand Down Expand Up @@ -198,7 +200,7 @@ private void scheduleUpdate() {
}

final Runnable runnable = this::updateAndroidLibraries;
DumbService.getInstance(getProject()).smartInvokeLater(runnable, ModalityState.NON_MODAL);
DumbService.getInstance(getProject()).smartInvokeLater(runnable, ModalityState.nonModal());
}

private void updateAndroidLibraries() {
Expand All @@ -208,7 +210,7 @@ private void updateAndroidLibraries() {
update();
}

private void doGradleSync(Project flutterProject, Function<Project, Void> callback) {
private void doGradleSync(@NotNull Project flutterProject, @NotNull Function<Project, Void> callback) {
// TODO(messick): Collect URLs for all Android modules, including those within plugins.
VirtualFile dir = flutterProject.getBaseDir().findChild("android");
if (dir == null) dir = flutterProject.getBaseDir().findChild(".android"); // For modules.
Expand All @@ -218,13 +220,6 @@ private void doGradleSync(Project flutterProject, Function<Project, Void> callba
Disposer.register(flutterProject, androidProject);

GradleSyncListener listener = new GradleSyncListener() {
public void syncTaskCreated(@NotNull Project project, @NotNull GradleSyncInvoker.Request request) {}

// TODO(messick) Remove when 3.6 is stable.
public void syncStarted(@NotNull Project project, boolean skipped, boolean sourceGenerationRequested) {}

public void setupStarted(@NotNull Project project) {}

@Override
public void syncSucceeded(@NotNull Project project) {
if (isUpdating.get()) {
Expand Down Expand Up @@ -315,8 +310,8 @@ private class EmbeddedAndroidProject extends ProjectImpl {
private Path path;

protected EmbeddedAndroidProject(@NotNull Path filePath) {
super((ComponentManagerImpl) ApplicationManager.getApplication(), filePath, TEMPLATE_PROJECT_NAME);
path = filePath;
super((ComponentManagerImpl)ApplicationManager.getApplication(), filePath, TEMPLATE_PROJECT_NAME);
path = filePath;
}

static final String TEMPLATE_PROJECT_NAME = "_android";
Expand Down
3 changes: 0 additions & 3 deletions flutter-studio/src/io/flutter/utils/AddToAppUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ public void syncFailed(@NotNull Project project, @NotNull String errorMessage) {
public void syncSkipped(@NotNull Project project) {
GradleUtils.checkDartSupport(project);
}

public void sourceGenerationFinished(@NotNull Project project) {
}
};
}

Expand Down