Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » [Q] Need direction on how build a source formatter
[Q] Need direction on how build a source formatter [message #33111] Thu, 15 May 2003 07:12 Go to next message
Eclipse UserFriend
Originally posted by: glongman.intelligentworks.nospam.com

Hi,

I'd like to build a source formatter for XML. From the api docs it looks
like

org.eclipse.jface.text.formatter.ContentFormatter

is the way to go. But, I don't know where to start. Anybody out there have
any tips/pointers? Any open source plugins out there doing this (so I can
look at the code)?

Thanks,

Geoff
Re: [Q] Need direction on how build a source formatter [message #35097 is a reply to message #33111] Fri, 16 May 2003 04:19 Go to previous messageGo to next message
Eclipse UserFriend
as far as I can tell, its all there in jdt.ui..

Christian

G Longman wrote:
> Hi,
>
> I'd like to build a source formatter for XML. From the api docs it looks
> like
>
> org.eclipse.jface.text.formatter.ContentFormatter
>
> is the way to go. But, I don't know where to start. Anybody out there have
> any tips/pointers? Any open source plugins out there doing this (so I can
> look at the code)?
>
> Thanks,
>
> Geoff
>
>
>
>
Re: [Q] Need direction on how build a source formatter [message #35185 is a reply to message #35097] Fri, 16 May 2003 05:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: adam_kiezun.ch.ibm.spam.protection.com

> as far as I can tell, its all there in jdt.ui..

nope, he meant XML and we have nothing for xml
a.
--
eclipse.org
Re: [Q] Need direction on how build a source formatter [message #35281 is a reply to message #35185] Fri, 16 May 2003 05:45 Go to previous messageGo to next message
Eclipse UserFriend
well, he asked where to start. I think jdt gives you a decent
understanding on that. The actual formatting of XML text is rather
trivial IMO - unless I am missing some hidden trap.

Having said that, I would myself be interested in more doco in the
workings of CodeFormatter and friends. For example, right now the
position handling and related APIs look rather obscure to me. Pointers
would be appreciated.

Geoff - as I seem to be doing the same thing as you (i.e. formatting an
XML file), I would be willing to share findings or achievements. After
all this is mostly independent from the underlying problem domain.

Christian

Adam Kiezun wrote:
>>as far as I can tell, its all there in jdt.ui..
>
>
> nope, he meant XML and we have nothing for xml
> a.
> --
> eclipse.org
>
>
Re: [Q] Need direction on how build a source formatter [message #35319 is a reply to message #35281] Fri, 16 May 2003 07:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: glongman.intelligentworks.nospam.com

I do expect to drill into the jdt code as I go. Was hoping for other sources
of information. Since 1.0 I've been doing "reverse engineering" gain insight
for many aspects of my plugins.

The docs have improved vastly as Eclipse has evolved, but the docs for
formatting are slim and "reverse engineering", while always interesting,
gets tiring after doing it over and over.

I'd be happy to share anything I come up with!

BTW - another user replied directly to me suggesting I look at the X-Men
(http://sourceforge.net/projects/xmen) plugin for
examples. I plan to do just that.

Geoff


"Christian Sell" <cse@dynabean.de> wrote in message
news:ba2bvq$2gd$1@rogue.oti.com...
> well, he asked where to start. I think jdt gives you a decent
> understanding on that. The actual formatting of XML text is rather
> trivial IMO - unless I am missing some hidden trap.
>
> Having said that, I would myself be interested in more doco in the
> workings of CodeFormatter and friends. For example, right now the
> position handling and related APIs look rather obscure to me. Pointers
> would be appreciated.
>
> Geoff - as I seem to be doing the same thing as you (i.e. formatting an
> XML file), I would be willing to share findings or achievements. After
> all this is mostly independent from the underlying problem domain.
>
> Christian
>
> Adam Kiezun wrote:
> >>as far as I can tell, its all there in jdt.ui..
> >
> >
> > nope, he meant XML and we have nothing for xml
> > a.
> > --
> > eclipse.org
> >
> >
>
Re: [Q] Need direction on how build a source formatter [message #35353 is a reply to message #35319] Fri, 16 May 2003 07:39 Go to previous messageGo to next message
Eclipse UserFriend
G Longman wrote:
> I do expect to drill into the jdt code as I go. Was hoping for other sources
> of information. Since 1.0 I've been doing "reverse engineering" gain insight
> for many aspects of my plugins.
>
> The docs have improved vastly as Eclipse has evolved, but the docs for
> formatting are slim and "reverse engineering", while always interesting,
> gets tiring after doing it over and over.
>
> I'd be happy to share anything I come up with!
>
> BTW - another user replied directly to me suggesting I look at the X-Men
> (http://sourceforge.net/projects/xmen) plugin for
> examples. I plan to do just that.

go ahead. Last time I looked at it, it was less fun looking at than any
other eclipse source I had seen until then - totally undocumented. I did
not look at formatting, though. Let me know what you find.

Christian

>
> Geoff
>
>
> "Christian Sell" <cse@dynabean.de> wrote in message
> news:ba2bvq$2gd$1@rogue.oti.com...
>
>>well, he asked where to start. I think jdt gives you a decent
>>understanding on that. The actual formatting of XML text is rather
>>trivial IMO - unless I am missing some hidden trap.
>>
>>Having said that, I would myself be interested in more doco in the
>>workings of CodeFormatter and friends. For example, right now the
>>position handling and related APIs look rather obscure to me. Pointers
>>would be appreciated.
>>
>>Geoff - as I seem to be doing the same thing as you (i.e. formatting an
>>XML file), I would be willing to share findings or achievements. After
>>all this is mostly independent from the underlying problem domain.
>>
>>Christian
>>
>>Adam Kiezun wrote:
>>
>>>>as far as I can tell, its all there in jdt.ui..
>>>
>>>
>>>nope, he meant XML and we have nothing for xml
>>>a.
>>>--
>>>eclipse.org
>>>
>>>
>>
>
>
Re: [Q] Need direction on how build a source formatter [message #35454 is a reply to message #35319] Fri, 16 May 2003 08:31 Go to previous message
Eclipse UserFriend
after a few hours of investigation, my impression is that the first big
challenge lies in getting creating plugin configuration that activates
the formatting command via the GUI. All those actionSets, menus,
commands, categories, and what not. Dear goodness is all I can say.

G Longman wrote:
> I do expect to drill into the jdt code as I go. Was hoping for other sources
> of information. Since 1.0 I've been doing "reverse engineering" gain insight
> for many aspects of my plugins.
>
> The docs have improved vastly as Eclipse has evolved, but the docs for
> formatting are slim and "reverse engineering", while always interesting,
> gets tiring after doing it over and over.
>
> I'd be happy to share anything I come up with!
>
> BTW - another user replied directly to me suggesting I look at the X-Men
> (http://sourceforge.net/projects/xmen) plugin for
> examples. I plan to do just that.
>
> Geoff
>
>
> "Christian Sell" <cse@dynabean.de> wrote in message
> news:ba2bvq$2gd$1@rogue.oti.com...
>
>>well, he asked where to start. I think jdt gives you a decent
>>understanding on that. The actual formatting of XML text is rather
>>trivial IMO - unless I am missing some hidden trap.
>>
>>Having said that, I would myself be interested in more doco in the
>>workings of CodeFormatter and friends. For example, right now the
>>position handling and related APIs look rather obscure to me. Pointers
>>would be appreciated.
>>
>>Geoff - as I seem to be doing the same thing as you (i.e. formatting an
>>XML file), I would be willing to share findings or achievements. After
>>all this is mostly independent from the underlying problem domain.
>>
>>Christian
>>
>>Adam Kiezun wrote:
>>
>>>>as far as I can tell, its all there in jdt.ui..
>>>
>>>
>>>nope, he meant XML and we have nothing for xml
>>>a.
>>>--
>>>eclipse.org
>>>
>>>
>>
>
>
Previous Topic:Communicating between Views
Next Topic:CVS with sspi protocol
Goto Forum:
  


Current Time: Thu Jul 10 00:16:25 EDT 2025

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

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

Back to the top