Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Formatter
Formatter [message #259884] Wed, 29 April 2009 06:23 Go to next message
Eclipse UserFriend
Hi,

I have created a formatter.xml in for eclipse. Instead of importing the
xml everytime, is there a way to load this formatter.xml during the
eclipse startup?

Please advice.

Thanks in advance,
Lloyd Lamington
Re: Formatter [message #259941 is a reply to message #259884] Fri, 01 May 2009 14:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: benno_baumgartner.ch.ibm.com

Lloyd Lamington wrote:
> Hi,
>
> I have created a formatter.xml in for eclipse. Instead of importing the
> xml everytime, is there a way to load this formatter.xml during the
> eclipse startup?

No, but you need to import it only once anyway, no?

Benno
Re: Formatter [message #259990 is a reply to message #259941] Tue, 05 May 2009 04:39 Go to previous messageGo to next message
Eclipse UserFriend
yes. it has to be done only once.. but whenever we switch workspace, the
formatter seems to change and also, we dont want the developers to keep
changing it. We need to preset it to the formatter that complies with the
coding standards in our organization.
Re: Formatter [message #260000 is a reply to message #259990] Tue, 05 May 2009 11:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Lloyd Lamington wrote:
> yes. it has to be done only once.. but whenever we switch workspace, the
> formatter seems to change and also, we dont want the developers to keep
> changing it. We need to preset it to the formatter that complies with
> the coding standards in our organization.

Note: please quote at least part of the message when replying, so that
everyone sees the context of the discussion.

Have you looked into using project-specific settings that are checked
in? Each project can control many aspects of the preferences, including
formatting I think, and those get saved in the .settings directory under
the project; that directory can be checked in to CVS (or whatever
version control you use) and Eclipse will honor them on all
installations that check out the project.

Hope this helps,
Eric
Re: Formatter [message #260035 is a reply to message #260000] Thu, 07 May 2009 07:50 Go to previous messageGo to next message
Eclipse UserFriend
i have created a plugin that has org.eclipse.ui.startup extension. in the
earlyStartup() method, what should i do so that my-formatter.xml gets
loaded as the formatter? Please advice.




Eric Rizzo wrote:

> Lloyd Lamington wrote:
>> yes. it has to be done only once.. but whenever we switch workspace, the
>> formatter seems to change and also, we dont want the developers to keep
>> changing it. We need to preset it to the formatter that complies with
>> the coding standards in our organization.

> Note: please quote at least part of the message when replying, so that
> everyone sees the context of the discussion.

> Have you looked into using project-specific settings that are checked
> in? Each project can control many aspects of the preferences, including
> formatting I think, and those get saved in the .settings directory under
> the project; that directory can be checked in to CVS (or whatever
> version control you use) and Eclipse will honor them on all
> installations that check out the project.

> Hope this helps,
> Eric
Re: Formatter [message #260038 is a reply to message #260035] Thu, 07 May 2009 08:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: benno_baumgartner.ch.ibm.com

Lloyd Lamington wrote:
> i have created a plugin that has org.eclipse.ui.startup extension. in
> the earlyStartup() method, what should i do so that my-formatter.xml
> gets loaded as the formatter? Please advice.

See
org.eclipse.jdt.internal.ui.preferences.formatter.ProfileCon figurationBlock.ButtonController.loadButtonPressed()

But this is internal code, no guarantees whatsoever, use at your own risk!

>> Have you looked into using project-specific settings that are checked
>> in? Each project can control many aspects of the preferences,
>> including formatting I think, and those get saved in the .settings
>> directory under the project; that directory can be checked in to CVS
>> (or whatever version control you use) and Eclipse will honor them on
>> all installations that check out the project.

I agree with Eric that this is the way to go.

HTH
Benno

>
>> Hope this helps,
>> Eric
>
>
Re: Formatter [message #260085 is a reply to message #260035] Mon, 11 May 2009 11:08 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Lloyd Lamington wrote:
> i have created a plugin that has org.eclipse.ui.startup extension. in
> the earlyStartup() method, what should i do so that my-formatter.xml
> gets loaded as the formatter? Please advice.

Did you even read what I wrote (quoted below)? I would definitely
recommend against using an auto-start plug-in to do this.

Eric


> Eric Rizzo wrote:
>
>> Lloyd Lamington wrote:
>>> yes. it has to be done only once.. but whenever we switch workspace,
>>> the formatter seems to change and also, we dont want the developers
>>> to keep changing it. We need to preset it to the formatter that
>>> complies with the coding standards in our organization.
>
>> Note: please quote at least part of the message when replying, so that
>> everyone sees the context of the discussion.
>
>> Have you looked into using project-specific settings that are checked
>> in? Each project can control many aspects of the preferences,
>> including formatting I think, and those get saved in the .settings
>> directory under the project; that directory can be checked in to CVS
>> (or whatever version control you use) and Eclipse will honor them on
>> all installations that check out the project.
>
>> Hope this helps,
>> Eric
>
>
Previous Topic:AST SimpleType Package resolving
Next Topic:Re: Debugger - resuming single thread
Goto Forum:
  


Current Time: Wed Jul 16 09:16:29 EDT 2025

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

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

Back to the top