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 52760 - Multiple vendor files not correctly identified on save dialog
Summary: Multiple vendor files not correctly identified on save dialog
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 8 (show other bugs)
Version: 4.x
Hardware: All All
: P4 blocker (vote)
Assignee: _ pcw
URL:
Keywords:
Depends on: 53030
Blocks:
  Show dependency tree
 
Reported: 2004-12-22 00:39 UTC by Rochelle Raccah
Modified: 2007-08-27 19:54 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 Rochelle Raccah 2004-12-22 00:39:25 UTC
Modify sun-cmp-mappings content instead of
sun-ejb-jar.xml using the sun-specific editor. 
Now quit the IDE.  You will see sun-ejb-jar.xml
listed in the unsaved files, but not sun-cmp-mappings.
Comment 1 Nam Nguyen 2004-12-22 03:21:28 UTC
With the current code, both files are shown in the exit dialog.  So
the current behavior is like this.  Change in any part, even the
changed properties are stored in one of the config file, all files
(DataObjbect's) are shown as need save.  

This is because the config editor and the underlygin
ConfigurationStorage is designed to represents all configuration files
as a whole.  In the config editor there is no indications about from
which file the config properties came from.

To indicate accurately which file needs save, we would needs
additional SPI for plugin to tell j2eeserver the config descriptor
file a DConfigBean instance belongs to.  Something like:

ConfigurationSupport {
    String getDeploymentPlanFileFor(DConfigBean configBean);
}

I guess this is not a high priority and would leave this at P3.
Comment 2 Rochelle Raccah 2004-12-22 04:33:02 UTC
Is this new behavior?  I have a build from last night and only see
sun-ejb-jar.xml in the exit dialog.
Comment 3 Nam Nguyen 2004-12-22 04:47:31 UTC
The checkin was 2004/12/20 around 17:54 (I guess PST).
Comment 4 Rochelle Raccah 2004-12-22 17:17:57 UTC
I updated my build again and now I have seen both ways in the same
build.  I'm not sure exactly what the difference is, but
sun-ejb-jar.xml always shows up in the list while sun-cmp-mappings
does sometimes.  Also, I tried to close the project with mods to
sun-cmp-mappings and only see sun-ejb-jar.xml.  So I think there are
still both problems here.
Comment 5 Rochelle Raccah 2005-03-17 02:48:12 UTC
I think this is worse now - I only see save (menu) enabled on sun-ejb-jar, not
sun-cmp-mappings.  I only see sun-ejb-jar in the Save/Discard/Cancel dialog and
in the saved files dialog on close project/exit.  However, both files, do get saved.
Comment 6 Sherold Dev 2005-03-18 13:36:05 UTC
OK, I can then change the standard 
 
"File sun-ejb-jar.xml is modified. Save it?" 
 
dialog to 
 
"Files sun-ejb-jar.xml, sun-cmp-mappings.xml are modified. Save them?" 
 
Do you agree? 
 
 
I agree that the sun-cmp-mappings.xml should be also displayed in the save 
files dialog on close project/exit. 
 
Setting TM to 4.1. 
Comment 7 Rochelle Raccah 2005-03-18 19:32:54 UTC
Maybe it should say Sun Configuration Files have changed.  Sometimes only one is
edited, sometimes both.  I'm not sure if you're able to tell which case it is.  

See issue 53030: If you change the editor tab name, I think the file save dialog
message will come from there.
Comment 8 Sherold Dev 2005-03-23 10:02:49 UTC
> I'm not sure if you're able to tell which case it is. 
No, I'm not. It would require an API change as Nam already pointed out. 
 
I agree that the save message should correspond with the editor tab name. 
Comment 9 Sherold Dev 2005-09-18 10:59:04 UTC
this should be now fixed in the sunappserv plugin
Comment 10 Vince Kraemer 2005-09-29 00:14:38 UTC
looks like this got shunted to us based on the j2eeserver api changes.
Comment 11 _ pcw 2005-11-08 01:51:29 UTC
Fixed.  Now says "sun-ejb-jar.xml / sun-cmp-mappings.xml" on editor tab.

It would be nice if this was really dynamic and only included the cmp-mappings
part if that file either existed or was going to exist, but that is lots of work
for very little gain.  Not worth it IMO, especially since we are revamping
entire framework in next version.
Comment 12 Rochelle Raccah 2005-11-17 21:04:48 UTC
I just tried in NB 5 Beta 2:
open the config editor
editor tab has the new name with both files listed - good
make a change to consistency level for a bean (lives in sun-cmp-mappings data)
editor tab name changes to "sun-ejb-jar.xml*" - wrong name
click on the close icon in the editor tab - warning is only about sun-ejb-jar -
wrong name
I didn't try to exit the ide, but the 2 steps above indicate that the fix is not
complete yet.
Comment 13 Rochelle Raccah 2005-11-17 21:12:18 UTC
I had to exit the ide anyway, so I saw that it identifies on sun-ejb-jar.xml as
changed in that dialog, when in fact only sun-cmp-mappings has changes.
Comment 14 Rochelle Raccah 2005-11-17 21:19:58 UTC
I also noticed that the tooltip points to the location of the sun-ejb-jar.xml
(only) even when the tab name lists both files.
Comment 15 _ ludo 2005-11-18 05:08:11 UTC
To be fair, the fact we have 2 files instead of one is more a design issue with
the Sun App server that the IDE.
Netbeans tries to hide the DD files as much as possible.
Exposing more and more that for Sun App server we have 2 DD files is the wrong
direction.
P4 for netbeans. Maybe p2 for the CMP area of the app server, imo.
Comment 16 _ pcw 2005-11-18 07:55:45 UTC
Agree that this is P4.

However, for correctness:  Currently, it is only practical to group both files
together for all messages, regardless of where the actual changes are reflected.
Comment 17 Rochelle Raccah 2005-11-18 19:17:59 UTC
For messages, okay that they're both mentioned. But in the exit dialog, the
files are listed as nodes with a save button that can be enabled/disabled based
on which nodes are selected. In that case, I expect only the edited files to be
mentioned.
Comment 18 Jaroslav Pospisil 2006-03-13 13:49:27 UTC
TM 5.0->TBD
Comment 19 _ pcw 2007-08-27 19:54:19 UTC
Fixed by virtue of new design.  sun-ejb-jar.xml and sun-cmp-mappings.xml are now independent editors.