Skip to content
Closed
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
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# found in the LICENSE file.
#

ideaVersion=2025.1.3.4
dartPluginVersion= 251.27623.5
ideaVersion=2025.2.1.3
dartPluginVersion= 252.25557.23
sinceBuild=243
untilBuild=253.*
javaVersion=21
Expand Down
2 changes: 1 addition & 1 deletion src/io/flutter/FlutterErrorReportSubmitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public String getReportActionText() {
}

//@Override
public boolean submit(@NotNull IdeaLoggingEvent @NotNull [] events,
public boolean submit(@NotNull IdeaLoggingEvent[] events,
@Nullable String additionalInfo,
@NotNull Component parentComponent,
@NotNull Consumer<? super SubmittedReportInfo> consumer) {
Expand Down
2 changes: 1 addition & 1 deletion src/io/flutter/actions/AttachDebuggerAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public static RunConfiguration findRunConfig(@NotNull Project project) {
return count == 1 ? sdkConfig : null;
}

private static void onAttachTermination(@NotNull Project project, @NotNull Consumer<@NotNull Project> runner) {
private static void onAttachTermination(@NotNull Project project, @NotNull Consumer<Project> runner) {
final MessageBusConnection connection = project.getMessageBus().connect();

// Need an ExecutionListener to clean up project-scoped state when the Stop button is clicked.
Expand Down
2 changes: 1 addition & 1 deletion src/io/flutter/actions/FlutterRetargetAppAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public abstract class FlutterRetargetAppAction extends DumbAwareAction {
FlutterRetargetAppAction(@NotNull String actionId,
@Nullable String text,
@Nullable String description,
@SuppressWarnings("SameParameterValue") @NotNull String @NotNull ... places) {
@SuppressWarnings("SameParameterValue") @NotNull String ... places) {
super(text, description, null);
myActionId = actionId;
myPlaces.addAll(Arrays.asList(places));
Expand Down
4 changes: 2 additions & 2 deletions src/io/flutter/bazel/WorkspaceCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class WorkspaceCache {

private boolean refreshScheduled = false;

private final @NotNull Set<@NotNull Runnable> subscribers = new LinkedHashSet<>();
private final @NotNull Set<Runnable> subscribers = new LinkedHashSet<>();

private WorkspaceCache(@NotNull final Project project) {
this.project = project;
Expand Down Expand Up @@ -157,7 +157,7 @@ private void refresh() {
notifyListeners();
}

private Set<@NotNull Runnable> getSubscribers() {
private Set<Runnable> getSubscribers() {
synchronized (subscribers) {
return ImmutableSet.copyOf(subscribers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/io/flutter/dart/FlutterRequestUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private FlutterRequestUtilities() {
* </pre>
*/
public static JsonObject generateAnalysisSetSubscriptions(@NotNull String id,
Map<String, @NotNull List<String>> subscriptions) {
Map<String, List<String>> subscriptions) {
final JsonObject params = new JsonObject();
params.add(SUBSCRIPTIONS, buildJsonElement(subscriptions));
return buildJsonObjectRequest(id, METHOD_FLUTTER_SET_SUBSCRIPTIONS, params);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
public final class FlutterPubspecNotificationProvider implements EditorNotificationProvider {
@Nullable
@Override
public Function<? super @NotNull FileEditor, ? extends @Nullable JComponent> collectNotificationData(@NotNull Project project,
public Function<? super FileEditor, ? extends JComponent> collectNotificationData(@NotNull Project project,
@NotNull VirtualFile file) {
// We only show this notification inside of local pubspec files.
if (!PubRoot.isPubspec(file) || !file.isInLocalFileSystem()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public NativeEditorNotificationProvider(@NotNull Project project) {
}

@Override
public @Nullable Function<? super @NotNull FileEditor, ? extends @Nullable JComponent> collectNotificationData(@NotNull Project project,
public @Nullable Function<? super FileEditor, ? extends JComponent> collectNotificationData(@NotNull Project project,
@NotNull VirtualFile file) {
if (!file.isInLocalFileSystem() || !showNotification) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public SdkConfigurationNotificationProvider(@NotNull Project project) {
}

@Override
public @Nullable Function<? super @NotNull FileEditor, ? extends @Nullable JComponent> collectNotificationData(@NotNull Project project,
public @Nullable Function<? super FileEditor, ? extends JComponent> collectNotificationData(@NotNull Project project,
@NotNull VirtualFile file) {
// If this is a Bazel configured Flutter project, exit immediately, neither of the notifications should be shown for this project type.
if (FlutterModuleUtils.isFlutterBazelProject(project)) return null;
Expand Down
4 changes: 2 additions & 2 deletions src/io/flutter/jxbrowser/JxBrowserManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public void setUp(@NotNull String projectName) {
downloadJxBrowser(fileNames);
}

protected void downloadJxBrowser(@NotNull String @NotNull [] fileNames) {
protected void downloadJxBrowser(@NotNull String[] fileNames) {
// The FileDownloader API is used by other plugins - e.g.
// https://github.com/JetBrains/intellij-community/blob/b09f8151e0d189d70363266c3bb6edb5f6bfeca4/plugins/markdown/src/org/intellij/plugins/markdown/ui/preview/javafx/JavaFXInstallator.java#L48
final List<FileDownloader> fileDownloaders = new ArrayList<>();
Expand Down Expand Up @@ -309,7 +309,7 @@ public void run(@NotNull ProgressIndicator indicator) {
}
}

private void loadClasses(@NotNull String @NotNull [] fileNames) {
private void loadClasses(@NotNull String[] fileNames) {
final List<Path> paths = new ArrayList<>();
final ClassLoader current = Thread.currentThread().getContextClassLoader();
try {
Expand Down
2 changes: 1 addition & 1 deletion src/io/flutter/project/FlutterIconProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public Icon getIcon(@NotNull PsiElement element, @IconFlags int flags) {
}

@NotNull
private static Icon overlayIcons(@NotNull Icon @NotNull ... icons) {
private static Icon overlayIcons(@NotNull Icon ... icons) {
final LayeredIcon result = new LayeredIcon(icons.length);

for (int layer = 0; layer < icons.length; layer++) {
Expand Down
2 changes: 1 addition & 1 deletion src/io/flutter/pub/PubRoot.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public String getRelativePath(@NotNull VirtualFile file) {
return path.substring(root.length() + 1);
}

private static final String @NotNull [] TEST_DIRS = new String[]{ // TODO 2022.1
private static final String [] TEST_DIRS = new String[]{ // TODO 2022.1
"/test/",
"/integration_test/",
"/test_driver/",
Expand Down
2 changes: 1 addition & 1 deletion src/io/flutter/pub/PubRootCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public PubRoot getRoot(@Nullable VirtualFile file) {
}

@NotNull
public List<@NotNull PubRoot> getRoots(@NotNull Module module) {
public List<PubRoot> getRoots(@NotNull Module module) {
final List<PubRoot> result = new ArrayList<>();

for (VirtualFile dir : OpenApiUtils.getContentRoots(module)) {
Expand Down
4 changes: 2 additions & 2 deletions src/io/flutter/pub/PubRoots.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private PubRoots() {
* (Based on the filesystem cache; doesn't refresh anything.)
*/
@NotNull
public static List<@NotNull PubRoot> forModule(@NotNull Module module) {
public static List<PubRoot> forModule(@NotNull Module module) {
final List<PubRoot> result = new ArrayList<>();
if (module.isDisposed()) return result;

Expand All @@ -47,7 +47,7 @@ private PubRoots() {
* (Based on the filesystem cache; doesn't refresh anything.)
*/
@NotNull
public static List<@NotNull PubRoot> forProject(@NotNull Project project) {
public static List<PubRoot> forProject(@NotNull Project project) {
final List<PubRoot> result = new ArrayList<>();
if (project.isDisposed()) return result;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public FlutterSampleNotificationProvider(@NotNull Project project) {

@Nullable
@Override
public Function<? super @NotNull FileEditor, ? extends @Nullable JComponent> collectNotificationData(@NotNull Project project,
public Function<? super FileEditor, ? extends JComponent> collectNotificationData(@NotNull Project project,
@NotNull VirtualFile file) {
final FlutterSdk sdk = FlutterSdk.getFlutterSdk(project);
if (sdk == null) {
Expand Down
4 changes: 2 additions & 2 deletions src/io/flutter/sdk/AndroidEmulatorManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void removeListener(@NotNull Runnable callback) {

private CompletableFuture<List<AndroidEmulator>> inProgressRefresh;

public CompletableFuture<@NotNull List<AndroidEmulator>> refresh() {
public CompletableFuture<List<AndroidEmulator>> refresh() {
// We don't need to refresh if one is in progress.
synchronized (this) {
if (inProgressRefresh != null) {
Expand Down Expand Up @@ -98,7 +98,7 @@ public void removeListener(@NotNull Runnable callback) {
return future;
}

public @NotNull List<@NotNull AndroidEmulator> getCachedEmulators() {
public @NotNull List<AndroidEmulator> getCachedEmulators() {
return cachedEmulators;
}

Expand Down
2 changes: 1 addition & 1 deletion src/io/flutter/sdk/FlutterPluginsLibraryManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private void updateFlutterPluginsImpl() {
.submit(AppExecutorUtil.getAppExecutorService());
}

private static @NotNull Set<@NotNull String> getFlutterPluginPaths(@NotNull List<@NotNull PubRoot> roots) {
private static @NotNull Set<String> getFlutterPluginPaths(@NotNull List<PubRoot> roots) {
final Set<String> paths = new HashSet<>();

for (PubRoot pubRoot : roots) {
Expand Down
2 changes: 1 addition & 1 deletion src/io/flutter/sdk/FlutterSdk.java
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ public FlutterSdkChannel queryFlutterChannel(boolean useCachedValue) {

@NotNull
@NonNls
private static final String @NotNull [] PLATFORMS =
private static final String[] PLATFORMS =
new String[]{"enable-android", "enable-ios", "enable-web", "enable-linux-desktop", "enable-macos-desktop", "enable-windows-desktop"};

@NotNull
Expand Down
12 changes: 8 additions & 4 deletions src/io/flutter/utils/AndroidLocationProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ public class AndroidLocationProvider implements BuildModelContext.ResolvedConfig
@Nullable
@Override
public VirtualFile getGradleBuildFile(@NotNull Module module) {
GradleModuleModel moduleModel = GradleProjectSystemUtil.getGradleModuleModel(module);
if (moduleModel != null) {
return moduleModel.getBuildFile();
}
// TODO(helin24): Delete this code (and potentially related code) if commenting out has no negative impact on Android editing.
// I believe this is to make gradle files show up nicely when a flutter project is opened, but this functionality already does not work
// and is not needed if we are recommending users edit Android files in a separate project window.

//GradleModuleModel moduleModel = GradleProjectSystemUtil.getGradleModuleModel(module);
//if (moduleModel != null) {
// return moduleModel.getBuildFile();
//}
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion src/io/flutter/utils/FlutterModuleUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ private static VirtualFile findPreferedXcodeMetadataFile(@Nullable VirtualFile i
}


public static @NotNull Module @NotNull [] getModules(@NotNull Project project) {
public static @NotNull Module[] getModules(@NotNull Project project) {
// A disposed project has no modules.
if (project.isDisposed()) return Module.EMPTY_ARRAY;

Expand Down
4 changes: 2 additions & 2 deletions src/io/flutter/utils/OpenApiUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

public class OpenApiUtils {

public static @NotNull VirtualFile @NotNull [] getContentRoots(@NotNull Module module) {
public static @NotNull VirtualFile[] getContentRoots(@NotNull Module module) {
var moduleRootManager = ModuleRootManager.getInstance(module);
return moduleRootManager == null ? VirtualFile.EMPTY_ARRAY : moduleRootManager.getContentRoots();
}
Expand All @@ -33,7 +33,7 @@ public class OpenApiUtils {
return registrar == null ? null : registrar.getLibraryTable(project);
}

public static @NotNull Module @NotNull [] getModules(@NotNull Project project) {
public static @NotNull Module[] getModules(@NotNull Project project) {
var modules = ModuleManager.getInstance(project).getModules();
return modules == null ? Module.EMPTY_ARRAY : modules;
}
Expand Down
2 changes: 1 addition & 1 deletion src/io/flutter/view/EmbeddedBrowser.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static public class BrowserTab {

public static final String ANALYTICS_CATEGORY = "embedded-browser";

protected final Map<@NotNull String, Map<@NotNull String, @NotNull BrowserTab>> windows = new HashMap<>();
protected final Map<String, Map<String, BrowserTab>> windows = new HashMap<>();

public abstract @NotNull Logger logger();

Expand Down
2 changes: 1 addition & 1 deletion src/io/flutter/vmService/DartVmServiceDebugProcess.java
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public XDebuggerEditorsProvider getEditorsProvider() {

@Override
@NotNull
public XBreakpointHandler<?> @NotNull [] getBreakpointHandlers() {
public XBreakpointHandler<?> [] getBreakpointHandlers() {
return myBreakpointHandlers;
}

Expand Down
4 changes: 2 additions & 2 deletions src/io/flutter/vmService/frame/DartVmServiceValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ private void addListChildren(int offset, @NotNull XCompositeNode node, @NotNull

if (instance.getBytes() != null) { // true for typed data
//noinspection ConstantConditions
byte @NotNull [] bytes = Base64.getDecoder().decode(instance.getBytes());
byte[] bytes = Base64.getDecoder().decode(instance.getBytes());
TypedDataList data = getTypedDataList(bytes);
XValueChildrenList childrenList = new XValueChildrenList(data.size());
for (int i = 0; i < data.size(); i++) {
Expand Down Expand Up @@ -469,7 +469,7 @@ private InstanceRef instanceRefForString(@NotNull String value) {
return new InstanceRef(ref);
}

private TypedDataList getTypedDataList(byte @NotNull [] bytes) {
private TypedDataList getTypedDataList(byte[] bytes) {
ByteBuffer buffer = ByteBuffer.wrap(bytes);
//noinspection ConstantConditions
return switch (myInstanceRef.getKind()) {
Expand Down