1 11 12 package org.eclipse.ant.internal.ui.editor.templates; 13 14 import org.eclipse.ant.internal.ui.editor.formatter.FormattingPreferences; 15 import org.eclipse.ant.internal.ui.editor.formatter.XmlFormatter; 16 import org.eclipse.ant.internal.ui.model.AntUIPlugin; 17 import org.eclipse.ant.internal.ui.preferences.AntEditorPreferenceConstants; 18 import org.eclipse.jface.text.DefaultInformationControl; 19 import org.eclipse.swt.widgets.Shell; 20 21 public class AntSourceViewerInformationControl extends DefaultInformationControl { 22 23 public AntSourceViewerInformationControl(Shell parent, int shellStyle, int style, IInformationPresenter presenter) { 24 super(parent, shellStyle, style, presenter); 25 } 26 27 public AntSourceViewerInformationControl(Shell parent, int shellStyle, int style, IInformationPresenter presenter, String statusFieldText) { 28 super(parent, shellStyle, style, presenter, statusFieldText); 29 } 30 31 public AntSourceViewerInformationControl(Shell parent, int style, IInformationPresenter presenter) { 32 super(parent, style, presenter); 33 } 34 35 public AntSourceViewerInformationControl(Shell parent, int style, IInformationPresenter presenter, String statusFieldText) { 36 super(parent, style, presenter, statusFieldText); 37 } 38 39 public AntSourceViewerInformationControl(Shell parent) { 40 super(parent); 41 } 42 43 public AntSourceViewerInformationControl(Shell parent, IInformationPresenter presenter) { 44 super(parent, presenter); 45 } 46 47 50 public void setInformation(String content) { 51 if (content != null 52 && AntUIPlugin.getDefault().getPreferenceStore().getBoolean(AntEditorPreferenceConstants.TEMPLATES_USE_CODEFORMATTER)) { 53 content= XmlFormatter.format(content, new FormattingPreferences()); 54 } 55 super.setInformation(content); 56 } 57 } 58 | Popular Tags |