Community
Participate
Working Groups
M6 The FileSystemContributor has a method browseFileSystem(String initialPath, Shell shell) which is used to prompt for a location using the browse button. This method does not give suffecient information. In many cases (including our default case) you need to know the resource type you want to browse for and you may want some other information to seed your browsing method with (a descrption message in our case). I am proposing that we deprecate the existing API /** * Browse the file system for a URI to display to the user. * @param initialPath The path to initialize the selection with. * @param shell The shell to parent any required dialogs from * @return URI if the file system is browsed successfully or * <code>null</code> if a URI could not be determined. */ public abstract URI browseFileSystem(String initialPath, Shell shell); and replace it with /** * Browse the file system for a URI to display to the user. * @param initialPath The path to initialize the selection with. * @param shell The shell to parent any required dialogs from * @param the {@link IResource} type to browse for. One of {@link Resource#PROJECT}, * {@link IResource#FOLDER},{@link IResource#FILE},{@link IResource#ROOT} * @return URI if the file system is browsed successfully or * <code>null</code> if a URI could not be determined. */ public URI browseFileSystem(String initialPath, Shell shell,int type,Object properties)
After talking to John we have decided on a simpler API addition and no deprecation of existing API /** * Browse the file system for a URI to display to the user. * * @param shell * The shell to parent any required dialogs from * @param properties * The {@link Map} of properties used for browsing. * @return URI if the file system is browsed successfully or * <code>null</code> if a URI could not be determined. * @see #MESSAGE_PROPERTY * @see #INITIAL_PATH_PROPERTY * @see #FILE_NAME_PROPERTY * @see #TYPE_PROPERTY */ public URI browseFileSystem(Shell shell, Map properties))
Created attachment 37537 [details] Patch using the new API
Deferred to 3.3 until we have more clients with input so that we can make better API.
*** Bug 137879 has been marked as a duplicate of this bug. ***
Does anyone think we should do anything different than the suggested new API? The API freeze is M5 so this needs to be commited before then.
I am going to hold off on this as no one seems to have an opinion on whether or not we should proceed.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.