Skip to content

Remove performance view for newer Flutter SDK versions #7637

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
Sep 5, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowFactory;
import com.intellij.openapi.wm.ToolWindowManager;
import icons.FlutterIcons;
import io.flutter.utils.UIUtils;
import io.flutter.sdk.FlutterSdk;
import io.flutter.sdk.FlutterSdkVersion;
import io.flutter.utils.ViewListener;
import io.flutter.view.FlutterViewMessages;
import kotlin.coroutines.Continuation;
import org.jetbrains.annotations.NotNull;

public class FlutterPerformanceViewFactory implements ToolWindowFactory, DumbAware {
Expand Down Expand Up @@ -62,4 +63,11 @@ public FlutterPerformanceViewListener(@NotNull Project project) {
super(project, FlutterPerformanceView.TOOL_WINDOW_ID, TOOL_WINDOW_VISIBLE_PROPERTY);
}
}

@Override
public Object isApplicableAsync(@NotNull Project project, @NotNull Continuation<? super Boolean> $completion) {
FlutterSdk sdk = FlutterSdk.getFlutterSdk(project);
FlutterSdkVersion sdkVersion = sdk == null ? null : sdk.getVersion();
return sdkVersion == null || !sdkVersion.canUseDeepLinksTool();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, how is the deep links tool related to the performance view?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh thanks for catching! This is a copy error; I meant this to be the opposite of the RemainingDevToolsViewFactory check.

}
}