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 37892

Summary: CloneableEditor should override preferredID()
Product: platform Reporter: Jesse Glick <jglick>
Component: TextAssignee: Petr Nejedly <pnejedly>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P3    
Version: 3.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 37806    

Description Jesse Glick 2003-12-09 14:24:59 UTC
See issue #37806 for details. This issue should be
fixed independently of that issue; it is certainly
not good for the persistence ID for an editor tab
to include display attributes such as the dot in
the file extension, or the modified asterisk, or
who knows what. The ID should be either the base
name of the file, or its absolute path, etc.
Comment 1 Petr Nejedly 2004-01-09 18:58:32 UTC
OK, it would be "really good(tm)" to do it before release.
Guess it is simple ;-)
Comment 2 Petr Nejedly 2004-02-02 13:13:27 UTC
I'd go for base name.
What if the base name changes, do I have to fire a preferredIdChange? ;-)
Comment 3 Petr Nejedly 2004-02-02 13:27:10 UTC
Not as trivial as it seems on the first look because of DataSystems
separation through Envs.
Have to declare protected method and override it.
Comment 4 Petr Nejedly 2004-02-02 15:19:06 UTC
OK, fixed with API addition (protected String CES.documentID(), which
is called from CloneableEditor and defaults to original behaviour
(messageName())
Overriden the method from DataEditorSupport to fetch the info from
DataSystems.

openide/loaders/src/org/openide/text/DataEditorSupport.java,v1.12
openide/src/org/openide/text/CloneableEditor.java,v1.67
openide/src/org/openide/text/CloneableEditorSupport.java,v1.107
Comment 5 Marian Mirilovic 2005-07-13 13:26:00 UTC
closed