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 41178 - Properties file can't be saved except by "Save all..."
Summary: Properties file can't be saved except by "Save all..."
Alias: None
Product: utilities
Classification: Unclassified
Component: Properties (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker with 1 vote (vote)
Assignee: Jan Stola
Keywords: RELNOTE
: 42297 (view as bug list)
Depends on:
Reported: 2004-03-22 07:44 UTC by strzinek
Modified: 2005-07-19 09:52 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

ide.log (10.83 KB, text/plain)
2004-03-25 14:01 UTC, strzinek

Note You need to log in before you can comment on or make changes to this bug.
Description strzinek 2004-03-22 07:44:15 UTC
After changing any value in the properties editor
neither the hotkey CTRL+S nor the save button nor
the file-save menu works (it is disabled). One has
to use "Save all" action to save the bundles.

Tried in beta and RC1 on windows and linux with
j2sdk1.4.2_03 and j2sdk1.5beta.
Comment 1 ehucka 2004-03-22 08:51:25 UTC
It seems that after modification of a property in properties editor
(bottmo textareas) editor doesn't fire fileModified event (or
something similar).

Steps to reproduce:

1. open a properties file
2. select a property in properties editor table (e.g. column Key)
3. edit its key and comment in extareas Key, Comment

Result: appropriate cell's value is changing but properties file is
not set as changed
Comment 2 Jan Chalupa 2004-03-22 16:59:09 UTC
I've just verified that it behaves exactly the same way in NB 3.5.1.
The user can edit a single property without getting the "file
modified" flag updated. However, when a different key/value property
is selected for editing, the flag is updated and the file can be saved
as usual.

I don't agree this is a P1 bug. It's been around for a while and no
one seemed to notice. It's true the user may potential lose changes
made to a *single* property, so I still consider it a high priority
bug that should be addressed soon, though it's probably too late for 3.6.
Comment 3 strzinek 2004-03-23 08:12:46 UTC
I've found it working the same as 3.5.1 and older (I've learnt to live
with issue 30018 mentioned by Jan Chalupa) when I created a new
project and opened a bundle in it. But in my original project with cvs
filesystem imported from 3.5.1 IDE it behaves exactly as I described,
even changing the focus to the next row or any other action doesn't
change the state of the "Save" button, although the state of "Save
all" button changes. I consider it to be a bug which should definitely
be fixed in 3.6 final.

I've found a strange behavior: it behaves incorrectly when I start the
ide with imported project and also when I switch to any other project,
but it behaves as expected when I create a new project (no cvs
filesystem). It is probably related to the imported project (or cvs
filesystem?) somehow.
Comment 4 ehucka 2004-03-23 10:27:57 UTC
Uff, I've reproduced it. It seems it is problem with CVS filesystem.

Steps to reproduce:

1. import a project from NB 3.5 with mounted CVS filesystem
2. open this project
3. restart IDE
4. open a properties file from the imported CVS filesystem

The file cannot be saved after any modification.

Non-CVS filesystems did work right and other types of files too.
Comment 5 Jan Chalupa 2004-03-23 11:02:50 UTC
Martin E., can you please look at that? Could this really be a VCS
filesystem issue?

(Ignore the other issue described in bug #30018. It's clearly a
properties module problem.)
Comment 6 thepriz 2004-03-24 19:01:56 UTC
I am glad that you where able to find this issue. I tried to report it
in issue# 39927. But I didn't know how to reproduce it, but this
sounds exactly like what I was seeing.
Comment 7 thepriz 2004-03-24 19:08:45 UTC
I don't know if this is part of this bug but I have also seen where
after you save the properties file there is still a * in the tab of
the properties file. If it isn't I can submit a new bug.
Comment 8 Martin Entlicher 2004-03-24 20:22:38 UTC
Well, this issue looks quite strange to me. I'm not aware of any
mechanism in VCS modules, that would prevent from saving properties
files specifically.
Is anything in ide.log? Any exception thrown?

I could not reproduce it. Should I use "Open" or "Edit"? Did you mount
JavaCVS filesystem (built-in) or command-line filesystem in 3.5.1?
Comment 9 ehucka 2004-03-25 11:48:12 UTC
I created a project in NB 3.5. There was one VCS (command line)
mounted filesysystem. I imported this project into NB 36 and opened
(Open action) a properties file from the VCS filesystem.
Comment 10 strzinek 2004-03-25 13:21:07 UTC
I am using the built-in VCS system. It's working just normal when I
create a new filesystem in 3.6. The problem occurs after importing a
project from 3.5.1, in grid-editing mode (open).
Comment 11 strzinek 2004-03-25 13:40:55 UTC
Now I found it happens also when I create a new project and mount a
local directory which happens to be a subdirectory of a cvs local
Comment 12 strzinek 2004-03-25 13:49:37 UTC
I only get this in the ide.log if it helps:

Note -$PropertiesCloneableTopComponent
ought to override getPersistenceType() rather than using the client
property or accepting the default.

Comment 13 strzinek 2004-03-25 14:01:32 UTC
Created attachment 14148 [details]
Comment 14 Tomas Pavek 2004-03-26 10:35:49 UTC
The log shows that there is a problem after the file is saved - the
properties module tries to set name of TopComponent in non-AWT thread
- and window system does not allow this. The exception happens during
the SaveCookie removal. But it does not seem to cause this bug - at
least I can see the exception too and saving works for me.

We'll look at this for the post-3.6 NetBeans version.
Comment 15 Tomas Pavek 2004-03-29 13:42:38 UTC
More analysis: seems that this bug can be reproduced easily - just let
a properties file opened in the IDE and restart it - then the Save
action remains disabled (for that file). However, the file is marked
as changed and the user is prompted for saving changes when closing
it. So data loss should not happen. After reopening the file, the Save
action works well again. Save All action is enabled correctly and
works always. So I think this is not a showstopper for NB 3.6.
Comment 16 Tomas Pavek 2004-04-05 08:32:25 UTC
This could be a candidate for release notes:

"When editing a .properties file (if it stays opened between the IDE
restarts), it may happen that the Save action is not enabled and even
Ctrl+S does not work. If this happens, close the file - you will be
asked whether to save it. After reopening the file, everything should
work fine."
Comment 17 Patrick Keegan 2004-04-05 15:22:21 UTC
Thanks, Tomas. Proposed wording to be consistent with style of other

Description: If you leave a .properties file open between sessions of
the IDE, the Save command might become disabled.

Workarounds: To save the file, you can do one of the following:

* Close the file. You will be prompted to save the file.
* Choose File | Save All.

Comment 18 Lukas Hasik 2004-04-19 13:33:36 UTC
*** Issue 42109 has been marked as a duplicate of this issue. ***
Comment 19 Marian Petras 2004-04-22 09:59:32 UTC
*** Issue 42297 has been marked as a duplicate of this issue. ***
Comment 20 Jan Stola 2004-06-14 11:21:50 UTC
There were several problems mentioned in this issue:

1. The modifications in the currently selected cell
   is lost when Ctrl-S is pressed or File>Save action
   is invoked.

2. The "table editor" attempts to set name of its TopComponent
   from non-AWT thread.

3. When "table editor" is opened during IDE start (as a part
   of the deserialization of the previously opened editor)
   then save action doesn't work.

All these issues have been fixed.
Comment 21 Max Sauer 2005-07-19 09:52:03 UTC
Verified in nb200507181000.