-
Enhancement
-
Resolution: Fixed
-
P4
-
None
This a follow-up of RT-27772.
In RT-27772 we have considered app-scope bookmark only. Although it's a good first step,
in the middle term we may not avoid dealing with *document-scoped* bookmark. Moreover
bookmarks may also involved during drag and drop sessions.
Based on what has been done in RT-27772, I've extended the spec to cover the
two elements above.
MacFileNSURL class
==================
Two new methods would be required:
class MacFileNSURL {
/* #1 */ public byte[] getDocumentScopedBookmark(MacFileNSURL baseDocument);
/* #2 */ static MacFileNSURL createFromBookmark(byte[] bookmarkBytes, MacFileNSURL baseDocument);
}
Method #1 would invoke:
- (NSData *) bookmarkDataWithOptions: (NSURLBookmarkCreationOptions) options
includingResourceValuesForKeys: (NSArray *) keys
relativeToURL: (NSURL *) relativeURL
error: (NSError **) error;
with the following arguments:
options = NSURLBookmarkCreationWithSecurityScope
keys = nil (or empty array)
relativeURL = <NSURL associated to 'baseDocument' MacFileNSURL instance>
=> that should create a read-write document scoped bookmark
Method #2 would invoke:
+ (id) URLByResolvingBookmarkData: (NSData *)bookmarkData
options: (NSURLBookmarkResolutionOptions) options
relativeToURL: (NSURL *) relativeURL
bookmarkDataIsStale: (BOOL *) isStale
error: (NSError **) error;
with the following arguments:
bookmarkData = the bytes from "bookmarkBytes"
options = NSURLBookmarkResolutionWithoutUI | NSURLBookmarkResolutionWithSecurityScope
relativeURL = <NSURL associated to 'baseDocument' MacFileNSURL instance>
=>that should decode the bookmark bytes generated by method #1
Clipboard class
===============
class javafx.scene.input.Clipboard {
public List<java.io.File> getFiles();
}
When "glass.macosx.enableFileNSURL" property is set, Clipboard.getFiles()
should return MacFileNSURL instances (using MacOS X call [NSURL URLFromPasteboard]).
In RT-27772 we have considered app-scope bookmark only. Although it's a good first step,
in the middle term we may not avoid dealing with *document-scoped* bookmark. Moreover
bookmarks may also involved during drag and drop sessions.
Based on what has been done in RT-27772, I've extended the spec to cover the
two elements above.
MacFileNSURL class
==================
Two new methods would be required:
class MacFileNSURL {
/* #1 */ public byte[] getDocumentScopedBookmark(MacFileNSURL baseDocument);
/* #2 */ static MacFileNSURL createFromBookmark(byte[] bookmarkBytes, MacFileNSURL baseDocument);
}
Method #1 would invoke:
- (NSData *) bookmarkDataWithOptions: (NSURLBookmarkCreationOptions) options
includingResourceValuesForKeys: (NSArray *) keys
relativeToURL: (NSURL *) relativeURL
error: (NSError **) error;
with the following arguments:
options = NSURLBookmarkCreationWithSecurityScope
keys = nil (or empty array)
relativeURL = <NSURL associated to 'baseDocument' MacFileNSURL instance>
=> that should create a read-write document scoped bookmark
Method #2 would invoke:
+ (id) URLByResolvingBookmarkData: (NSData *)bookmarkData
options: (NSURLBookmarkResolutionOptions) options
relativeToURL: (NSURL *) relativeURL
bookmarkDataIsStale: (BOOL *) isStale
error: (NSError **) error;
with the following arguments:
bookmarkData = the bytes from "bookmarkBytes"
options = NSURLBookmarkResolutionWithoutUI | NSURLBookmarkResolutionWithSecurityScope
relativeURL = <NSURL associated to 'baseDocument' MacFileNSURL instance>
=>that should decode the bookmark bytes generated by method #1
Clipboard class
===============
class javafx.scene.input.Clipboard {
public List<java.io.File> getFiles();
}
When "glass.macosx.enableFileNSURL" property is set, Clipboard.getFiles()
should return MacFileNSURL instances (using MacOS X call [NSURL URLFromPasteboard]).