if (resource == null) {
IWorkbench workbench = SSEUIPlugin.getDefault().getWorkbench();
if (workbench != null) {
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
if (window != null) {
IPartService service = window.getPartService();
if (service != null) {
Object part = service.getActivePart();
if (part != null && part instanceof IEditorPart) {
editorPart = (IEditorPart) part;
if (editorPart != null) {
IStructuredModel model = null;
ITextEditor textEditor = null;