> TC ID must be unique. If TC is persistent it is usually defined in
> module layer. This way TC has its own fixed and unique ID which can be
> used
> to get TC instance.
>
> If you have TC which is not singleton and you create its instances in
> runtime then its actual ID can be (and will be) different from string
> returned
> from method TC.preferredID. Eg. if you create first instance of this
> TC class which returns "mytc" from preferredID then winsys first looks
> in its set of used IDs if this ID is already used:
> a) if not actual TC ID will be "mytc". If yes then winsys tries to add
> number suffix "_X" till it is unique.
> b) If you create second TC instance and first instance has ID "mytc"
> then second instance will get ID "mytc_1".
>
> You can get ID for TC instance using
> WindowManager.getDefault().findTopComponentID(TopComponent)
>
> If you have persistent type PERSISTENCE_ALWAYS then TC will live
> forever once you dock it into any mode (ie. register it
> in winsys). There is currently no way how to 'unregister' persistent
> TC from winsys once it is docked into any mode.
>
> Marek
Now it is much more clear the mechanism, there is a way to avoid it to
appear the message like: "INFO [org.netbeans.core.windows.persistence]:
[PersistenceManager.getTopComponentForID] Problem when deserializing
TopComponent for tcID: 'test'. Reason: Top component test could not be
located or loaded from Components folder. "?
(I set the PersistenceType to PERSISTENCE_NEVER )
That appears when I try to find through the WindowManager, a
TopComponent that still has not been created. (I must see before a
creation of TopComponent, if the component had already been created)