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 16278 - Name of copied service type is not correctly displayed
Summary: Name of copied service type is not correctly displayed
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-05 12:39 UTC by Petr Slegr
Modified: 2008-12-22 22:37 UTC (History)
1 user (show)

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 Petr Slegr 2001-10-05 12:39:09 UTC
[dev-20011005]

Name of copied service type is not correctly displayed. Possible disturbance of 
user.

1. Copy e.g. External Execution type to its package, i.e. somethinq like
External Execution_1 should be created. But the name of new object is the same.

2. When you press F2 to rename name with underscore and number is displayed.

(Q: Why these nodes haven't rename action?)
Comment 1 Svata Dedic 2001-10-10 15:22:35 UTC
Actually a bug in core's implementation of setting node
Comment 2 Svata Dedic 2001-10-10 15:23:23 UTC
Vita has agreed to take this one...
Comment 3 Svata Dedic 2001-10-10 15:55:59 UTC
Further information --
The thing is actually handled in org.openide.loaders.InstanceNode. 
My fault, I still live in old times when these things were in the 
core.
There's an interesting thing: Editing is done by TreeViewCellEditor 
(org.openide.explorer.view) which wants to editnode's getName(). 
Node.getName() is also used in NodeOp for node navigation and OTOH 
the getName() is supposed to be identifying, immune to localization. 
I don't know whether getName() can be changed to return, for 
.setting files with getDisplayName(), the display name - so the 
CellEditor is happy. For such settings, the display name is 
identifying, isn't it ?
Comment 4 Vitezslav Stejskal 2001-10-22 14:28:09 UTC
Reassigning to Honza.
Comment 5 Jesse Glick 2001-10-22 21:03:01 UTC
I could try to fix this if you don't have time for it... just assign
it to me if you want to.
Comment 6 Jaroslav Tulach 2001-10-23 10:59:09 UTC
I'll try it.
Comment 7 Jaroslav Tulach 2001-10-24 14:48:10 UTC
I'm out of time. Another two bugs, Honza, Jesse please take it.
Comment 8 Jesse Glick 2001-10-24 15:27:56 UTC
I will look at it.
Comment 9 Jesse Glick 2001-10-25 12:18:26 UTC
Fixed. Needed to override handleCopy similarly to
handleCreateFromTemplate in InstanceDataObject. Note that renaming the
original service still displays the internal name; I don't know if
this is fixable. But it should be less common to want to rename the
original. At least making a new one, via either template (recommended)
or by copying (as here) should behave reasonably.

1.77 openide/src/org/openide/loaders/DataLoaderPool.java
1.92 openide/src/org/openide/loaders/InstanceDataObject.java
1.16 openide/src/org/openide/loaders/InstanceNode.java
Comment 10 Marian Mirilovic 2002-01-22 12:22:40 UTC
verified in 3.3. , closed