Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Get Tab Size from Preferences
Get Tab Size from Preferences [message #259549] Tue, 14 April 2009 20:27 Go to next message
Eclipse UserFriend
Hello,

I suppose this is the right group to ask the question.

I'm trying to get the Tab size in java source files, which is set by the
current code formatter. In the XML file of the formatter it has the key:

"org.eclipse.jdt.core.formatter.tabulation.size"

And I suppose that it is contained in some PreferenceStore, but calling
PlatformUI.getPreferenceStore().getInt("org.eclipse.jdt.core.formatter.tabulation.size ")
does not return the value.

Do you know how can I get the value?

Thank You!

Nikolay
Re: Get Tab Size from Preferences [message #259563 is a reply to message #259549] Wed, 15 April 2009 06:31 Go to previous messageGo to next message
Eclipse UserFriend
Nikolay wrote:
> Hello,
>
> I suppose this is the right group to ask the question.
>
> I'm trying to get the Tab size in java source files, which is set by
> the current code formatter. In the XML file of the formatter it has
> the key:
>
> "org.eclipse.jdt.core.formatter.tabulation.size"
>
> And I suppose that it is contained in some PreferenceStore, but calling
> PlatformUI.getPreferenceStore().getInt("org.eclipse.jdt.core.formatter.tabulation.size ")
>
The Platform UI plug-in knows nothing about JDT and hence you won't find
it there.
I suggest to take a look at
org.eclipse.jdt.internal.corext.util.CodeFormatterUtil.getTa bWidth(IJavaProject).

Dani
> does not return the value.
>
> Do you know how can I get the value?
>
> Thank You!
>
> Nikolay
>
Re: Get Tab Size from Preferences [message #259588 is a reply to message #259563] Thu, 16 April 2009 16:32 Go to previous message
Eclipse UserFriend
Wow, Thank you Dani! :)) It worked perfectly :P
Previous Topic:Extending Java Search Functionality From the Result View Toolbar
Next Topic:How to add superinterface to IType
Goto Forum:
  


Current Time: Tue May 06 17:35:24 EDT 2025

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

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

Back to the top