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 196677 - Font in editor title (italics if Read-only) is not updated after connecting to remote host
Summary: Font in editor title (italics if Read-only) is not updated after connecting t...
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Remote (show other bugs)
Version: 7.0.1
Hardware: PC Other
: P3 normal (vote)
Assignee: Andrew Krasny
URL:
Keywords:
Depends on: 187561
Blocks:
  Show dependency tree
 
Reported: 2011-03-14 14:10 UTC by Alexander Pepin
Modified: 2012-04-06 10:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed fix (2.61 KB, patch)
2012-04-03 09:22 UTC, Andrew Krasny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pepin 2011-03-14 14:10:15 UTC
Steps to reproduce:
- create full remote project
- restart IDE
- open project's source file in the editor, it's shown as Read-only and this is correct as the remote host is currently disconncted
- re-connect to the remote host
Result: The source file is still shown as Read-only, double-click on the file node in Projects view does not help.
Workaround: Close the file and open it once again.
Comment 1 Vladimir Kvashin 2011-03-15 09:06:38 UTC
You are right, font in tab and editor background stays unchanged when file change its status.

However you it can be edited after connect.

There is a related editor issue 187561, but I'm not quite sure this one is a duplicate; i should double check. The behaviour differs a bit: if you change ordinary project disk file permissions, editor background doesn't change, but tab font does.
Comment 2 Vladimir Kvashin 2011-03-15 16:48:45 UTC
Investigation shows the difference between local and full remote events as follows. 

Local: two FileAttributeEvent events come the file that changed r/o  status:

"FileAttributeEvent[file=/path_to_file/test_io.c,time=Tue Mar 15 18:20:48 MSK 2011,expected=false,name=DataEditorSupport.read-only.refresh,oldValue=null,newValue=null]"

"FileAttributeEvent[src=/path_to_file,
file=/path_to_file/test_io.c,time=Tue Mar 15 18:21:27 MSK 

Remote: only one FileAttributeEvent event come for the file:

"FileAttributeEvent[file=/path_to_file/test_io.c in vk15xx@server,time=Tue Mar 15 19:37:26 MSK 2011,expected=false,name=DataEditorSupport.read-only.refresh,oldValue=null,newValue=null]"

Another event comes for the directory, but without mentioning its child file.

The difference between two events in local mode is that for the 1-st one getSource() returns the file that changed, while for 2-nd one getSource() returns its parent directory.
Comment 3 Leonid Lenyashin 2011-03-17 17:39:37 UTC
Has this one been evaluated for Show Stopper status
Comment 4 Alexander Pepin 2011-03-22 17:57:09 UTC
I do not think that it's a showstopper.
Comment 5 Vladimir Kvashin 2011-03-29 11:17:24 UTC
User is able to edit file as soon as connect occurs (and vice versa, becomes uneditable as soon as connect breaks), just background and tab font aren't changed. Downgrading to P3.
Comment 6 Vladimir Kvashin 2011-04-02 11:08:23 UTC
After fixing issue 187561 editor background is updated properly.
But font in editor tab title still stays italics, as if file stayed read-only
Comment 7 Andrew Krasny 2012-04-03 09:22:12 UTC
Created attachment 117719 [details]
proposed fix
Comment 8 Vladimir Kvashin 2012-04-05 13:15:27 UTC
I reviewd the fix and pushed it into cnd-main
http://hg.netbeans.org/cnd-main/rev/9f74898aa655
Comment 9 Quality Engineering 2012-04-06 10:08:48 UTC
Integrated into 'main-golden', will be available in build *201204060400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/9f74898aa655
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: Andrew's fix for #196677 - Font in editor title (italics if Read-only) is not updated after connecting to remote host