mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Use bounded wildcards in API in static methods to make it more conventional and flexible
This commit is contained in:
@@ -118,7 +118,7 @@ public class BuildArtifactAction extends DumbAwareAction {
|
||||
popup.showCenteredInCurrentWindow(project);
|
||||
}
|
||||
|
||||
private static void doBuild(@NotNull Project project, final @NotNull List<ArtifactPopupItem> items, boolean rebuild) {
|
||||
private static void doBuild(@NotNull Project project, final @NotNull List<? extends ArtifactPopupItem> items, boolean rebuild) {
|
||||
final Artifact[] artifacts = getArtifacts(items, project);
|
||||
if (rebuild) {
|
||||
ProjectTaskManager.getInstance(project).rebuild(artifacts);
|
||||
@@ -128,7 +128,7 @@ public class BuildArtifactAction extends DumbAwareAction {
|
||||
}
|
||||
}
|
||||
|
||||
private static Artifact[] getArtifacts(final List<ArtifactPopupItem> items, final Project project) {
|
||||
private static Artifact[] getArtifacts(final List<? extends ArtifactPopupItem> items, final Project project) {
|
||||
Set<Artifact> artifacts = new LinkedHashSet<>();
|
||||
for (ArtifactPopupItem item : items) {
|
||||
artifacts.addAll(item.getArtifacts(project));
|
||||
|
||||
+2
-2
@@ -66,12 +66,12 @@ public class PackageFileWorker {
|
||||
myPackIntoArchives = packIntoArchives;
|
||||
}
|
||||
|
||||
public static void startPackagingFiles(Project project, List<VirtualFile> files, Artifact[] artifacts, final @NotNull Runnable onFinishedInAwt) {
|
||||
public static void startPackagingFiles(Project project, List<? extends VirtualFile> files, Artifact[] artifacts, final @NotNull Runnable onFinishedInAwt) {
|
||||
startPackagingFiles(project, files, artifacts, true).doWhenProcessed(
|
||||
() -> ApplicationManager.getApplication().invokeLater(onFinishedInAwt));
|
||||
}
|
||||
|
||||
public static ActionCallback startPackagingFiles(final Project project, final List<VirtualFile> files,
|
||||
public static ActionCallback startPackagingFiles(final Project project, final List<? extends VirtualFile> files,
|
||||
final Artifact[] artifacts, final boolean packIntoArchives) {
|
||||
final ActionCallback callback = new ActionCallback();
|
||||
ProgressManager.getInstance().run(new Task.Backgroundable(project, "Packaging Files") {
|
||||
|
||||
Reference in New Issue
Block a user