Repository navigation
Added file drag-n-drop for opening them - #3731
RobertoRoos wants to merge 2 commits into
Conversation
|
I am completely new to Java and Phoebus, so I just started somewhere. The current version is extremely rough. |
| toolbar = createToolbar(); | ||
| createTopResourcesMenu(); | ||
|
|
||
| menuBar.setOnDragOver(e -> { |
There was a problem hiding this comment.
What would be a good location to put this event method? Because the event-handler should be shared, as I would like it to be called from other panels too.
|
|
@RobertoRoos, could you please resolve merge conflicts as advertised by Github? |
41c0f64 to
21c82e6
Compare
I couldn't get the merge done, as I don't understand the codebase. But I just started from scratch, copying some changes. I backed-up the original branch here: https://github.com/RobertoRoos/phoebus/tree/archive/feature/file-drag-drop-before-rebase
|
| if (event.getDragboard().hasContent(DockItem.DOCK_ITEM)) | ||
| result = handleDropDockItem(event); | ||
| // else if (event.getDragboard().hasFiles()) | ||
| // result = handleDropFile(event); |
There was a problem hiding this comment.
@georgweiss this would override the option of dragging a .bob file into an editor to embed it. How could I prioritize the embedding behavior over opening the file?
EDIT: I see this 'embed' d-n-d is done from WidgetTransfer.addDropSupport(), not from a DockPane subclass or something, that's a little tricky.
Can we find from this whether the dock contains an editor?
|





Added feature to allow drag-and-drop of files to open them.
Resolves #3730
Checklist
Testing:
Documentation: