|
Re: Open external file into rcp [message #974182 is a reply to message #973454] |
Tue, 06 November 2012 23:00 |
|
Hello Yumin,
There are several ways to pass information to different views.
So you want to open files in a certain view and then pass the filenames to a different view, right?
The quick&dirty method would be offering a setter for filepaths in the view, which should get those filepaths and then make the view with the filedialog use this setter.
IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
List<String> filePaths = ....
IViewReference viewWithFilePathSetterReference = activePage.findViewReference(ViewWithFilePathSetter.ID);
if(viewWithFilePathSetterReference != null){
IViewPart viewWithFilePathSetter = viewWithFilePathSetter.getView(true);
if(viewWithFilePathSetter instanceof ViewWithFilePathSetter){
((ViewWithFilePathSetter)viewWithFilePathSetter).setFilePaths(filePaths);
}
}
Best regards,
Simon
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03386 seconds