This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 247744

Summary: Way to provide custom opening of attachment files
Product: connecteddeveloper Reporter: Tomas Pavek <tpavek>
Component: Issuetracking FrameworkAssignee: Tomas Stupka <tstupka>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0.1   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:

Description Tomas Pavek 2014-10-06 17:17:41 UTC
Currently the files from task attachments are opened either via browser (if they are images) or in the IDE as DataObjects. This is hardcoded in AttachmentsPanel.AbstractAttachment.open(). For JDev we'd need a way to hook into this opening as JDev has the possibility to register external programs for specific file types. Still the opening should not be fully delegated, for files like nps profiler snapshots the current way of opening is correct (and for the images probably as well).

I would suggest to extend IDEServices with a method like:
boolean openExternalFile(File file)
which would give the implementor a chance to open given file their own special way if they want to, then returning true, or not doing anything and returning false which would lead to opening the file the default NetBeans way.