This is a refactor for core methods of the Pane API. In this patch:
1. Rename initializeDOMRoot to getInitialHTML() - This logic is common for all of the panes. Returning the HTML is more type-safe and makes the method pure.
2. Make createEditor return the monaco editor - Allows us to set the editor in the constructor. Returning the editor is more type-safe and makes the method pure.
3. Rename id parameters to compilerId in onCompileResult, onCompiler and onCompilerClose - It's not easy to tell what these ids were, this makes it easier to understand what we're using here.
4. Type compiler, options and result as unkown in onCompiler, onCompileResult - These parameters don't have types at the moment, so it's safer for implementors to manually override and type as any/whichever type they wish.
5. Add plenty of code documentation to onCompiler and onCompileResult
This change only gets the GNAT Debug expanded generated code (-gnatD).
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Co-authored-by: Mats Larsen <me@supergrecko.com>
Fetch is a modern, promise-based API for sending HTTP requests from the browser (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
This patch introduces whatwg-fetch as the polyfill for fetch, as well as installing it inside the main script.
Decouples the individual initial pane states for each pane from the BasePaneState type.
This will allow easier re-use of the state the various constructors receive
Non-functional change.
When `files` is unspecified `input` defaults to `**/*`.
This pattern still only matches valid typescript extensions.
When `outDir` is specified it is implicitly added to `exclude`,
which takes priority over `include` and breaks the build.
Co-authored-by: Matt Godbolt <matt@godbolt.org>
The pane would still show <no output> for unsupported compiler.
Let the onCompiler callback correctly write the message in case the compiler is
not supported.
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
This will convert static/colour.js to typescript (see #2981)
Changes are pretty much the same as with the other conversions I did.
Assumed that param colours in applyColours is of type number[] as this is the only fitting type.
Signed-off-by: Markus <28785953+MarkusJx@users.noreply.github.com>
Site settings for tab width and tabs vs spaces are now being used when sent to the /api/format APIs.
This patch also includes some tiny internal refactoring on the bits related to the formatting API.
* Changes to allow Program (vs Unit) in Object Pascal
* add possibility of dpr
* more flexibility with pascal filenames
* lintfixes
* i have no idea what im doing
* apply changes to pascal-win
* pascal fixes
* pascal projectfile changes
* work in progress
* bugfixes
* bla
* bugfixes
* mostly working
Co-authored-by: paul mcgee <paul.mcgee.8@bigpond.com>
Co-authored-by: Paul McGee <paulmcgee1969@gmail.com>
* Implement generic pane skeleton
* Implement abstract Pane class
* Port RustMirView to typescript
* Fix nits in code
* Adjust method names and add override modifiers
* Add remaining settings keys (and fix a bug)
* Use this-binding in registerStandardCallbacks
* Address review comments
* Use utils.updateAndCalcTopBarHeight in base pane
* Add notice about adding an entry in interfaces.ts
* Use .bind instead of context parameter
GoldenLayout has moved away from the context parameter, so .bind is a safer for the future
* [200~Check for editor presence + fix typo~
* Remove trailing comma
Co-authored-by: Patrick Quist <partouf@gmail.com>