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 - CloneableEditor should override preferredID()
Summary: CloneableEditor should override preferredID()
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords:
Depends on:
Blocks: 37806
  Show dependency tree
 
Reported: 2003-12-09 14:24 UTC by Jesse Glick
Modified: 2008-12-22 18:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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