Community
Participate
Working Groups
Create a .f90 file. The icon in the Fortran Projects view appears to be for a C source file, not a Fortran source file (it has a C icon).
Created attachment 141948 [details] Patch and icons to distinguish Fortran files and projects This patch serves two purposes: it assigns an 'F' icon to all Fortran source files (*.f, *.f77, etc.) and assigns a project nature image for Fortran projects. This is shown in the screenshot. I've provided more information in the README file contained in patch.zip.
Created attachment 141949 [details] Screenshot that shows Fortran file/project icons
Matt, Thanks so much for the contribution. I'll look over it in the next couple of days. For legal purposes, can you please confirm that 1. you wrote 100% of the code without incorporating content from elsewhere or relying on the intellectual property of others, 2. you have the right to contribute the code to Eclipse, and 3. you have included the EPL license header in all source files? For #1, if you borrowed code from either Photran or CDT, that is fine, as long as you state that explicitly. Thanks. Jeff
(In reply to comment #3) Hello Dr. Overbey, 1. I confirm that I wrote 100% of the contributed code without incorporating content from elsewhere or relying on the intellectual property of others (except for code borrowed from Photran/CDT). 2. I have the right to contribute the code to Eclipse. 3. I officially release all of my code and my gif under the Eclipse Public License. I made no change to the EPL header for the two classes I created: org.eclipse.photran.core.FProjectNature and org.eclipse.photran.cdtinterface.ui.FViewLabelProvider. Hope this clears everything up. Matt
Matt, This looks great. I had just assumed that achieving this would require patching CDT, so I'm thrilled to find out that wasn't necessary! I'd like to ask for a few favors before I can commit the patch, if you don't mind. (Mostly these are to make sure this will pass the legal review.) (1) Please add your name to the @author tags in all added or modified Java files (2) Since FProjectNature is basically copied from the corresponding CDT class, it should retain the original copyright header and @author assignment from the CDT class; then add yourself to the @author tag (2) In FViewLabelProvider... (a) Please assign the copyright to yourself, not UIUC, in the header comment (b) Please add a brief JavaDoc comment for the class with an @author tag (c) In FViewLabelProvider#getImage, take a look at PhotranVPGBuilder#shouldProcessFile, and try using code similar to that instead of matching based on filename extensions. The list of extensions is actually dynamic since it's based on the platform content type of the file, which the user can configure in the workspace preferences. I can take care of 2(c) if you don't have time (it should be literally one or two lines of code). Again, thanks so much for contributing this!
And, of course, my numbering was off... so that last comment was referring to the second #2, which would have been #3 if I'd had my coffee this morning. :-)
Created attachment 142435 [details] Patch and icons to distinguish Fortran files and projects Dr. Overbey, I think I've taken care of all your requests, and I've updated the author tags and license information in each case. There was no author for the CProjectNature class, so I've put myself as the sole author of FProjectNature. You're right--it's better to check for contentTypes than file suffixes. I've made the change to FViewLabelProvider and it works well on my system. If there's anything more I can do, please say the word. Matt
Great, thanks. I'll take a look at this again, hopefully later today... Jeff
Everything looks good, so I just committed this to CVS. Thanks so much, Matt.