Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Can I call a JFace content formatter programatically?
Can I call a JFace content formatter programatically? [message #324348] Wed, 23 January 2008 06:38 Go to next message
Eclipse UserFriend
Originally posted by: stefan.bley.dd.gmx.de

I'm looking for a way to apply a content formatter that implements
IContentFormatter on a document without that document being opened in
the according textviewer.
What I'm aiming at is to format an AspectJ file using AJDT's formatter.

Something like:
getAJCodeFormatter().format("C:/MyAspect.aj");

Regards, Stevy
Re: Can I call a JFace content formatter programatically? [message #324374 is a reply to message #324348] Wed, 23 January 2008 10:50 Go to previous message
Eclipse UserFriend
Stefan Bley wrote:

>I'm looking for a way to apply a content formatter that implements
>IContentFormatter on a document without that document being opened in
>the according textviewer.
>
>
You can use file buffers (see org.eclipse.core.filebuffers plug-in) to
get the document for your file, then call the formatter on the document
and afterwards commit the file buffer.

Dani

>What I'm aiming at is to format an AspectJ file using AJDT's formatter.
>
>Something like:
>getAJCodeFormatter().format("C:/MyAspect.aj");
>
>Regards, Stevy
>
>
Previous Topic:Find Results window
Next Topic:Team/History for all files in workspace
Goto Forum:
  


Current Time: Wed Apr 30 15:04:38 EDT 2025

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

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

Back to the top