[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform] [HELP] add template formatting in javaeditor exemple(always)
|
- From: julien <elekis@xxxxxxxxx>
- Date: Mon, 26 May 2008 19:34:24 +0200
- Newsgroups: eclipse.platform
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.14 (Windows/20080421)
hi all
always trying to put template formatting (grrrrr, I lost my mind), I
decided to put that on the
java editor example and surprise,... that doesnt work.
What I ve done is
in the TemplatesPreferencePage I added
private String FORMATTER_PREFERENCE_KEY = "my.formatter.preference.key";
protected String getFormatterPreferenceKey() {
return FORMATTER_PREFERENCE_KEY;
}
protected boolean isShowFormatterSetting() {
return true;
}
and that add the button in the preference page (and sauvegarde it). but
that doesn't change anything in the editor.
in the XMLConfiguration I put the following code
public IAutoEditStrategy[] getAutoEditStrategies(
ISourceViewer sourceViewer, String contentType) {
return new IAutoEditStrategy[]{new
DefaultIndentLineAutoEditStrategy() };
}
and that doesn't anything.
in fact, the getAutoEditStrategies serve to nothing. iether the
getAutoEditStrategies is implemented or not, I have the indented line .
So if there any otherthing to implement to get the templtate formatting.
thanks
a+++