Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [jdt-core-dev] Re: formatter

I fully agree that extension points are the way to go when it comes
to enhancements. Subclassing the Java Editor is the wrong path
since users no longer can mix and match different extensions.
They have to decide for a particular Java Editor subclass.

We have looked into making the formatter an extension point
some time ago.
Here are the issues we discovered for making this properly:

1)   markers should be updated during formatting. It is
     problematic to loose breakpoints or bookmarks
     as a side effect of a format.

2)   there needs to be API to get at formatting options.
     code generation options/refactoring depend on these settings
     as well.

3)   there needs to be a preference UI that enables
     presenting the formatting options of plugged-in formatters
     in a consistent way.

Having said this, I still think your insights from doing the JIndent work
on these issues
would be very useful to us.

What kind of code assist extensions do you have in mind?

--erich



                                                                                                                                     
                    "Scott Stanchfield"                                                                                              
                    <scott@xxxxxxxxxxxx>        To:     <jdt-core-dev@xxxxxxxxxxx>                                                   
                    Sent by:                    cc:                                                                                  
                    jdt-core-dev-admin@e        Subject:     RE: [jdt-core-dev] Re: formatter                                        
                    clipse.org                                                                                                       
                                                                                                                                     
                                                                                                                                     
                    27.11.2001 14:03                                                                                                 
                    Please respond to                                                                                                
                    jdt-core-dev                                                                                                     
                                                                                                                                     
                                                                                                                                     



In 1.0 I created a code formatter that hooked into JIndent. Worked pretty
well (though it needed a property page).
It required a new JavaEditor subclass to hook in the formatter (and the
macro processor I wrote -- though the 2.0 templates are much better than
the
macro processor I had, which was just like what VAJ provided).

Anyway, once I test and get it cleaned up for 2.0, I'll be posting the
formatter at the JIndent site. I'll probably also provide a simpler hook
for
it in Instantiations' CodePro Studio (rather than requiring the choice of a
different Java editor).

A hook for code formatters and code assist extensions would be quite
welcome, though, and would make things quite a bit easier to implement...
-- Scott

> -----Original Message-----
> From: jdt-core-dev-admin@xxxxxxxxxxx
> [mailto:jdt-core-dev-admin@xxxxxxxxxxx]On Behalf Of Philippe
> Mulet/SNZ/OTI
> Sent: Tuesday, November 27, 2001 6:29 AM
> To: judson@xxxxxxxxx
> Cc: jdt-core-dev@xxxxxxxxxxx
> Subject: [jdt-core-dev] Re: formatter
>
>
> The formatter isn't API, and is defined in
> org.eclipse.jdt.internal.formatter.CodeFormatter located inside
> project org.eclipse.jdt.core.
>
> Ideally we would want to define a formatter API and an extension
> point for
> others to contribute their own implementation.
>
>
>
>
>
> Judson Lester <judson@xxxxxxxxx>
> 11/26/2001 07:50 PM
> Please respond to judson
>
>
>         To:     Philippe_Mulet@xxxxxxx
>         cc:
>         Subject:        formatter
>
> "Now if external contributors are willing to help, this might change."
>
> If this is a hint, can you give me a URL to source?  (As has been said
> on the newgroup a number of times, the website is less than helpful,
> navigation-wise.)  Javadoc wouldn't hurt either, if there is any.
>
> Judson
>
>
>
> _______________________________________________
> jdt-core-dev mailing list
> jdt-core-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/jdt-core-dev
>

_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-core-dev






Back to the top