Bug 55968 [misc] segmented view does not work with new methods
i2004-03-24+plugin export - add a new method into a class by typing: public void test() {[enter] - the closing bracket is made automatically and the cursor is placed in the method - press "show source of selected element only" - observed behavior: the selected segment is the whole class rather than the method in which the cursor was
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
/**
	 * Creates and returns the preference store for this Java editor with the given input.
	 *
	 * @param input The editor input for which to create the preference store
	 *
	 * @since 3.0
	 */
	private IPreferenceStore createNewPreferenceStore(IEditorInput input) {
		List stores= new ArrayList(3);
		IJavaProject project= EditorUtility.getJavaProject(input);
		if (project != null)
			stores.add(new OptionsAdapter(project.getOptions(false), JavaPlugin.getDefault().getMockupPreferenceStore(), new OptionsAdapter.IPropertyChangeEventFilter() {
				public boolean isFiltered(PropertyChangeEvent event) {
					IJavaElement inputJavaElement= getInputJavaElement();
					IJavaProject javaProject= inputJavaElement != null ? inputJavaElement.getJavaProject() : null;
					if (javaProject == null)
						return true;
					
					return !javaProject.getProject().equals(event.getSource());
				}
				
			}));
		
		JavaTextTools tools= JavaPlugin.getDefault().getJavaTextTools();
		stores.add(tools.getPreferenceStore());
		if (tools.getCorePreferenceStore() != null)
			stores.add(new PreferencesAdapter(tools.getCorePreferenceStore()));
		
		if (stores.size() == 1)
			return (IPreferenceStore) stores.get(0);