public void createPartControl(Composite parent) {
try {
// Don't split when EditorInput isn't IFileEditorInput
if(!(getEditorInput() instanceof IFileEditorInput)){
editor.init(getEditorSite(), getEditorInput());
editor.addPropertyListener(new IPropertyListener() {
public void propertyChanged(Object source, int propertyId) {
firePropertyChange(propertyId);
}
});
editor.createPartControl(parent);
return;
}
SashForm sash = null;
if(isHorizontal){
sash = new SashForm(parent,SWT.VERTICAL);
} else {
sash = new SashForm(parent,SWT.HORIZONTAL);
}
site = new SplitEditorSite(editor, getEditorSite());
editor.init(site, getEditorInput());
editor.addPropertyListener(new IPropertyListener() {
public void propertyChanged(Object source, int propertyId) {
firePropertyChange(propertyId);
}
});
editor.createPartControl(sash);