Bug 34124 [implementation] Java outline viewer does not use element map
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
/**
		 * This action toggles whether this Java Outline page links
		 * its selection to the active editor.
		 * 
		 * @since 3.0
		 */
		public class ToggleLinkingAction extends AbstractToggleLinkingAction {
		
			JavaOutlinePage fJavaOutlinePage;
		
			/**
			 * Constructs a new action.
			 */
			public ToggleLinkingAction(JavaOutlinePage outlinePage) {
				boolean isLinkingEnabled= PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE);
				setChecked(isLinkingEnabled);
				fJavaOutlinePage= outlinePage;
			}
	
			/**
			 * Runs the action.
			 */
			public void run() {
				PreferenceConstants.getPreferenceStore().setValue(PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE, isChecked());
			}
	
		}
	
	private boolean fTopLevelTypeOnly;