TogglePresentationAction toggleAction= new TogglePresentationAction();  toggleAction.setEditor((ITextEditor)editorPart);  toggleAction.setEditor(null);
IAction toggleAction= editorPart.getEditorSite().getActionBars().getGlobalActionHandler(ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY); if (toggleAction != null && toggleAction.isEnabled() && toggleAction.isChecked()) { if (toggleAction instanceof TextEditorAction) {  ((TextEditorAction)toggleAction).setEditor(null);  ((TextEditorAction)toggleAction).setEditor((ITextEditor)editorPart); } else {  toggleAction.run();  toggleAction.run(); } }
	private static void initializeHighlightRange(IEditorPart editorPart) {		if (editorPart instanceof ITextEditor) {			TogglePresentationAction toggleAction= new TogglePresentationAction();			// Initialize editor			toggleAction.setEditor((ITextEditor)editorPart);			// Reset action			toggleAction.setEditor(null);		}	}