Skip to content

Add split editor functionality - #54

Open
rakasha681 wants to merge 2 commits into
jakepoz:masterfrom
rakasha681:feat-split-editor-windows
Open

Add split editor functionality#54
rakasha681 wants to merge 2 commits into
jakepoz:masterfrom
rakasha681:feat-split-editor-windows

Conversation

@rakasha681

Copy link
Copy Markdown
Contributor

Implements issue #53

  • Right click a tab to open in other view.
  • Once the other view exists, can drag any tabs between them.
  • Added split editor orientation (Side by side, Stacked) in OptionsShell.
  • Updated configuration handling for split orientation in the main application.
  • Added keyboard shortcuts to toggle split orientation and split editor view.
  • Added view menu with split controls
  • Added a method in ReportComposite to re-point report views between editor panes.
  • Extracted existing pane management to EditorPaneManager.java consolidate control and avoid future drift

Add a "folding" style element and an Editor Options toggle so the fold gutter's appearance and availability can be customized, building on thenew folding feature.

Style-driven appearance (FoldingManager, styles/*.xml):
- Fold icon color now reads <folding fgColor="..."/> from the active style instead of a hardcoded gray, resolved the same way as syntax colors and refreshed live on a theme change.
- Icon shape is selectable via shape="triangle" (default) or shape="plusminus" for boxed +/- markers.
- Always-on guide lines run from each expanded block's icon down to its end line (with an end foot), colored by <folding guideColor="..."/>, defaulting to the icon color dimmed toward the editor background.
- All bundled themes gain a <folding> element with instructional comments documenting these attributes; dark ships with plusminus as a default.

Enable/disable option (OptionsShell, Config, EditorComposite, MainShell):
- New "Enable code folding" checkbox under "Display line numbers", defaulting to enabled. When off, editors open without a FoldingManager, so icons, hotkeys, the fold gutter, and unfold-on-save all go inert via the existing null-guards.
- Disabling and saving unfolds all open editors and tears down their fold gutter live (FoldingManager now unregisters its listeners on dispose); enabling applies on next editor open to preserve listener ordering.
- The setting is stored inverted (foldingDisabled) so existing serialized configs, which predate the field, still default to enabled.
- Right click a tab to open in other view.
- Once the other view exists, can drag any tabs between them.
- Added split editor orientation (Side by side, Stacked) in OptionsShell.
- Updated configuration handling for split orientation in the main application.
- Added keyboard shortcuts to toggle split orientation and split editor view.
- Added view menu with split controls
- Added a method in ReportComposite to re-point report views between editor panes.
- Extracted existing pane management to EditorPaneManager.java consolidate control and avoid future drift
@rakasha681

Copy link
Copy Markdown
Contributor Author

PR automatically includes the previous still open PR since i based this branch off those changes, but that will drop out of history/PR if that one's merged at some point to make review easier on this one.

Honestly, not much new code, i was surprised, I expected to have to do more work :D Almost everything needed was already implemented and just needed to be tied together. Added handling for the split view relating things, but almost everything else was copy/paste & find/replace with extracting the pane manager to its own centralized home to avoid drift and updating the ~200 callers from 'mainfolder' to 'activeFolder'.

@thechillman422

Copy link
Copy Markdown
Collaborator

WOW you make it sound so easy :D
I will start testing this after I commit PR#52 next week. Thanks again. I think I need to buy you a cup of coffee :)

@rakasha681

Copy link
Copy Markdown
Contributor Author

I take requests if theres any other features you wish it had, the more impossible it seems, the more fun it is :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants