Bug 309045

Summary: C preprocessor activation should not be based on content type
Product: [Tools] PTP Reporter: Jeffrey Overbey <com-eclipse-dot-org>
Component: Photran.For Internal UseAssignee: Jeffrey Overbey <com-eclipse-dot-org>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: omar.awile
Version: 6.0   
Target Milestone: 6.0   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on: 286446, 290209    
Bug Blocks:    
Attachments:
Description Flags
Adds capability to select which file extensions to preprocess
none
updated patch g.watson: iplog+

Description Jeffrey Overbey CLA 2010-04-13 16:02:52 EDT
From Omar Awile:

I have however
one big problem. We use .f endings for our fortran files, even though
they are in fortran 95 and use cpp. I tried to change the settings in
Content Types but all the file types that are built in for Photran are
locked.
Comment 1 Jeffrey Overbey CLA 2010-04-30 12:01:15 EDT
Kurt, could you please make a workspace preferences page that lets you specify what filename extensions should correspond to (1) C preprocessed free form and (2) C preprocessed fixed form?  If there's any way to restrict it to the filename extensions with the Fortran content type, that would be good.

Then I will start working on making the C preprocessor activate based on this preference rather than the content type of a file.
Comment 2 Kurt Hendle CLA 2010-05-03 13:56:15 EDT
Created attachment 166813 [details]
Adds capability to select which file extensions to preprocess

Patch makes it possible to select which file extensions are preprocessed in the Project Properties as well as the Fortran preferences in Eclipse preferences.
Comment 3 Kurt Hendle CLA 2010-05-03 14:02:13 EDT
Created attachment 166815 [details]
updated patch

patch updated to contain files excluded in the first.
Comment 4 Jeffrey Overbey CLA 2010-05-13 00:08:43 EDT
I just committed a fairly large change that completely changes how we handle the various source forms in Photran.  Instead of having separate content types, the distinction between the various source forms (fixed, free, C preprocessed free, etc.) is handled via project properties.  That should take care of this problem.

The relevant settings are in the Source Form category of the project properties.

Omar: This should be in the RC1 build next week, if you want to try it out then.
Comment 5 Omar Awile CLA 2010-05-27 05:06:38 EDT
Jeff,

Uhm, I am slightly confused... I can't find this "Source Form" category in the project settings... I am running Eclipse Helios RC1 with Photram build 6.0.0.201005040643. Am I missing something?

Omar
Comment 6 Jeffrey Overbey CLA 2010-05-31 12:29:01 EDT
Hi Omar,

Please try the RC2 build from the Helios repository (version 6.0.0.201005251021) -- it's definitely in there.