[Q] Need direction on how build a source formatter [message #33111] |
Thu, 15 May 2003 07:12  |
Eclipse User |
|
|
|
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 #35319 is a reply to message #35281] |
Fri, 16 May 2003 07:14   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
>>>
>>>
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.25516 seconds