Bug 277879 - Fortran files have C icon in Fortran Projects view
Summary: Fortran files have C icon in Fortran Projects view
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Photran.Editor & Outline View (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P1 minor (vote)
Target Milestone: ---   Edit
Assignee: Jeffrey Overbey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-26 11:36 EDT by Jeffrey Overbey CLA
Modified: 2011-01-31 07:58 EST (History)
2 users (show)

See Also:


Attachments
Patch and icons to distinguish Fortran files and projects (15.94 KB, patch)
2009-07-18 22:21 EDT, Matt Scarpino CLA
no flags Details | Diff
Screenshot that shows Fortran file/project icons (10.16 KB, image/gif)
2009-07-18 22:23 EDT, Matt Scarpino CLA
no flags Details
Patch and icons to distinguish Fortran files and projects (16.99 KB, patch)
2009-07-23 14:45 EDT, Matt Scarpino CLA
g.watson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Overbey CLA 2009-05-26 11:36:25 EDT
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).
Comment 1 Matt Scarpino CLA 2009-07-18 22:21:53 EDT
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.
Comment 2 Matt Scarpino CLA 2009-07-18 22:23:21 EDT
Created attachment 141949 [details]
Screenshot that shows Fortran file/project icons
Comment 3 Jeffrey Overbey CLA 2009-07-20 11:43:08 EDT
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
Comment 4 Matt Scarpino CLA 2009-07-20 13:31:15 EDT
(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
Comment 5 Jeffrey Overbey CLA 2009-07-23 07:12:41 EDT
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!
Comment 6 Jeffrey Overbey CLA 2009-07-23 07:14:16 EDT
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.  :-)
Comment 7 Matt Scarpino CLA 2009-07-23 14:45:30 EDT
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
Comment 8 Jeffrey Overbey CLA 2009-07-23 15:11:08 EDT
Great, thanks.  I'll take a look at this again, hopefully later today...

Jeff
Comment 9 Jeffrey Overbey CLA 2009-07-24 12:55:22 EDT
Everything looks good, so I just committed this to CVS.  Thanks so much, Matt.