-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGraphComposeDevTool.java
More file actions
679 lines (587 loc) · 25.5 KB
/
GraphComposeDevTool.java
File metadata and controls
679 lines (587 loc) · 25.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
package com.demcha.compose.devtool;
import java.awt.Desktop;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.beans.binding.Bindings;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.Separator;
import javafx.scene.control.SplitPane;
import javafx.scene.control.TextArea;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.stage.Stage;
import javafx.embed.swing.SwingFXUtils;
import org.apache.pdfbox.pdmodel.PDDocument;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.nio.file.Path;
import java.util.ArrayDeque;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
/**
* Watches the source tree, recompiles the preview provider on save, and renders
* the first page directly from an in-memory {@link PDDocument}.
*/
public final class GraphComposeDevTool extends Application {
private static final double WINDOW_WIDTH = 1480;
private static final double WINDOW_HEIGHT = 940;
private static final double PREVIEW_CANVAS_PADDING = 24;
private static final long FILE_DEBOUNCE_MILLIS = 250;
private static final List<String> CHILD_FIRST_PREFIXES = List.of("com.demcha.");
private static final List<String> PARENT_FIRST_PREFIXES = List.of("com.demcha.compose.devtool.");
private static final AtomicInteger REFRESH_THREAD_SEQUENCE = new AtomicInteger();
private static final AtomicInteger DEBOUNCE_THREAD_SEQUENCE = new AtomicInteger();
private final DevToolWorkspace workspace = DevToolWorkspace.currentProject();
private final PreviewCompiler compiler = new PreviewCompiler();
private final float previewScale = PreviewScaleResolver.fromSystemProperties();
private final ExecutorService refreshExecutor = Executors.newSingleThreadExecutor(
daemonThreadFactory("graphcompose-devtool-refresh-", REFRESH_THREAD_SEQUENCE));
private final ScheduledExecutorService debounceExecutor = Executors.newSingleThreadScheduledExecutor(
daemonThreadFactory("graphcompose-devtool-debounce-", DEBOUNCE_THREAD_SEQUENCE));
private final AtomicReference<RefreshRequest> pendingRequest = new AtomicReference<>();
private final AtomicReference<ScheduledFuture<?>> pendingDebounce = new AtomicReference<>();
private final AtomicReference<LoadedPreview> currentPreview = new AtomicReference<>();
private final ArrayDeque<Path> retainedOutputDirs = new ArrayDeque<>();
private final CoalescingRefreshWorker<RefreshRequest> refreshWorker = new CoalescingRefreshWorker<>(
refreshExecutor,
RefreshRequest::merge,
pending -> performRefresh(pending.revision(), pending.request()));
private RecursivePathWatcher watcher;
private Label providerValue;
private Label lastEventValue;
private Label compileStatusValue;
private Label timingValue;
private Label footerStatus;
private Button savePdfButton;
private Button openPdfButton;
private TextArea watchedRootsArea;
private TextArea diagnosticsArea;
private ImageView imageView;
public static void main(String[] args) {
Application.launch(GraphComposeDevTool.class, args);
}
private static ThreadFactory daemonThreadFactory(String prefix, AtomicInteger sequence) {
return runnable -> {
Thread thread = new Thread(runnable);
thread.setDaemon(true);
thread.setName(prefix + sequence.getAndIncrement());
return thread;
};
}
@Override
public void start(Stage stage) {
var root = new BorderPane();
root.setCenter(buildSplitPane());
root.setBottom(buildFooter());
root.setStyle("-fx-background-color: #f8fafc;");
var scene = new Scene(root, WINDOW_WIDTH, WINDOW_HEIGHT);
stage.setTitle("GraphComposeDevTool");
stage.setScene(scene);
stage.show();
initializeUiState();
startWatcher();
requestRefresh(RefreshRequest.startup(), false);
}
@Override
public void stop() {
ScheduledFuture<?> scheduled = pendingDebounce.getAndSet(null);
if (scheduled != null) {
scheduled.cancel(false);
}
closeWatcher();
debounceExecutor.shutdownNow();
refreshExecutor.shutdownNow();
closePreview(currentPreview.getAndSet(null));
}
private SplitPane buildSplitPane() {
var splitPane = new SplitPane(buildStatusPane(), buildPreviewPane());
splitPane.setDividerPositions(0.33);
return splitPane;
}
private VBox buildStatusPane() {
providerValue = createValueLabel();
lastEventValue = createValueLabel();
compileStatusValue = createValueLabel();
timingValue = createValueLabel();
watchedRootsArea = createReadOnlyArea(4);
diagnosticsArea = createReadOnlyArea(16);
diagnosticsArea.setPromptText("Compilation and runtime diagnostics will appear here.");
var reloadButton = new Button("Reload now");
reloadButton.setOnAction(event -> {
updateLastEvent("Manual reload");
requestRefresh(RefreshRequest.manual(), false);
});
savePdfButton = new Button("Save PDF");
savePdfButton.setDisable(true);
savePdfButton.setOnAction(event -> exportCurrentPreview(false));
openPdfButton = new Button("Open PDF");
openPdfButton.setDisable(true);
openPdfButton.setOnAction(event -> exportCurrentPreview(true));
var content = new VBox(
12,
sectionTitle("Preview Provider"),
providerValue,
sectionTitle("Watched Roots"),
watchedRootsArea,
new Separator(),
sectionTitle("Last Change"),
lastEventValue,
sectionTitle("Compile Status"),
compileStatusValue,
sectionTitle("Timing"),
timingValue,
reloadButton,
savePdfButton,
openPdfButton,
new Separator(),
sectionTitle("Diagnostics"),
diagnosticsArea);
content.setPadding(new Insets(18));
content.setFillWidth(true);
content.setStyle("-fx-background-color: #ffffff;");
return content;
}
private ScrollPane buildPreviewPane() {
imageView = new ImageView();
imageView.setPreserveRatio(true);
imageView.setSmooth(true);
var emptyState = new Label("Preview will appear here after the first successful save.");
emptyState.visibleProperty().bind(Bindings.isNull(imageView.imageProperty()));
emptyState.setStyle("-fx-text-fill: #64748b; -fx-font-size: 15px;");
var canvas = new StackPane(imageView, emptyState);
canvas.setAlignment(Pos.TOP_CENTER);
canvas.setPadding(new Insets(PREVIEW_CANVAS_PADDING));
canvas.setStyle("-fx-background-color: linear-gradient(to bottom, #e2e8f0, #cbd5e1);");
var scrollPane = new ScrollPane(canvas);
scrollPane.setFitToWidth(true);
scrollPane.setPannable(true);
scrollPane.setStyle("-fx-background: transparent; -fx-border-color: transparent;");
imageView.fitWidthProperty().bind(Bindings.createDoubleBinding(() -> {
Image image = imageView.getImage();
if (image == null) {
return 0.0;
}
double viewportWidth = scrollPane.getViewportBounds().getWidth();
double availableWidth = viewportWidth - (PREVIEW_CANVAS_PADDING * 2);
if (availableWidth <= 0.0) {
return image.getWidth();
}
return Math.min(image.getWidth(), availableWidth);
},
imageView.imageProperty(),
scrollPane.viewportBoundsProperty()));
return scrollPane;
}
private Label buildFooter() {
footerStatus = new Label();
footerStatus.setPadding(new Insets(10, 14, 10, 14));
footerStatus.setStyle("-fx-font-size: 12px; -fx-text-fill: #334155;");
return footerStatus;
}
private void initializeUiState() {
providerValue.setText(workspace.previewProviderClassName());
watchedRootsArea.setText(String.join(
System.lineSeparator(),
workspace.watchRoots().stream().map(workspace::displayPath).toList()));
lastEventValue.setText("Startup scan");
compileStatusValue.setText("Watching");
timingValue.setText("Waiting for the first render");
footerStatus.setText("Watching source files and waiting for the first preview build...");
updateExportButtons(null);
}
private void startWatcher() {
try {
watcher = new RecursivePathWatcher(
workspace.existingWatchRoots(),
this::handlePathChange,
this::handleWatcherFailure);
watcher.start();
} catch (Exception ex) {
setFailureState("Not compiled",
"Watcher startup failed",
"Watcher failed to start:%n%n%s".formatted(formatThrowable(ex)),
"Watching disabled");
}
}
private void handlePathChange(RecursivePathWatcher.PathChange change) {
Path changedPath = change.path();
boolean javaChange = workspace.isJavaSource(changedPath);
boolean resourceChange = workspace.isResourcePath(changedPath);
if (!javaChange && !resourceChange) {
return;
}
String eventText = "%s %s".formatted(change.kind().name(), workspace.displayPath(changedPath));
updateLastEvent(eventText);
requestRefresh(new RefreshRequest(eventText, javaChange, false), true);
}
private void handleWatcherFailure(Exception ex) {
setFailureState("Not compiled",
"Watcher failure",
formatThrowable(ex),
"File watching stopped");
}
private void requestRefresh(RefreshRequest request, boolean debounced) {
pendingRequest.getAndUpdate(existing -> existing == null ? request : existing.merge(request));
ScheduledFuture<?> previous = pendingDebounce.getAndSet(null);
if (previous != null) {
previous.cancel(false);
}
if (debounced) {
ScheduledFuture<?> scheduled = debounceExecutor.schedule(
this::flushPendingRefresh,
FILE_DEBOUNCE_MILLIS,
TimeUnit.MILLISECONDS);
pendingDebounce.set(scheduled);
} else {
flushPendingRefresh();
}
}
private void flushPendingRefresh() {
RefreshRequest request = pendingRequest.getAndSet(null);
if (request == null) {
return;
}
refreshWorker.offer(request);
refreshWorker.start();
}
private void performRefresh(long revision, RefreshRequest request) {
LoadedPreview previousPreview = currentPreview.get();
boolean shouldCompile = request.forceCompilation() || request.requiresCompilation() || previousPreview == null;
if (isStaleRevision(revision)) {
return;
}
Platform.runLater(() -> {
compileStatusValue.setText(shouldCompile ? "Compiling" : "Watching");
footerStatus.setText(shouldCompile
? "Compiling preview sources..."
: "Reloading preview resources...");
});
PreviewCompiler.CompilationResult compilationResult = null;
Path compiledOutputDir = previousPreview == null ? null : previousPreview.outputDir();
int sourceCount = previousPreview == null ? 0 : previousPreview.sourceCount();
if (shouldCompile) {
compilationResult = compiler.compile(workspace, revision);
if (!compilationResult.success()) {
if (!isStaleRevision(revision)) {
setFailureState(
"Not compiled",
"Compile failed",
compilationResult.diagnostics(),
"compile %d ms | %d sources".formatted(
compilationResult.compileMillis(),
compilationResult.sourceCount()));
}
return;
}
compiledOutputDir = compilationResult.outputDir();
sourceCount = compilationResult.sourceCount();
}
if (compiledOutputDir == null) {
if (!isStaleRevision(revision)) {
setFailureState("Not compiled",
"No compiled preview available",
"Compile the preview provider once before doing resource-only reloads.",
"No output directory");
}
return;
}
SelectiveChildFirstClassLoader loader = null;
try {
loader = new SelectiveChildFirstClassLoader(
workspace.buildClassLoaderUrls(compiledOutputDir),
GraphComposeDevTool.class.getClassLoader(),
CHILD_FIRST_PREFIXES,
PARENT_FIRST_PREFIXES);
PreviewFrame frame = renderFrame(loader, revision, compiledOutputDir, sourceCount, compilationResult);
if (isStaleRevision(revision)) {
closeLoader(loader);
if (shouldCompile) {
PreviewCompiler.deleteDirectoryQuietly(compiledOutputDir);
}
return;
}
LoadedPreview loadedPreview = new LoadedPreview(loader, compiledOutputDir, sourceCount, frame.fileProvider());
LoadedPreview oldPreview = currentPreview.getAndSet(loadedPreview);
closePreview(oldPreview);
if (shouldCompile) {
retainSuccessfulOutputDir(compiledOutputDir);
}
PreviewFrame appliedFrame = frame;
Platform.runLater(() -> applySuccessState(appliedFrame));
} catch (CancellationException ignored) {
closeLoader(loader);
if (shouldCompile) {
PreviewCompiler.deleteDirectoryQuietly(compiledOutputDir);
}
} catch (Exception ex) {
closeLoader(loader);
if (shouldCompile) {
PreviewCompiler.deleteDirectoryQuietly(compiledOutputDir);
}
if (!isStaleRevision(revision)) {
long compileMillis = compilationResult == null ? 0 : compilationResult.compileMillis();
String timing = shouldCompile
? "compile %d ms | render failed".formatted(compileMillis)
: "compile skipped | render failed";
setFailureState("Not compiled", "Preview failed", formatThrowable(ex), timing);
}
}
}
private PreviewFrame renderFrame(SelectiveChildFirstClassLoader loader,
long revision,
Path compiledOutputDir,
int sourceCount,
PreviewCompiler.CompilationResult compilationResult) throws Exception {
if (isStaleRevision(revision)) {
throw new CancellationException("Stale refresh request");
}
Class<?> providerType = loader.loadClass(workspace.previewProviderClassName());
if (!DevToolPreviewProvider.class.isAssignableFrom(providerType)) {
throw new IllegalStateException(
"%s must implement %s".formatted(
workspace.previewProviderClassName(),
DevToolPreviewProvider.class.getName()));
}
DevToolPreviewProvider provider = (DevToolPreviewProvider) providerType.getDeclaredConstructor().newInstance();
DevToolPreviewFileProvider fileProvider = provider instanceof DevToolPreviewFileProvider exportable
? exportable
: null;
long renderStartedAt = System.nanoTime();
try (PDDocument document = Objects.requireNonNull(provider.buildPreview(),
"Preview provider returned null")) {
if (document.getNumberOfPages() == 0) {
throw new IllegalStateException("Preview provider returned a document without pages.");
}
BufferedImage bufferedImage = PdfRenderBridge.renderToImage(document, 0, previewScale);
if (isStaleRevision(revision)) {
throw new CancellationException("Stale refresh request");
}
Image image = SwingFXUtils.toFXImage(bufferedImage, null);
long renderMillis = (System.nanoTime() - renderStartedAt) / 1_000_000;
long compileMillis = compilationResult == null ? 0 : compilationResult.compileMillis();
return new PreviewFrame(
image,
bufferedImage.getWidth(),
bufferedImage.getHeight(),
compileMillis,
renderMillis,
sourceCount,
compilationResult != null,
fileProvider,
compiledOutputDir);
}
}
private boolean isStaleRevision(long revision) {
return revision != refreshWorker.latestRevision();
}
private void retainSuccessfulOutputDir(Path outputDir) {
if (outputDir == null) {
return;
}
retainedOutputDirs.remove(outputDir);
retainedOutputDirs.addLast(outputDir);
while (retainedOutputDirs.size() > 2) {
Path removed = retainedOutputDirs.removeFirst();
if (!Objects.equals(removed, outputDir)) {
PreviewCompiler.deleteDirectoryQuietly(removed);
}
}
}
private void applySuccessState(PreviewFrame frame) {
imageView.setImage(frame.image());
diagnosticsArea.clear();
compileStatusValue.setText("Rendered");
updateExportButtons(currentPreview.get());
timingValue.setText(frame.compilationTriggered()
? "compile %d ms | render %d ms | %d sources".formatted(
frame.compileMillis(),
frame.renderMillis(),
frame.sourceCount())
: "compile skipped | render %d ms | %d sources".formatted(
frame.renderMillis(),
frame.sourceCount()));
footerStatus.setText("Watching for changes. Last rendered %dx%d from %s".formatted(
frame.pixelWidth(),
frame.pixelHeight(),
workspace.displayPath(frame.outputDir())));
}
private void setFailureState(String status, String footer, String diagnostics, String timing) {
Platform.runLater(() -> {
compileStatusValue.setText(status);
footerStatus.setText(footer);
diagnosticsArea.setText(diagnostics == null ? "" : diagnostics);
timingValue.setText(timing);
});
}
private void exportCurrentPreview(boolean openAfterSave) {
LoadedPreview preview = currentPreview.get();
if (preview == null || preview.fileProvider() == null) {
updateActionFeedback("Current preview provider does not support saving to a PDF file.", false);
return;
}
Platform.runLater(() -> footerStatus.setText(openAfterSave
? "Saving and opening current preview PDF..."
: "Saving current preview PDF..."));
refreshExecutor.submit(() -> {
try {
Path savedPath = normalizeWorkspacePath(preview.fileProvider().savePreviewDocument());
if (openAfterSave) {
openPdf(savedPath);
updateActionFeedback("Saved and opened %s".formatted(workspace.displayPath(savedPath)), true);
} else {
updateActionFeedback("Saved %s".formatted(workspace.displayPath(savedPath)), true);
}
} catch (Exception ex) {
updateActionFeedback("Failed to export preview PDF:%n%n%s".formatted(formatThrowable(ex)), false);
}
});
}
private Path normalizeWorkspacePath(Path path) {
if (path == null) {
throw new IllegalStateException("Preview provider returned no output path.");
}
return path.isAbsolute()
? path.normalize()
: workspace.projectRoot().resolve(path).toAbsolutePath().normalize();
}
private void openPdf(Path path) throws IOException {
if (!Desktop.isDesktopSupported() || !Desktop.getDesktop().isSupported(Desktop.Action.OPEN)) {
throw new IOException("Desktop open action is not supported on this system.");
}
Desktop.getDesktop().open(path.toFile());
}
private void updateActionFeedback(String message, boolean success) {
Platform.runLater(() -> {
footerStatus.setText(message.replace(System.lineSeparator(), " "));
if (success) {
diagnosticsArea.clear();
} else {
diagnosticsArea.setText(message);
}
updateExportButtons(currentPreview.get());
});
}
private void updateExportButtons(LoadedPreview preview) {
boolean enabled = preview != null && preview.fileProvider() != null;
if (savePdfButton != null) {
savePdfButton.setDisable(!enabled);
}
if (openPdfButton != null) {
openPdfButton.setDisable(!enabled);
}
}
private void updateLastEvent(String text) {
Platform.runLater(() -> lastEventValue.setText(text));
}
private void closeWatcher() {
if (watcher == null) {
return;
}
try {
watcher.close();
} catch (Exception ignored) {
// Best effort shutdown only.
} finally {
watcher = null;
}
}
private void closePreview(LoadedPreview preview) {
if (preview == null) {
return;
}
closeLoader(preview.classLoader());
}
private void closeLoader(SelectiveChildFirstClassLoader loader) {
if (loader == null) {
return;
}
try {
loader.close();
} catch (Exception ignored) {
// Best effort shutdown only.
}
}
private static Label createValueLabel() {
Label label = new Label();
label.setWrapText(true);
label.setStyle("-fx-text-fill: #0f172a; -fx-font-size: 13px;");
return label;
}
private static TextArea createReadOnlyArea(int rows) {
var area = new TextArea();
area.setEditable(false);
area.setWrapText(true);
area.setPrefRowCount(rows);
area.setFont(Font.font("Consolas", FontWeight.NORMAL, 12));
area.setStyle("-fx-control-inner-background: #f8fafc; -fx-text-fill: #0f172a;");
return area;
}
private static Label sectionTitle(String text) {
var label = new Label(text);
label.setStyle("-fx-font-size: 12px; -fx-font-weight: bold; -fx-text-fill: #475569;");
return label;
}
private static String formatThrowable(Throwable throwable) {
Throwable root = throwable;
while (root.getCause() != null) {
root = root.getCause();
}
var writer = new StringWriter();
try (var printWriter = new PrintWriter(writer)) {
root.printStackTrace(printWriter);
}
return writer.toString().strip();
}
private record RefreshRequest(String description, boolean requiresCompilation, boolean forceCompilation) {
static RefreshRequest startup() {
return new RefreshRequest("Startup scan", true, false);
}
static RefreshRequest manual() {
return new RefreshRequest("Manual reload", true, true);
}
RefreshRequest merge(RefreshRequest other) {
return new RefreshRequest(
other.description,
requiresCompilation || other.requiresCompilation,
forceCompilation || other.forceCompilation);
}
}
private record LoadedPreview(
SelectiveChildFirstClassLoader classLoader,
Path outputDir,
int sourceCount,
DevToolPreviewFileProvider fileProvider) {
}
private record PreviewFrame(
Image image,
int pixelWidth,
int pixelHeight,
long compileMillis,
long renderMillis,
int sourceCount,
boolean compilationTriggered,
DevToolPreviewFileProvider fileProvider,
Path outputDir) {
}
}