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 have noticed many uses of Node.Cookie which would better be avaided. So I have filed this bug, but it can be easily closed if you feel that it is complete nonsence. Instead of letting many of your classes and interfaces implement Node.Cookie create one marked interface ProjectCookie or ProjectFeature, etc. that extends Node.Cookie and all other classes that right now extends Node.Cookie would inherit from ProjectFeature. There are two advantages. First of all it is possible to find out all cookies in project. Just by asking for all subinterfaces of your interface. Also it easier to eliminate the Node.Cookie in future, it is mentioned just in one class, to the patching is less complicated.
Good point, Node.Cookie is used in classes which we need to return from getCookie methods. Do you think that ProjectFeature interface could be non-public part of API, then we could simply remove it after some time when we will support backward compatibility by patching.
I am not sure if "non-public" part of the API is the best, I hate API that refers to non-public classes, but I've got an idea: We could use bytecode patching for this purpose. class ProjectCookie implements Node.Cookie { } would be the nonpublic API and for example: public class ProjectDescriptor extends Object would be patched to extend ProjectCookie instead of Object. That way you could return the instance from getCookie and nobody could rely on it to implement the Node.Cookie Please see openide/build.xml for a syntax for patching PS: Not sure if all your uses of Node.Cookie are from abstract classes or if there is also a use from interfaces. If the later, I would have to improve the patching to alter not just superclass but also superinterfaces.
Sounds good, I'll do it.
Done. The Node.Cookie has been removed from projects public API, classe which implemented Node.Cookie are patched in runtime to implement this tagging interface so they still can be obtained from Node.getCookie method. If I understand it correctly this will not be neccasary when new Actions and Datasystems API will be done (cookies will be replaced by Lookup). The BuildTargetDependency interface still extends Node.Cookie since runtime patching doesn't work yet for interfaces (see issue #28022). This interface will be moved to projects/compilation module anyway and it doesn't affect projects core API, so I am closing this issue.
Node.Cookie is gone as far as I know.
As described in http://www.netbeans.org/servlets/ReadMsg?msgId=619519&listName=nbdiscuss the current work on projects prototype has been stopped. Marking issue as CLOSED.