View unanswered posts | View active topics It is currently Tue Nov 13, 2018 6:45 pm



Reply to topic  [ 5 posts ] 
Task: Add Feature To Eclipse CDT Formatter 
Author Message
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15194
Location: Home sweet home!
There are a couple of minor issues with the CDT code formatter in Juno SR1 + performance patch:

1) It screws with blank lines, make this optional, or for our purposes, just make it not screw with them at all. Optional is an upstreamable patch, but more work, as you need to make a new tab for it. JDT has this feature, so checking their code base could be helpful - I didn't look there yet, though.

2) If a macro with args is included in a block of math, it puts a trailing space after it, however not after a function in the same place, nor a literal in the same place, nor a var in the same place, etc. This is a bug IMO, and I should likely file it on eclipse CDT, but maybe with a patch.

These files (at least) have the code in them:

Code:
find ~/workspace/org.eclipse.cdt/ -type d -and -name formatter
/home/fred/workspace/org.eclipse.cdt/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter
/home/fred/workspace/org.eclipse.cdt/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/formatter
/home/fred/workspace/org.eclipse.cdt/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter
/home/fred/workspace/org.eclipse.cdt/core/org.eclipse.cdt.ui.tests/resources/formatter

The formatter definition and/or patch needs to work well in order to not piss everyone off who wants to include code in the firmware. This would be a useful contribution to a HUGE project (eclipse), and to this one, as well.

Any takers?

Fred.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Thu Jan 31, 2013 12:03 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15194
Location: Home sweet home!
What we'll have to do to share it is this:

http://stackoverflow.com/questions/7688 ... ngle-class
http://aniefer.blogspot.com.es/2009/06/ ... th-p2.html
http://aniefer.blogspot.com.es/2009/06/ ... art-2.html

However the first step is to solve the issue(s).

Fred.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Thu Jan 31, 2013 12:15 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15194
Location: Home sweet home!
Get the source here:

Code:
git clone git://git.eclipse.org/gitroot/cdt/org.eclipse.cdt.git

Unsure if this is a suitable version to use as a patch, or not. It may well be newer. We should apply the patch to the version in SR1+perfpatch before deploying it.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Thu Jan 31, 2013 12:19 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15194
Location: Home sweet home!
I was testing on this file src/main/fuelAndIgnitionCalcs.c

However more issues may crop up as I expand testing once those are solved.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Thu Jan 31, 2013 12:21 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15194
Location: Home sweet home!
Re the macro thing, I filed a bug on the eclipse bugzilla, hopefully someone takes a look at it sooner or later.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Sun Feb 03, 2013 2:34 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF. ColorizeIt.