Commit graph

279 commits

Author SHA1 Message Date
AnotherTest
6b55b007dd HackStudio: Add a Shell language server 2020-10-04 23:12:28 +02:00
AnotherTest
34039d6639 HackStudio: Do not change the cursor in the LSP autocomplete request
The C++ completion somehow depends on this, so move that behaviour into
the C++ language server instead.
2020-10-04 23:12:28 +02:00
AnotherTest
9e73b0b696 HackStudio: Relay completions requests to the language server unfiltered
Previously, the client would decide when to ask the server for
completions, and it would only do so for identifiers that had spans
(determined via the highlighter!).
Swap this around and make the server decide if it wants to complete
something.
This commit also adds a CompletionKind (which only has one value:
Identifier), to work with other kinds of completions as well.
2020-10-04 23:12:28 +02:00
Linus Groh
bcfc6f0c57 Everywhere: Fix more typos 2020-10-03 12:36:49 +02:00
AnotherTest
ac5e08a541 HackStudio: Abstract away language-server details
This commit moves all the logic that deals with the language server
(from HackStudio) into a LanguageClient class, provides some functions
to make constructing them easier, and makes all language servers use a
singular IPC definition.
Also fixes the FIXME about making the autocompletion async.
This makes adding language servers in the future significantly less
duplicate-y, and significantly easier :^)
2020-10-02 20:47:57 +02:00
Itamar
a39c4cc340 HackStudio: Integrate with C++ Language Server
Editors now communicate with the c++ language server when openning and
editing c++ source files, and go through the language server to get
autocomplete suggestions.
2020-09-30 21:46:59 +02:00
Itamar
863f14788f HackStudio: Add C++ Language Server
The language server keeps track of the content of currently edited
files by receiving updates about edit actions.

Also, C++ autocompletion is no longer tied to HackStudio itself and
moved to be part of the language server.
2020-09-30 21:46:59 +02:00
Itamar
bf53d7ff64 LibCpp: Add library for working with c++ code
Moved the C++ Lexer we have from LibGUI to here, so that other
components could use it without linking with LibGUI.
2020-09-30 21:46:59 +02:00
AnotherTest
c1fc27cab2 HackStudio+TextEditor: Add the Shell syntax highlighter 2020-09-30 20:05:24 +02:00
Itamar
8af67210cf HackStudio: Detach from debugged process before terminating
Fixes #3308
2020-09-26 17:18:21 +02:00
Itamar
6c73fdf8d1 HackStudio: Fix FormEditor widget icons loading
Previously, when resolving the paths for the FormEditor widget icons
we didn't take into the account that calling class_name() returns the
widget name with a "GUI::" prefix.

Also, we now skip over widgets that we don't have an icon for.
2020-09-26 17:18:21 +02:00
Ben Wiederhake
25488ddcad Meta+DevTools: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
Itamar
b7bd2ed9d2 HackStudio: Add auto-complete capability to the Editor 2020-09-21 20:16:03 +02:00
Itamar
7d6e6eb268 HackStudio: Add AutoCompleteBox
Can be used to display the list of autocomplete suggestions and apply
a suggestion that was chosen by the user.
2020-09-21 20:16:03 +02:00
Itamar
42bdcf1828 HackStudio: Basic C++ autocomplete logic
CppAutoComplete gets a string of code and a position within it, and
returns a Vector of auto-complete suggestions that are relevant for the
given position.

