Skip to content

GreatCowBASIC/GCBIDE

Repository files navigation

GCBASIC Essential IDE Change Log

Build 15.06.2025

New:

  • Revised IDE Tasks menu to support mouse activation of menu items. The previous version only worked when F4 activated the menu items.

Build 01.06.2025

New:

  • Added new functionality to the IDE Tasks menu:

  • Enabled single-key selection for menu items using keys 0 to 9 and A to Z.

  • Bolded the first character of each menu label using Unicode bold characters (𝟎 to 𝟗, 𝐀 to 𝐙) to visually distinguish the prefix.

  • Ensured the bolded prefix matches the UI_font (Arial, configurable size via ui_font_size).

  • Closes the dropdown menu before launching the selected task for a smoother user experience.

  • Move all log control to the setting.json file.

Enhancements:

  • Improved the language file to enhance syntax highlighting and support for GCBASIC.

Build 31.05.2025

New:

  • Added line numbers to printed documents for non-empty lines using format_document_with_line_numbers method.

  • Added syntax highlighting rule in GCB.tmLanguage.json to color text between < and > or " and " (including delimiters) in blue (#0000FF), bold, and italic for lines starting with #include in .gcb files.

  • Moved case and select keywords in GCB.tmLanguage.json to the control flow pattern, styling them blue (#569CD6), bold, like do, else, etc.

  • Added highlight_all_blocks method to SyntaxHighlighter to support full-document highlighting for printing.

  • New optimized syntax highlighting in _apply_highlighting by caching regex matches and comment state for unchanged blocks, skipping unchanged visible blocks, debouncing during scrolling, batching QTextCursor operations with sorted ranges, and maintaining HIGHLIGHT_TIMER_INTERVAL at 50ms for smooth scrolling, achieving ~45–55% faster highlighting for 500-line .gcb files.

  • Added block_count_changed method to SyntaxHighlighter to detect block additions (e.g., new lines) via blockCountChanged signal.

Enhancements:

  • Fixed highlighting for single-line comments (e.g., // GLCD Device Selection for next) in _apply_highlighting, ensuring keywords like for and next are green, italic (#008000), by prioritizing comment patterns before keywords.

  • Modified format_document_with_line_numbers to number only non-empty lines and remove vertical bar for clean output.

  • Updated format_document_with_line_numbers to skip empty lines in the printed output, preventing extra blank lines in PDF

Build 30.05.2025

New:

Expose the compiler timeout in the IDE Settings menu. This is a unique feature that prevents the GCBASIC from 'locking' the IDE by getting stuck. This defaults to a timeout of 30 seconds. After the timeout the IDE will gracefully close the compiler and issue a timeout message. All previous IDE would could 'lock' up.

  • Added configurable gcbasic_timeout setting for GCBASIC task execution, defaulting to 30 seconds.

  • Added "GCBASIC Timeout" menu item under IDE Settings/Logging to set timeout (range 5-999 seconds).

  • Updated save_settings and load_settings to handle gcbasic_timeout persistence.

  • Modified set_gcbasic_timeout dialog to use "GCBASIC Timeout" title and enforce 5-999 second range.

Build 28.05.2025

Enhancements:

  • Change behaviour of Help / License to load the license.txt file from the application local folder.

  • Added Enum to language file.

  • Add RAR to DIST folder.

Build 27.05.2025

New:

  • Added Installing_and_Using_GCBASIC_Essential_IDE.adoc. This covers how to create your own installation of develop the SuperIDE.

Enhancements:

  • Modified the default IDE window size for new installations to 80% of the primary screen’s width and height, centered on the screen, by updating the set_default_geometry method. This replaces the previous fixed 800x600 size, providing a more proportional and user-friendly window size based on screen resolution.

  • Updated the Button Bar’s initial position for new installations to be horizontally centered on the screen (aligned with the Editor’s center) and vertically aligned with the menu bar’s Y position, by modifying the init_button_bar method. This ensures the Button Bar is prominently placed within the IDE’s client area.

  • Enhanced the print behavior to apply syntax highlighting to the entire .GCB file before printing, ensuring all content (e.g., #chip 16f88) is formatted correctly in the output. Added highlight_all_blocks method to SyntaxHighlighter to format all document blocks and print_file method to IDE to trigger full highlighting for .

Build 26.05.2025

Fixed:

  • Demo Files Not Loading on New Install. Resolved an issue where demo files (first-start-sample.gcb and This is useful list of tools for the IDE.txt) were not loaded during a new installation.

    The problem was caused by `populate_tasks_menu()` calling `get_tasks_file_path()`, which indirectly triggered `save_settings()` via a font-related side effect (likely `set_editor_font()`), creating `ide_settings.json` before `load_settings()`. This prevented `first_time_settings` from being set to `True`, skipping `open_demo_files()`. The fix defers tasks file loading to a new `load_and_populate_tasks()` method called after `load_settings()`, adds error handling in `populate_tasks_menu()`, and uses a `_tasks_loaded` flag to ensure tasks are populated only after settings are loaded. Issue identified through terminal logs showing premature `save_settings()`; fix ensures `open_demo_files()` runs as intended.
  • The missing This is useful list of tools for the IDE.txt will still log an [ERROR] if not present in C:\GCstudio\gcbasic\demos\, but first-start-sample.gcb now loads correctly.

Build 25.05.2025

Improvements:

  • Fixed an issue where syntax highlighting did not update when typing content like #chip 16f88 into an empty .gcb file, despite correct highlighting after saving and reopening.

  • Enhanced SyntaxHighlighter.on_contents_change to correctly register modified blocks and log changes for debugging. Updated SyntaxHighlighter._apply_highlighting to clear highlighted_blocks for modified blocks and highlight all visible blocks when no pending changes are detected, ensuring real-time syntax updates for typed content.

  • Fixed an edge condition where a partially shown bottom line in the Editor was not highlighted. Modified SyntaxHighlighter._apply_highlighting to extend the visible range to include partially visible lines by using the viewport’s bottom-right position and checking the next block’s position, ensuring all visible content, including partially shown lines, is updated with syntax highlighting.

  • Updated language file to improve color management

Build 24.05.2025

Enhancements:

  • Added a font chooser to the Settings/Appearance menu, implemented in the IDE class’s init_ui method with a new set_editor_font method. The chooser uses a custom QDialog with a QComboBox to display only monospaced font names (e.g., Consolas, Courier New, Unispace), defaulting to Consolas, enhancing accessibility for users preferring specific monospaced fonts for coding. The selected font is applied to both the Editor (CustomTextEdit) and Line Numbering (LineNumberArea), saved in ~/.superide/ide_settings.json under editor_font, and restored on IDE restart.

  • Ensured robust restoration by updating the load_settings loop to iterate over all settings keys with error handling and simplifying editor_font validation to use case-insensitive font matching, preventing issues with fonts like Unispace not being recognized on startup.

Build 23.05.2025

Enhancements:

  • Added "UpperCase" (Ctrl+U) and "LowerCase" (Ctrl+L) menu items to the Edit menu, implemented in the IDE class’s init_ui method with new upper_case and lower_case methods, allowing direct case conversion of selected text.

Bug Fixes:

  • Fixed button bar not restoring to its saved vertical position, including positions at the screen’s top, by updating the init_button_bar method to use the screen’s geometry (QApplication.primaryScreen().availableGeometry()) instead of the parent window’s geometry for vertical bounds, ensuring consistent position restoration.

Build 21.05.2025

Enhancements:

  • Added "Report Issue" menu item under the Help menu to open https://github.com/GreatCowBASIC/GCBIDE/issues in the default web browser, enabling users to directly access the GitHub issues page for reporting bugs or feature requests. Implemented with a new open_url method in the IDE class for consistent URL handling and logging.

  • Added "Latest Release" menu item under the Help menu to open https://github.com/GreatCowBASIC/GCBIDE/releases/tag/SuperIDE in the default web browser, allowing users to check the latest IDE version. Utilizes the same open_url method for URL opening and terminal logging.

Build 20.05.2025

Button Bar Improvements:

  • Updated button bar icon handling to use ~/.superide/gcb-icons/{size}_{size}_icons (e.g., 24_24_icons for default size: 24). Icons are now referenced by filename only in ide_settings.json (e.g., hexflash.png). If ~/.superide/gcb-icons is missing, icons are copied from the application folders gcb-icons directory (e.g., {app_dir}/gcb-icons/24_24_icons). Ensures robust icon management and persistence across installations.

  • Set default button bar shortcuts and icons for new installations: [F5] for "Make HEX and Flash" (hexflash.png), [F6] for "Make HEX" (hex.png), [F7] for "Assemble" (asm.png), and [F1] for "Help" (help.png). Makes setup easier for new users with ready-to-use buttons.

  • Reverted button size adjustment based on PNG image dimensions to use a fixed size from settings (button_bar.size, default 24 pixels). Ensures consistent button sizes; increase size in settings for larger buttons for visually impaired users.

  • Fixed Alt+F4 to hide the button bar and close the IDE in one press, improving usability by ensuring a smooth exit from any focused window. Added focus shifting after button clicks or drags to keep the main IDE window active.

  • Fixed button clicks to reliably trigger tasks (e.g., [F5] for "Make HEX and Flash"), resolving issues where clicks were intercepted by drag-and-drop logic.

Enhancements:

  • Added debug logging for button bar actions (clicks, drags, Alt+F4) with "BC: " prefix, controlled by SHOW_BAR_CONTROL global variable, to help troubleshoot issues.

  • Optimized button bar position saving to occur only on drag release, reducing unnecessary file writes for better performance.

May 19, 2025

Enhancements:

  • Implemented recent files storage in GCstudio.mrf.json, located in the directory specified by os.environ.get("GCBASIC_INSTALL_PATH"), with the path stored in ide_settings.json under recent_files_path. Ensured the file is created if absent and padded to 10 entries for RecentName and RecentDir with empty strings, providing robust persistence and a consistent user experience for recent files tracking.

  • Removed redundant methods TextBlockData.get_text, IDE.T1execute_task, and IDE.show_recent_files_in_settings to streamline the codebase, reducing maintenance overhead, pending confirmation on IDE.set_theme usage.

Bug Fixes:

  • Fixed NameError: name 'entry' is not defined in save_recent_files by correcting the list comprehension to properly index self.recent_files, ensuring RecentName and RecentDir lists in GCstudio.mrf.json are always padded to 10 entries with empty strings, completing the reliable recent files persistence implementation.

May 18, 2025

Enhancements:

  • Added support for remembering the last accessed folder in file operations, storing the directory in self.settings['last_folder'] within open_file_by_path, save_file, and save_file_as. Updated open_file to use last_folder as the default QFileDialog directory, with fallback to the home directory if invalid, enhancing user experience by maintaining folder context across sessions.

  • Enhanced load_settings to initialize last_folder with the user’s home directory if not set, ensuring persistence across sessions.

  • Improved line number area width in CustomTextEdit to dynamically adjust based on document line count, accommodating four-digit line numbers (1000+ lines) using QFontMetrics and a scalable formula, improving readability for large files.

Bug Fixes:

  • Fixed line number truncation at 1000 lines by implementing dynamic width calculation in CustomTextEdit.line_number_area_width, ensuring sufficient space for four-digit line numbers and beyond.

May 17, 2025

Enhancements:

  • Added detailed logging in execute_task to debug ${command:extension.commandvariable.selectedText} placeholder replacement, including raw string and hex representations of arguments.

  • Implemented regex-based placeholder replacement in execute_task using re.sub to handle potential string mismatches or hidden characters, improving robustness.

  • Added warning log in execute_task when the placeholder is present but no text is selected, enhancing user feedback.

Bug Fixes:

  • Fixed persistent ${command:extension.commandvariable.selectedText} placeholder replacement failure in execute_task by using regex to match the placeholder, resolving the issue with task argument substitution.

May 17, 2025

Enhancements:

  • Added get_selected_text method with Ctrl+E shortcut to retrieve selected text.

  • Improved check_external_modifications handling by syncing menu item state in load_settings and guarding check_file_changes calls.

  • Enhanced execute_task to support ${command:extension.commandvariable.selectedText} placeholder replacement with initial list comprehension approach.

Bug Fixes:

  • Fixed external modification setting sync issue for menu item state.

  • Resolved [INFO] def check_file_changes log when check_external_modifications was False by moving log and guarding calls, addressing the check_file_changes invocation issue.

  • Addressed initial placeholder replacement failure in execute_task by correcting list-based replacement, though issues persisted.

May 16-17, 2025

Enhancements:

  • Added single-instance checking with a socket lock to prevent multiple IDE instances, reducing external modification conflicts.

  • Improved external file change detection with refined mtime tracking and user choice persistence in check_file_changes.

  • Enhanced execute_task to launch non-"make" tasks non-modally with subprocess.Popen.

Bug Fixes:

  • Fixed unnecessary save prompts for unmodified files by preserving document modified state during highlighting.

  • Resolved [ERROR] Error executing task: 'IDE' object has no attribute 'user_scrolled' by using self.terminal.user_scrolled.

  • Fixed log display issue for "make" tasks by ensuring all lines of %temp%\gcbasic.log are shown.

  • Corrected reload prompt after save by clearing file cache and updating mtime in save_file and save_file_as, resolving the reload prompt after save issue.

  • Fixed double tab closure by disconnecting/reconnecting tabCloseRequested signal in update_background_after_close, resolving the double tab closure issue.

May 15-16, 2025

Enhancements:

  • Improved syntax highlighting by making GCB.tmLanguage.json patterns case-insensitive.

  • Added F4 shortcut to open the IDE Tasks menu programmatically, resolving the F4 shortcut issue.

  • Enhanced parse_tasks_json to strip comments line-by-line, resolving Tasks to Menu option issue.

Bug Fixes:

  • Fixed QTextCursor::setPosition: Position '174' out of range error in SyntaxHighlighter, resolving a syntax error issue.

  • Corrected comment highlighting for REM and ' REM by reordering patterns in GCB.tmLanguage.json.

  • Resolved broken Undo/Ctrl+Z by grouping formatting operations in SyntaxHighlighter.

  • Fixed console warning about invisible window in IDE Tasks menu by using QMenu.popup.

  • Corrected [WinError 267] for "Make HEX [F6]" task by converting VS Code syntax to Windows-compatible paths in execute_task, addressing duplicate execute_task issues.

Initial Release, Pre-May 2025

Initial Features:

  • Implemented core IDE functionality with QTabWidget for multi-tab editing of .GCB files.

  • Added syntax highlighting via SyntaxHighlighter class using GCB.tmLanguage.json for GCBASIC code.

  • Supported basic file operations: New, Open, Save, Save As, Close, and Print.

  • Included TerminalWindow for logging IDE actions and task outputs.

  • Added menu system with File, Edit, IDE Tasks, IDE Settings, and Help menus.

  • Integrated task execution from tasks.json with support for GCBASIC compiler tasks.

  • Implemented line number display, word wrap, and theme switching (light/dark).

  • Added recent files tracking and settings persistence in ~/.superide/ide_settings.json.

Setting Up Icons and Icon Size

The GCBASIC Essential IDE includes a customizable button bar for quick access to common tasks like compiling and flashing code. This section guides you through setting up the button icons and adjusting their size, especially to support visually impaired users who need larger, clearer buttons.

Configuring Button Bar Icons:

  • The button bar is configured in ~/.superide/ide_settings.json under the button_bar section. By default, it includes four buttons:

    • [F5]: "Make HEX and Flash" with hexflash.png

    • [F6]: "Make HEX" with hex.png

    • [F7]: "Assemble" with asm.png

    • [F1]: "Help" with help.png

  • To customize icons, edit ide_settings.json (e.g., C:\Users\<your-username>\.superide\ide_settings.json):

      ```json
      "button_bar": {
          "button1": "[F5]:hexflash.png",
          "button2": "[F6]:hex.png",
          "button3": "[F7]:asm.png",
          "button4": "[F1]:help.png",
          "size": 24,
          "position": []
      }
      ```
    * Place your icon files (e.g., `hexflash.png`, `hex.png`, `asm.png`, `help.png`) in the IDE’s code directory (e.g., `C:\DDrive\GreatCowBASICGits\GCBIDE\code\`).
    * Ensure icon names match the `buttonX` entries exactly and are PNG files. Use high-resolution images (e.g., 24x24 or larger) for clarity, especially if increasing the button size.
    * Each `buttonX` entry uses the format `[shortcut]:icon.png`, where `shortcut` (e.g., `F5`) links to a task in `~/.superide/tasks.json`.

Adjusting Icon Size for Accessibility:

  • The button size is set by the size field in button_bar (default 24 pixels, creating 24x24 buttons with 20x20 icons).

  • For visually impaired users, increase size to make buttons larger and more visible. For example, set "size": 48 for 48x48 buttons with 44x44 icons:

      ```json
      "size": 48
      ```
    * Save `ide_settings.json` and restart the IDE to apply the new size. The button bar’s height will adjust to `size + 12` (e.g., 60 pixels for `size: 48`), and width will scale based on the number of buttons.
    * Use high-resolution PNGs (e.g., 48x48 or larger) to avoid pixelation when icons are scaled to `size - 4`. Clear, high-contrast icons are recommended for accessibility.
    * Test the button bar after changing `size` to ensure buttons are large enough and icons are legible. If needed, try larger sizes (e.g., 64) for optimal visibility.

Tips for Visually Impaired Users:

  • Choose PNG icons with bold, distinct designs to enhance readability.

  • If the default 24x24 buttons are too small, experiment with size values (e.g., 48, 64) to find the best fit.

  • Ensure tasks.json includes tasks for [F5], [F6], [F7], and [F1] to match the default buttons, preventing errors when clicking buttons.

Troubleshooting:

  • If buttons show numbers (1–4) instead of icons, check that hexflash.png, hex.png, asm.png, and help.png are in the correct directory and match ide_settings.json entries.

  • If a button doesn’t trigger a task, verify the shortcut (e.g., F5) exists in tasks.json.

  • For size issues, confirm size in ide_settings.json is set appropriately and restart the IDE.

Notes

  • All versions maintain compatibility with GCBASIC compiler tasks and .GCB file editing.

  • The IDE uses tasks.json for task configurations, with ongoing improvements in placeholder handling, particularly for ${command:extension.commandvariable.selectedText}.

  • The clarification of if not syntax in Python was provided to support development but did not result in code changes.

  • Future updates may focus on further placeholder support, performance optimizations, enhanced logging for task outputs, confirming the intended use of IDE.set_theme, and addressing libpng warnings for GCstudio.png.

About

This repository for the GCBIDE

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages