Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Get Tab Size from Preferences
Get Tab Size from Preferences [message #259549] Wed, 15 April 2009 00:27 Go to next message
Nikolay Georgiev is currently offline Nikolay GeorgievFriend
Messages: 13
Registered: July 2009
Junior Member
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 10:31 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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 20:32 Go to previous message
Nikolay Georgiev is currently offline Nikolay GeorgievFriend
Messages: 13
Registered: July 2009
Junior Member
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: Sat Aug 31 23:56:23 GMT 2024

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

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

Back to the top