Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Engage Source -> Format
Engage Source -> Format [message #690533] Wed, 29 June 2011 16:30 Go to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

Is there a way to force Eclipse to allow me to engage Source -> Format
regardless of the file I'm working in to have compiled cleanly?

I'm unable to reformat the code (except by hand) before getting it all
compiled cleanly. I don't see why this must be the case, but someone put
this semantic into Eclipse and maybe there's a way to turn it off?
Re: Engage Source -> Format [message #690565 is a reply to message #690533] Wed, 29 June 2011 17:18 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Russel,

I'm able to format Java files with semantic errors but not ones with
syntactic errors. It makes sense that something that's not well formed
syntactically simply can't be formatted syntactically given that the
formatter is likely driven by a structural representation...


On 29/06/2011 9:30 AM, Russell Bateman wrote:
> Is there a way to force Eclipse to allow me to engage Source -> Format
> regardless of the file I'm working in to have compiled cleanly?
>
> I'm unable to reformat the code (except by hand) before getting it all
> compiled cleanly. I don't see why this must be the case, but someone
> put this semantic into Eclipse and maybe there's a way to turn it off?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Engage Source -> Format [message #690566 is a reply to message #690565] Wed, 29 June 2011 17:38 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

In my case, it's code I wanted quick, but "unproject"-like access to. It
was syntactically and semantically complete, but not without the
addition of numerous JARs. I shamelessly wanted to use the formatter in
Eclipse, something I don't have access to from Vim. Should probably look
around for one.

Thanks.


On 29-Jun-11 11:18, Ed Merks wrote:
> Russel,
>
> I'm able to format Java files with semantic errors but not ones with
> syntactic errors. It makes sense that something that's not well formed
> syntactically simply can't be formatted syntactically given that the
> formatter is likely driven by a structural representation...
>
>
> On 29/06/2011 9:30 AM, Russell Bateman wrote:
>> Is there a way to force Eclipse to allow me to engage Source -> Format
>> regardless of the file I'm working in to have compiled cleanly?
>>
>> I'm unable to reformat the code (except by hand) before getting it all
>> compiled cleanly. I don't see why this must be the case, but someone
>> put this semantic into Eclipse and maybe there's a way to turn it off?
Previous Topic:jsp and frames
Next Topic:AspectJ, JUnit and Command line Problem
Goto Forum:
  


Current Time: Fri Apr 19 21:44:43 GMT 2024

Powered by FUDForum. Page generated in 0.07913 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top