Currently, it's very naive - it uses our CppLexer to find identifiers
in the code which the auto-complete target is a prefix of.
2020-09-21 20:16:03 +02:00
Itamar
e3e5e57fde HackStudio: Move bulk of GUI logic into HackStudioWidget
Previously, the GUI logic of HackStudio was all stuffed into main(),
and it started getting a bit out of hand :)
2020-09-19 21:39:05 +02:00
Itamar
b82a254da0 HackStudio: Only refresh Git widget on save if initialized 2020-09-18 15:20:55 +02:00
Itamar
1e96e46a81 HackStudio: Refresh the Git widget state on file save 2020-09-15 21:43:29 +02:00
Itamar
d1eedd0e9f HackStudio: View unstaged diffs in files with DiffViewer 2020-09-15 21:43:29 +02:00
Itamar
ba11082b4b HackStudio: Add functionality to GitRepo object
Added functionality for:
- Original files contents (without the current changes)
- Unstaged diffs
- Checking whether a file is tracked
2020-09-15 21:43:29 +02:00
Itamar
8306a84967 HackStudio: Add DiffViewer widget
This widget presents a diff in a nice graphical way, side by side.
2020-09-15 21:43:29 +02:00
Itamar
7c70183f3f HackStudio: Make the actions tab visible when using the form editor
Previously, the strucutre of the HackStudio widgets made it so the
actions tab would be hidden when the "edit mode" was something other
than EditMode::Text (for example, when using the form editor).
2020-09-15 21:43:29 +02:00
Itamar
dac7db830a HackStudio: Fix "Add new Editor" action 2020-09-15 21:43:29 +02:00
Itamar
f300b81648 HackStudio: Add "commit" and "refresh" actions to Git widget 2020-09-15 21:43:29 +02:00
Itamar
435c6c6f96 HackStudio: Add basic Git integration
This adds a "Git" tab to Hackstudio.
Currently has support for staging and unstaging files.
2020-09-15 21:43:29 +02:00
Andreas Kling
ad7030ce4a HackStudio: Tighten some unnecessarily broad lambda captures 2020-09-13 21:52:37 +02:00
Ben Wiederhake
04e3122526 HackStudio: Reduce debug spam 2020-09-12 13:46:15 +02:00
Andreas Kling
dbd2fa8b8f HackStudio: Use widget override cursors 2020-09-11 16:06:00 +02:00
Andreas Kling
b4f307f982 LibGUI+WindowServer: Rename window "override cursor" to just "cursor"
Let's just say each window has a cursor, there's not really overriding
going on.
2020-09-11 14:26:37 +02:00
Andreas Kling
0f9be82826 LibGfx: Move StandardCursor enum to LibGfx
This enum existed both in LibGUI and WindowServer which was silly and
error-prone.
2020-09-10 19:25:13 +02:00
Luke
5fd88e51c5 HackStudio: Highlight register changes, minor disassembly view fix
Also adds shortcuts for step in (F11), step out (Shift-F11) and
step over (F10).
2020-08-30 17:31:33 +02:00
Ben Wiederhake
f36c67c960 HackStudio: Mark default action in context menu 2020-08-30 09:47:49 +02:00
Ben Wiederhake
d063dc1e71 HackStudio: Mark compilation-unit-only functions as static 2020-08-28 11:37:33 +02:00
thankyouverycool
8a364c503d Base: Rename icon subdirectories by explicit app name
Renames widgets/ to hackstudio/, vbwidgets/ to visualbuilder/ and
paintbrush/ to pixelpaint/.
2020-08-27 15:38:02 +02:00
thankyouverycool
ebba297b42 Base: Move 16x16 common icons to /res/icons/16x16/
Drops the '16' suffix from filenames. Resizes inconsistent
audio-volume icons to intended size.
2020-08-27 15:38:02 +02:00
Ben Wiederhake
9f7ec33180 Meta: Force semi-colon after MAKE_AK_NONXXXABLE()
Before, we had about these occurrence counts:
COPY: 13 without, 33 with
MOVE: 12 without, 28 with

Clearly, 'with' was the preferred way. However, this introduced double-semicolons
all over the place, and caused some warnings to trigger.

This patch *forces* the usage of a semi-colon when calling the macro,
by removing the semi-colon within the macro. (And thus also gets rid
of the double-semicolon.)
2020-08-27 10:12:04 +02:00
thankyouverycool
30ad295fa1 Base+HackStudio: Rename project file extensions to .hsp
More concise in Views and consistent with other extensions.
2020-08-26 16:59:34 +02:00
thankyouverycool
45901d4141 LibGUI+HackStudio: Associate new icons with their extensions 2020-08-26 16:59:34 +02:00
Andreas Kling
44e371635e LibGUI: Move table view headers into their own widget
This patch introduces the HeaderView class, which is a widget that
implements the column headers of TableView and TreeView.

This greatly simplifies event management in the view implementations
and also makes it much easier to eventually implement row headers.
2020-08-26 00:51:35 +02:00
Luke
916e5e8cb3 HackStudio: Add a registers view for the current function in debug mode 2020-08-25 09:46:06 +02:00
Luke
3ddc42fdf1 HackStudio: Add a disassembly view for the current function in debug mode 2020-08-25 09:46:06 +02:00
Luke
694b86a4bf LibDebug: Move everything into the "Debug" namespace 2020-08-25 09:46:06 +02:00
Itamar
5c494eefd6 HackStudio: Implement "Step Over" debugging action
The "Step Over" action continues execution without stepping into
instructions in subsequent function calls.
2020-08-22 09:48:59 +02:00
Itamar
99788e6b32 HackStudio: Implement "Step Out" debugging action
The "Step Out" action continues execution until the current function
returns.

Also, LibDebug/StackFrameUtils was introduced to eliminate the
duplication of stack frame inspection logic between the "Step Out"
action and the BacktraceModel.
2020-08-22 09:48:59 +02:00
Itamar
cb432ffe8c HackStudio: Add icons for "step in" and "step out" 2020-08-22 09:48:59 +02:00
Itamar
f5aa0988f5 HackStudio: Move debugger actions to a toolbar in the debug widget 2020-08-22 09:48:59 +02:00
Andreas Kling
56c3748dcc LibWeb: Rename PageView => InProcessWebView 2020-08-17 18:05:35 +02:00
Andreas Kling
c0462c65cf HackStudio: Move everything into the HackStudio namespace 2020-08-17 18:05:35 +02:00
Andreas Kling
9102b624ac LibGUI+DevTools+Applications: Use ModelIndex::data() in many places
This way you don't have to keep track of which model it came from.
2020-08-16 16:44:09 +02:00
Andreas Kling
a1e381a0f8 LibGUI: Move GUI::Model::Role to GUI::ModelRole
This is preparation for using ModelRole in the ModelIndex API.
2020-08-16 16:44:09 +02:00