Skip to content

[NETBEANS-3193] Support remote files in Open Recent File menu #1543

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SiddheshRane
Copy link
Contributor

This patch replaces system dependent file paths with URLs
and FileUtil.toFileObject with URLMapper.findFileObject to enable
opening remote files from Open Recent File menu

This patch replaces system dependent file paths with URLs
and FileUtil.toFileObject with URLMapper.findFileObject to enable
opening remote files from Open Recent File menu
@SiddheshRane
Copy link
Contributor Author

This commit changes the format of file paths in recent files list stored on disk. If a user updates this module, then the first time none of the recent files will be able to open as they are in old format. The recent list will get cleared. After that recent list will populate with newly closed files and work normally.

A smoother transition can be provided in which URLs are constructed with context new URL(<url of C: or />, <url or file path in recent list>), although I am not sure whether it would be necessary

@neilcsmith-net neilcsmith-net added this to the 11.3 milestone Oct 14, 2019
Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

While I see the use case, this changeset is IMHO not a good fit for a solution. Much of the code is run on the event dispatching thread. File access is bad enough, but at least you can pretent that a local disk is always fast an snappy (yeah...)
But this change introduces potentially much higher delays (think laggy networks). I don't think this is a good idea as is.

@SiddheshRane
Copy link
Contributor Author

File access was already present in the original code and also in the current releases of netbeans. The only change I have made is replace file paths with URL schemes.

I do think the overall history handling could benefit from code overhaul. But what alternative remains to support remote files? This may become more important, now that talks of a cloud based netbeans are ongoing.
Please suggest me if you have any workarounds.

@matthiasblaesing
Copy link
Contributor

Ok - for me local file access and network access fall into to different categories:

For local file access you can normally expect quick responses and thus get away with running it on the EDT. To be clear: It should not be done on the EDT (virus scanners, mounted network drives), but it can work.

For the remote part all bets are off. If you are on a high latency link round trip times in the range of seconds are possible and this is a no-go on the EDT.

The suggestion I have: Move things that may be caught doing high latency work into a background thread (RequestProcessor).

@ebarboni
Copy link
Contributor

@matthiasblaesing can we move to 12.0 ?

@matthiasblaesing matthiasblaesing removed this from the 11.3 milestone Jan 30, 2020
@matthiasblaesing
Copy link
Contributor

@ebarboni yes - I have removed the milestone, as said in the review for me having this on the EDT sounds dangerous, so this is work in progress.

@mbien mbien added the stale No recent activity - likely to be closed. label Jul 18, 2022
@Chris2011
Copy link
Contributor

Hey @SiddheshRane are you still want to change the things as requested?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale No recent activity - likely to be closed. work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants