Re: NetBeans 8.2 Annotations
Andreas Stefik <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <CABiHOJngVGn6rSYTCki+zdAq5oScC3tbP7=45=hVk-AScsFREQ@mail.gmail.com> |
Wait, I found it, answering my own question. For anyone else that has run into it, the answer appears to be this: FileUIUtils.getImageDecorator(fileObject.getFileSystem()) annotateIcon is then called on that instead. Stefik On Wed, Jan 4, 2017 at 9:03 PM, Andreas Stefik <[email protected]> wrote: > Folks, > > I'm porting an application from NetBeans 8.0.2 to 8.2 (finally) and am > trying to manage a few of the changes that broke backward compatibility. In > 8.0.2, if you had an icon (e.g., like in a logical view provider), you > could annotate it with git annotations or something else like so: > > @Override > public Image getIcon(int type) { > Image icon = ImageUtilities.loadImage( > QuorumProject.QUORUM_PROJECT_ICON); > > if(fileObject != null) { > try { > icon = fileObject.getFileSystem().getStatus().annotateIcon(icon, > type, Collections.singleton(fileObject)); > } catch (FileStateInvalidException e) { > // no fs, do nothing > } > } > return icon; > } > > However, in 8.2, getStatus is a compiler error, it appears. I've dug > around and am aware the methods were removed, but I can't seem to find any > documentation on what the new way to tackle these things is. Does anyone > know? > > Stefik >