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

Drag and drop for navigation folders, please! #5159

Closed
ricardoba13 opened this issue Sep 28, 2019 · 8 comments · Fixed by #5438
Closed

Drag and drop for navigation folders, please! #5159

ricardoba13 opened this issue Sep 28, 2019 · 8 comments · Fixed by #5438
Assignees
Labels
difficulty-03-duck Involves more challenging problems and/or developing within and revising the internals API enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-code-explorer up-for-grabs Use this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky user-experience Issue relates to user experience (workflow, flexibility, customisation) user-interface This issue explicitly relates to the visible interface of Rubberduck. wpf Issue is easier to resolve with knowledge of WPF/XAML

Comments

@ricardoba13
Copy link
Contributor

Justification
When working on a somewhat big project, having the option to drag and drop modules to move them across folders is really a necessity.

Description
I would love to be able to select say two modules from one folder and use the darg and drop feature within the code explorer and move things as needed.

Additional context
When refactoring it is almost certain that modules will make more sense to also change their context in the project's tree.

@ricardoba13 ricardoba13 added the enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. label Sep 28, 2019
@retailcoder retailcoder added feature-code-explorer good first issue Want to contribute? That's a good place to start! hacktoberfest Tags issues for Hacktoberfest 2019 up-for-grabs Use this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky user-experience Issue relates to user experience (workflow, flexibility, customisation) user-interface This issue explicitly relates to the visible interface of Rubberduck. wpf Issue is easier to resolve with knowledge of WPF/XAML difficulty-03-duck Involves more challenging problems and/or developing within and revising the internals API labels Sep 28, 2019
@retailcoder
Copy link
Member

Definitely! What makes this complicated, is that folders don't really exist: they're parsed from annotation comments in modules, so what we're looking at is something like...

  • Get the Declaration for the selected node(s)
  • Get the annotation for the target folder
  • Use a rewriter session and an annotation rewriter to alter the @Folder annotation
  • Reparse

@retailcoder retailcoder removed the good first issue Want to contribute? That's a good place to start! label Sep 28, 2019
@retailcoder
Copy link
Member

A bit involved internal API wise for a "good first issue" I guess

@SmileyFtW
Copy link

Would like to be able to drag & drop from one project to another as well... similar to what can be done in Project Explorer, only better: multiple modules instead of one at a time.

@retailcoder
Copy link
Member

@SmileyFtW good idea! So:

  • Get the Declaration for the selected node
  • Get the parent project of the target node
  • Get the annotation for the target folder
  • Use a rewriter session and an annotation rewriter to alter the @Folder annotation
  • If not the same project:
    • Suspend automatic parsing
    • Export/delete the source module
    • Import back into target project, restore automatic parsing
  • Reparse

@MDoerner
Copy link
Contributor

ref #3332

@SmileyFtW
Copy link

It would be a "nice to have" to be able to decide if it is a "move" or a "copy" when taking modules to a different project. I would think that more often than not it would be a copy (like PE does), but there might be times when "move" is the desired action (i.e. delete from source after copy to target)

@retailcoder
Copy link
Member

I think I would make Ctrl+drop be a copy, and standard drag-and-drop be a move.

@bclothier bclothier removed the hacktoberfest Tags issues for Hacktoberfest 2019 label Nov 5, 2019
@MDoerner MDoerner self-assigned this Mar 21, 2020
@MDoerner
Copy link
Contributor

MDoerner commented Mar 21, 2020

I would like to pick this up, but put a restriction on what goes into the feature. I will exclude all the things added to this issue after the initial post. More precisely, the drag and drop will only affect the folder and nothing else.

If anybody feels that these should be added, please open a separate issue for things actually copying and moving components in the VBE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty-03-duck Involves more challenging problems and/or developing within and revising the internals API enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-code-explorer up-for-grabs Use this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky user-experience Issue relates to user experience (workflow, flexibility, customisation) user-interface This issue explicitly relates to the visible interface of Rubberduck. wpf Issue is easier to resolve with knowledge of WPF/XAML
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants