Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft for feedback #62

Open
wants to merge 105 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
2724964
Updated git ignore to include build/
lutteman Sep 13, 2021
95f02e3
Merge pull request #1 from aKjeller/newGitIgnore
lutteman Sep 13, 2021
36d7bd1
Edit button with window
aKjeller Sep 23, 2021
f476890
Merge pull request #3 from ItJustWorksTM/master
aKjeller Sep 27, 2021
8f7f9f0
Contribution tables for gm1
aKjeller Sep 30, 2021
179b8bf
Merge pull request #4 from aKjeller/gm1
AnonymousTM Sep 30, 2021
f6ab0c1
Modified main_window and moved edit_btn
aKjeller Oct 6, 2021
78ef4e0
Initial script for dropdown button
lutteman Oct 7, 2021
420195d
Added dropdown menu button with open and save file options
lutteman Oct 7, 2021
6e4a727
Add functionality to read and save files
Anthony1911 Oct 8, 2021
830627f
Merge pull request #16 from aKjeller/main_window
aKjeller Oct 13, 2021
609c500
Merge pull request #17 from aKjeller/dropdown
aKjeller Oct 13, 2021
606c652
Merge pull request #18 from aKjeller/Anthony1911-fileLoader
aKjeller Oct 13, 2021
2c2ae26
TextEdit
AnonymousTM Oct 14, 2021
fcee001
Merge pull request #19 from aKjeller/TextEditor
aKjeller Oct 14, 2021
a49c6b6
Create build.yml
aKjeller Oct 14, 2021
7887583
Contribution gm2
aKjeller Oct 14, 2021
5f3cbe3
Create action
aKjeller Oct 18, 2021
82f7c03
Rename action to action.yml
aKjeller Oct 18, 2021
eeed730
auto run code duplication test on pull request
aKjeller Oct 18, 2021
6e4d110
Fix editor closing bug
Anthony1911 Oct 18, 2021
4fac493
Update SmceHud.gd
Anthony1911 Oct 18, 2021
3e19856
Merge pull request #27 from aKjeller/github_action
aKjeller Oct 18, 2021
c35bfec
Merge pull request #28 from aKjeller/Anthony1911-close-bug-fix
aKjeller Oct 18, 2021
df0970e
Added Arduino syntax highlighting
Anthony1911 Oct 18, 2021
8875d4b
Merge pull request #30 from ItJustWorksTM/master
Anthony1911 Oct 22, 2021
44cd238
Added popup window scene + script
Anthony1911 Oct 22, 2021
cdc7830
Merge pull request #29 from aKjeller/Anthony1911-syntax-highlighting
lutteman Oct 31, 2021
f9e3eff
Merge pull request #32 from aKjeller/Anthony1911-popup-window
AnonymousTM Oct 31, 2021
cb66fcd
Enabled bracket matching
Anthony1911 Oct 31, 2021
938700e
Tab-System V1.0
AnonymousTM Oct 31, 2021
7cd2678
Merge pull request #31 from aKjeller/master
aKjeller Nov 1, 2021
b897d5c
Merge branch 'code_editor' into bracket-match
aKjeller Nov 1, 2021
8979ae1
Merge pull request #35 from aKjeller/bracket-match
aKjeller Nov 1, 2021
3605ca4
TabSystem + newProject
AnonymousTM Nov 1, 2021
236c230
Merge pull request #36 from aKjeller/TabSystem
aKjeller Nov 2, 2021
e9eace2
Editor links with sketches in the hud
aKjeller Nov 2, 2021
20c112e
Merge pull request #38 from aKjeller/link_editor_to_hud
lutteman Nov 2, 2021
4747fab
file window added
aKjeller Nov 2, 2021
286923f
Merge pull request #39 from aKjeller/file_tree
AnonymousTM Nov 3, 2021
3347bb6
Window is smaller now + resizeable
Anthony1911 Nov 10, 2021
817fb4c
Added fonts for popup
Anthony1911 Nov 12, 2021
d04b09d
Refactoring
Anthony1911 Nov 12, 2021
796daef
Adding line limit functionality
Anthony1911 Nov 14, 2021
0ae7fc7
Adding line limit functionality
Anthony1911 Nov 14, 2021
4b48b31
Merge pull request #53 from aKjeller/Anthony1911-update-popup
lutteman Nov 15, 2021
0c434c6
Tabs v1.1
AnonymousTM Nov 15, 2021
47ae455
Small error fix
AnonymousTM Nov 15, 2021
904e867
Refactor out excessive use of get_parent()
aKjeller Nov 15, 2021
ae77d45
Moved texteditor code to new file
aKjeller Nov 15, 2021
1203f80
Merge pull request #57 from aKjeller/TabSystem-v1.1
lutteman Nov 16, 2021
62fe471
Merge branch 'code_editor' into refactor_parents
lutteman Nov 16, 2021
a8583b8
Merge pull request #56 from aKjeller/refactor_parents
lutteman Nov 16, 2021
9f363e2
Added icons in file_tree
aKjeller Nov 16, 2021
ffa6680
File tree buttons
aKjeller Nov 16, 2021
b13eb75
Added compile button
lutteman Nov 16, 2021
bc8bd5b
Merge pull request #54 from aKjeller/Anthony1911-line-limit
lutteman Nov 17, 2021
5c7428a
Merge pull request #59 from aKjeller/compile_button
Anthony1911 Nov 17, 2021
6fcf70d
Resolve conflicts
aKjeller Nov 17, 2021
209bcd9
Switching tabs select correct file in tree
aKjeller Nov 17, 2021
1dad567
Added more highlight keywords
Anthony1911 Nov 17, 2021
f18daf4
Merge pull request #60 from aKjeller/Anthony1911-highlight-keyword-up…
aKjeller Nov 17, 2021
5119bb3
Merge pull request #61 from aKjeller/file_tree_2
Anthony1911 Nov 17, 2021
9c97fdd
Added selective syntax highlighting
Anthony1911 Nov 18, 2021
3046249
Correction
Anthony1911 Nov 18, 2021
796cdc0
Merge pull request #62 from aKjeller/Anthony1911-selective-highlighting
lutteman Nov 18, 2021
13aa129
Anchor refactoring
Anthony1911 Nov 18, 2021
4e53e21
Merge pull request #63 from aKjeller/Anthony1911-refactor-line-limit
AnonymousTM Nov 18, 2021
c9c40ae
Refactoring
Anthony1911 Nov 29, 2021
6a02367
Refactoring
Anthony1911 Nov 29, 2021
3ad6349
Refactor file_tree, seperate ui and logic
aKjeller Nov 30, 2021
4d2d41d
Removed all signals from scene
aKjeller Nov 30, 2021
6ce6135
Added a theme for the fileDialog
lutteman Nov 30, 2021
2a4d64a
Changed theme of all buttons
AnonymousTM Nov 30, 2021
c710fe5
Refactor tabs
lutteman Nov 30, 2021
b4b7c80
Renaming
Anthony1911 Dec 2, 2021
26ad074
Merge pull request #69 from aKjeller/fileDialog_theme_update
aKjeller Dec 2, 2021
feafe23
Added several "Ctrl"-related shortcuts
Anthony1911 Dec 2, 2021
c38cdf8
Added methods for shortcut commands
Anthony1911 Dec 2, 2021
53f6903
Merge pull request #68 from aKjeller/refactor
Anthony1911 Dec 2, 2021
7a7a001
Update reference
Anthony1911 Dec 2, 2021
590a58e
Update reference
Anthony1911 Dec 2, 2021
260cccd
Update
Anthony1911 Dec 2, 2021
f0ce7f7
Merge pull request #72 from aKjeller/Anthony1911-keyboard-shortcuts
AnonymousTM Dec 2, 2021
0548cdc
Revert "Added several "Ctrl"-related shortcuts"
AnonymousTM Dec 2, 2021
d3522d2
Merge branch 'code_editor' into Anthony1911-refactor-popup
Anthony1911 Dec 2, 2021
4e5e29a
Merge pull request #73 from aKjeller/revert-72-Anthony1911-keyboard-s…
aKjeller Dec 2, 2021
9f0ed11
Merge branch 'code_editor' into Theme-Restyling
aKjeller Dec 2, 2021
3e5978e
Merge pull request #70 from aKjeller/Theme-Restyling
aKjeller Dec 2, 2021
2c4a143
Styling added for popup window
AnonymousTM Dec 2, 2021
605558c
Merge pull request #74 from aKjeller/Theme-for-popup
aKjeller Dec 2, 2021
810aeb3
Enable ctrl shortcuts
Anthony1911 Dec 2, 2021
9b83058
Methods for ctrl shortcuts
Anthony1911 Dec 2, 2021
e83906b
Merge pull request #75 from aKjeller/Anthony1911-ctrl-shortcuts
aKjeller Dec 2, 2021
4c69bfc
Change to null check instead of saving variable
aKjeller Dec 2, 2021
f8cfcb3
-.-
lutteman Dec 2, 2021
224c0f5
Merge pull request #71 from aKjeller/refactor_tabs
aKjeller Dec 2, 2021
796a00d
Merge branch 'code_editor' into Anthony1911-refactor-popup
Anthony1911 Dec 2, 2021
9ddc50b
Bug fixed
lutteman Dec 2, 2021
bc96b66
Merge pull request #67 from aKjeller/Anthony1911-refactor-popup
aKjeller Dec 2, 2021
96d4e89
Fixes
AnonymousTM Dec 2, 2021
a15e308
Merge pull request #79 from aKjeller/refactor_tabs
aKjeller Dec 2, 2021
52d021c
Merge pull request #76 from aKjeller/refactor
aKjeller Dec 2, 2021
65720f7
Merge pull request #78 from aKjeller/3-issues-fixed
aKjeller Dec 3, 2021
c908800
Small fixes read description
AnonymousTM Dec 9, 2021
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
24 changes: 24 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Duplicate code

