Community
Participate
Working Groups
For each visualized remote file system node in either the target explorer tree or the file system tree in the peer details editor, provide Windows Explorer like property pages to visualize the file system node properties. The property pages should contain at least: - Name and Location - Size in human readable form and raw bytes Example: "Size: 4,00 KB (4.096 bytes)" - File attributes like "read only" and "hidden" Difficulty: The remote file system attributes style has to be used. Means if the file is on a remote Unix like file system, the user get the typical "read/write/exec" style attributes for "user/group/others" - File creation, modified and access times in long localized style Example: "Created: Dienstag, 19. Oktober 2010, 19:31:29"
Created attachment 197755 [details] A proposed patch.
Hi Uwe, I created a patch for this bug. In the patch, I added several common columns like those of Windows Explorer. Please check it out and review it. The column of "file attribute" in the patch now only shows the attribute using Unix style. More information including the remote OS type is needed to customize the attribute's style. I don't know how to acquire such information from TCF connections yet. -William
Hi William, First of all, thanks for the contribution :). I can see what the patch is aiming for, but this is not what this enhancement is asking for. Adding additional columns to the file system editor page control, is OK, but should be handled in a specific enhancement request. Any additional column besides Name, Date modified, Type and Size should be optional and offered to be added on user choice only. This enhancement is asking for property page contributions to the standard Eclipse properties dialog for directory or file nodes. The specific workflow to solve is - Select a file or directory node in either the Target Explorer view or the file system editor page control - Right Click -> Properties - Open the Eclipse properties dialog on the selection - Show the node properties in a corresponding property page As an example on this, you can select a source file in the package explorer, right click -> properties. Look at the "Resource" properties category. That's what we are looking for here. Technically: 1. Unfortunately, the patch is breaking the file system tree content contribution to the Target Explorer view (FSTreeLabelProvider changes). Make sure that you are aware of all use cases for the modified class. 2. Avoid refactorings where not needed to achieve the desired functionality (FSTreeContentProvider refactorings and TCFChannelCallback introduction). Keeping the style of the original implementation helps reviewing contributions. For this specific case, please don't introduce the callback implementations. If there is a specific reason to refactor the content provider to be splitted into the callbacks, I suggest to discuss it on a specific bugzilla. 3. Make sure to create patches always from HEAD (FSTreeLabelProvider missed a change). 4. Assert assumptions using the Assert class. Manipulation and access of cached TCF data has to be asserted to happen in the TCF event dispatch thread only. Method parameters you expect never to be null, should be asserted to detect API violations. In general, smaller and very specific patches have a better chance to get committed. In example, the introduction of isFile() and isDirectory() to the FSTreeNode is a appreciated change and helps simplifying the comperator implementations. Opening a specific bugzilla asking for exactly this + attaching the specific patch will lead to a faster commit of the patch. Formatting: 1. See org.eclipse.tm.te.docs/CONTRIBUTIONS.txt, 3.a). Some public and/or protected methods misses the javadoc header. 2. Remove the @author and spare lines from the class header 3. In files you are not the initial creator, add a line in the form * William Chen (Wind River) - [345384] <bug subject> - Uwe
Hi Uwe, I got what you mean now. I misunderstood your original description. Let me create another fix patch for this bug. -William
Created attachment 198080 [details] The new patch. Hi Uwe, I created a new patch for this bug. Could you please have a review? If there are any issues, please inform me. Thank you. -William
Created attachment 198164 [details] The new patch with packages refactored. Hi Uwe, I refactored the patch to use an internal package name. Please review this one. Thanks a lot! -William
Hi William, it is getting closer :). Here are my comments. 1. First, enable the file system tree contribution for the Target Explorer tree as well. It's "Target Explorer View Menu -> Customize View... -> Content -> Target File System (TCF)". The "Properties" action is missing in the context menu, double click does work. 2. Use the Eclipse standard command id's for global actions like "Properties". The command id for "Properties" is "org.eclipse.ui.file.properties". See IWorkbenchCommandConstants.FILE_PROPERTIES. 3. Use Eclipse standard labels and mnemonics for global actions like "Properties". The action label (with mnemonic) is "P&roperties". See WorkbenchMessages.Workbench_properties. The same applies to the tooltip. 4. The property page contributions should not use the "os.type" as filter. It will be incorrect as this reflects only the host type and not the remote file system type. I suggest to have a general information page containing the common properties for both windows and linux remote file systems plus an exchangeable section with the proper permissions style. Note: If building the agent from recent source code, the Windows version reveals the Windows file system specific attributes as "Win32Attrs" in the custom file system node attributes. This can be used to detect if to show "Windows Style" permissions or "Unix Style" permissions. See SystemFilesViewerFilter for an example usage and IWindowsFileAttributes for the bits.
Created attachment 198697 [details] New patch based on the feedbacks. Hi Uwe, I revised the patch based on your suggestions. i.e. 1. The properties dialog for Target Explorer view is now working. 2. Use "org.eclipse.file.properties" as the command id and remove redundant handle declaration. 3. Use standard labels, mnemonics and tool tips. 4. Remove os.type filter. Use a unified properties page to display the properties on both Windows and Unix/Linux. For the extra section that is used to display attributes, please look at the other two attached screenshots. If you have any suggestions, please let me know. Thanks. -William
Created attachment 198698 [details] The screenshot of the attributes section for Windows files/folders.
Created attachment 198699 [details] The screenshot of attributes section for Unix/Linux files/folders.
Hi William, almost done. The only remaining complain is about the advanced attributes dialog for Windows. It should not reveal all of the attributes and especially not the reserved ones. If you open a Windows Explorer, select a file, right click, Properties, Advanced ..., the advanced attributes dialog should basically look similar to what you get there. It reveals the archive, the index, the compressed and the encrypted attributes only and nicely user understandable. Thanks, Uwe :)
Created attachment 198786 [details] The patch with a new advanced attributes dialog. Hi Uwe, I made a modification based your feedback. The screenshot for the new advanced attributes dialog is also attached here. Please have a review. Thanks. -William
Created attachment 198787 [details] The screenshot of the new advanced attributes dialog on Windows.
Created attachment 198875 [details] New patch with a licensed image. Adding missing banner image used in the advanced dialog. Please refer to the attached image and its license description.
Created attachment 198876 [details] The image used in the banner area of the advanced properties dialog. The image used in the banner area of the advanced properties dialog. It is licensed under the EPL.
I, William Chen, declare that I developed the attached code from scratch, without referencing any 3rd party materials except materials licensed under the EPL. I am authorized by my employer to make this contribution under the EPL. -William Chen
committed patch