contextMenu.addItem("<span>" + images.folderNew().getHTML() + " New Folder</span>", true, new NewFolderCommand(this, images));\r
contextMenu.addItem("<span>" + images.fileNew().getHTML() + " New File</span>", true, new UploadFileCommand(this));\r
contextMenu .addItem("<span>" + images.fileUpdate().getHTML() + " Update</span>", true, new UpdateFileCommand(this))\r
- .setVisible(!propertiesNotVisible && downloadVisible);\r
+ .setVisible(!propertiesNotVisible && downloadVisible); // hide the "update" item when (a) no file is selected,\r
+ // and (b) when we are not allowed to edit the file\r
contextMenu .addItem("<span>" + images.viewText().getHTML() + " Properties</span>", true, new PropertiesCommand(this, images))\r
.setVisible(!propertiesNotVisible);\r
contextMenu.addItem("<span>" + images.emptyTrash().getHTML() + " Empty Trash</span>", true, new EmptyTrashCommand(this));\r