on: pull_request

jobs:
duplicate-code-check:
name: Check for duplicate code
runs-on: ubuntu-20.04
steps:
- name: Check for duplicate code
uses: platisd/duplicate-code-detection-tool@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
directories: "project/src"
# Only examine .h and .cpp files
file_extensions: "gd"
# Only report similarities above 5%
ignore_below: 5
# If a file is more than 70% similar to another, then the job fails
fail_above: 70
# If a file is more than 15% similar to another, show a warning symbol in the report
warn_above: 15
# Remove `src/` from the file paths when reporting similarities
project_root_dir: "project/src"
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ project/.import
project/gdnative/lib
project/share/RtResources
project/share/version.txt
build/
godot.log
*.png~
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ target_sources (godot-smce PRIVATE
src/bind/BoardView.cxx
src/bind/UartSlurper.cxx
src/bind/BoardConfig.cxx
src/bind/FrameBuffer.cxx
)
src/gd/BraceEnabler.cxx
src/bind/FrameBuffer.cxx)

target_include_directories (godot-smce PUBLIC include)
target_link_libraries (godot-smce PUBLIC godot-cpp ${SMCE_TARGET})
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ cmake -B build
cmake --build build --target godot-smce
```

### Building with new LIB_SMCE
Get latest libSMCE Release
Change environment variable to the correct version
copy SMCE.dll from release to project
```shell
cmake --build build --config release
```



Packaging is done using _CPack_.
_note: we bundle the shared lib of SMCE on export_

Expand Down
Binary file not shown.
Binary file added deliverables/contribution/gm1_table_of_tasks.pdf
Binary file not shown.
Binary file not shown.
Binary file added deliverables/contribution/gm2_table_of_tasks.pdf
Binary file not shown.
Binary file added deliverables/tasks/gm2_tasks.pdf
Binary file not shown.
35 changes: 35 additions & 0 deletions include/gd/BraceEnabler.hxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* BraceEnabler.hxx
* Copyright 2021 ItJustWorksTM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

#ifndef GODOT_SMCE_BRACEENABLER_HPP
#define GODOT_SMCE_BRACEENABLER_HPP

#include <gen/Node.hpp>

namespace godot {
class BraceEnabler : public Node {
GODOT_CLASS(BraceEnabler, Node);

public:
static void _register_methods();
void _init();
void _notification(int what);
};
} // namespace godot

Comment on lines +19 to +34
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know ryan made this but make this inherit from Reference instead pls, it does not need to be a node
something like BraceEnabler.new().enable_braces(editor_node) would be way better.

#endif // GODOT_SMCE_BRACEENABLER_HPP
4 changes: 4 additions & 0 deletions project/Entry.gd
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,7 @@ func _error(message: String) -> void:

func _on_clipboard_copy() -> void:
OS.clipboard = error




3 changes: 3 additions & 0 deletions project/Entry.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ margin_bottom = -0.240051
focus_mode = 2
custom_styles/focus = SubResource( 1 )
selection_enabled = true
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Button" type="Button" parent="."]
anchor_left = 0.5
Expand Down
11 changes: 11 additions & 0 deletions project/NewArduinoTemplate.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//New file created by GD Code Editor

void setup() {
// put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:

}
Comment on lines +1 to +11
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of a template / built in sketch for users to start out with, maybe extend it a bit like printing to uart?

Binary file not shown.
8 changes: 8 additions & 0 deletions project/media/fonts/Open_Sans/OpenSasn-Regular-Popup.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]

[ext_resource path="res://media/fonts/Open_Sans/OpenSans-Regular.ttf" type="DynamicFontData" id=1]

[resource]
use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
34 changes: 34 additions & 0 deletions project/media/images/icon.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/icon.png-c7ddf17ea825f0bffd1e1d023b7c4be2.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://media/images/icon.png"
dest_files=[ "res://.import/icon.png-c7ddf17ea825f0bffd1e1d023b7c4be2.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Binary file added project/media/images/outline_delete_white_48dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions project/media/images/outline_delete_white_48dp.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/outline_delete_white_48dp.png-27c9639844baf64968349be73c56fcff.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://media/images/outline_delete_white_48dp.png"
dest_files=[ "res://.import/outline_delete_white_48dp.png-27c9639844baf64968349be73c56fcff.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions project/media/images/outline_description_white_48dp.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/outline_description_white_48dp.png-763bce53e5ccf2d25eb6d9770d1aba0a.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://media/images/outline_description_white_48dp.png"
dest_files=[ "res://.import/outline_description_white_48dp.png-763bce53e5ccf2d25eb6d9770d1aba0a.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Binary file added project/media/images/outline_folder_white_48dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions project/media/images/outline_folder_white_48dp.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/outline_folder_white_48dp.png-20b7cbf4f763683c8f27e4155c715908.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://media/images/outline_folder_white_48dp.png"
dest_files=[ "res://.import/outline_folder_white_48dp.png-20b7cbf4f763683c8f27e4155c715908.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Binary file added project/media/images/outline_refresh_white_48dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions project/media/images/outline_refresh_white_48dp.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/outline_refresh_white_48dp.png-90032707c434f3814938c728493c521f.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://media/images/outline_refresh_white_48dp.png"
dest_files=[ "res://.import/outline_refresh_white_48dp.png-90032707c434f3814938c728493c521f.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Loading