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.
I need a way to specify for a resource that it should be used but should not be shown in UI and the user should not be able to remove it. Maybe it's ok to show it in classpath customizers. Hint: If ContentDescriptor.getVisualObject() returns null the resource should not be shown in UI.
Pavle, shouldn't this be supported by JavaProject.createResource? I saw you are the author of this API, why didn't you implemented your own request in it? :-) I guess you also need to be able to specify visibility declaratively in project's nature, right?
To replay to your question: because JP.createResource() only delegates to FolderItem.createFolderLink(). What's behing that is a little cryptic to me ;-) After all I think that this should be solved more generally, at the level of projects/ide module. Projects module already provides functionality to hide resources from UI and I think that having 2 ways to achive it would be wrong. Besides this I also think that this will be usefull for other modules then Java. Most importantly, even if the resource is marked as hidden by a module it would be good if the user still could make it visible if she wants to. I posted a similar request to projects-dev yesterday. If there are no objections reassign the issue to projects/ide and publish the attribute that it uses ("isVisible"?) and you are done. The module would of course put the value of "isVisible" into shared settings. (I actually think that it makes no sense to have it private, but that's another issue).
Vito, I suggest to make that an optional UI contract, available from PathResource.getOriginal()'s DataObject. UI visibility stuff does not really belong to data APIs, as createResource() is. [BTW PathResource ought to be a Lookup.Provider :-)] The other idea is to introduce an abstract concept of "system resources", with the UI to decide whether to hide or show such ones. In that case, it would be a parameter to createResource as well as a property of PathResource.
What about adding this to the ProjectMemberVisualDescriptor? This is not a data layer. It is generally available for any type of objects. BTW, Svato: I removed the displayName parameter from createResource because we would have to change this signature every time PMVD is extended. It is better to do smtg like this: PathResource res = jp.createResource ("x", fo); ProjectMemberVisualDescriptor.create (ProjectMember.find (res.getDefinition ().getPrimaryFile ())).setDisplayName ("XXX");
isVisible() and setVisible(...) methods added to ProjectMemberVisualDescriptor.
i've verified all these issues
closing all my verified issues