Bug 309045 - C preprocessor activation should not be based on content type
Summary: C preprocessor activation should not be based on content type
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Photran.For Internal Use (show other bugs)
Version: 6.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P1 normal (vote)
Target Milestone: 6.0   Edit
Assignee: Jeffrey Overbey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 286446 290209
Blocks:
  Show dependency tree
 
Reported: 2010-04-13 16:02 EDT by Jeffrey Overbey CLA
Modified: 2011-05-14 06:43 EDT (History)
1 user (show)

See Also:


Attachments
Adds capability to select which file extensions to preprocess (8.94 KB, patch)
2010-05-03 13:56 EDT, Kurt Hendle CLA
no flags Details | Diff
updated patch (11.34 KB, patch)
2010-05-03 14:02 EDT, Kurt Hendle 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 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.