Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Custom editor indentation
Custom editor indentation [message #1800393] Wed, 26 December 2018 07:59
Eclipse UserFriend
Hi all,

I have my custom editor which extends TextEditor and I also have a custom SourceViewerConfiguration which extends TextSourceViewerConfiguration.

I have my own preference page. I would like to add fields with the same behavior of those found here General -> Editors -> Text Editors
(Displayed Tab Width, Insert spaces for tabs).

I have added the fields in my preference page and also done the following:
Override getTabWidth (in my SourceViewerConfiguration) method to return the tab width in my preference page.

I know that there exists those two functions in the class AbstractTextEditor:

  1. isTabsToSpacesConversionEnabled
  2. installTabsToSpacesConverter


I don't know what if I need to override these or not. Do I?

Problem is that nothing works. The changes are 100% ineffective although I can step into getTabWidth that I have have overridden. What am I missing?

Also, I don't know if performOK will need something special to update the currently opened editors or not (any listeners?).

[Updated on: Wed, 26 December 2018 07:59] by Moderator

Previous Topic:Migrating Eclipse RCP
Next Topic:Custom Tooltip getting disposed when perspective is changed in Windows -10
Goto Forum:
  


Current Time: Sun Aug 31 08:19:10 EDT 2025

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

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

Back to the top