How to open native file in external application

I am working on Robert's file browser plugin.  I am trying to open a native file in associated application.
How can I do this?

1 comment
Comment actions Permalink

Following is my solution:

Project defaultProject = ProjectManager.getInstance().getDefaultProject();
FileType fileType = _fileTypeManager.getKnownFileTypeOrAssociate(fileToActivate, defaultProject);
if (fileType != null && fileType instanceof INativeFileType) {
   ((INativeFileType) fileType).openFileInAssociatedApplication(defaultProject, fileToActivate);
else {
   _fileEditorManager.openFile(fileToActivate, _projectSettings.isFocusEditor());

Please sign in to leave a comment.