View | Details | Raw Unified | Return to bug 211698
Collapse All | Expand All

(-)src/org/eclipse/pde/internal/ui/editor/text/PDESourceInfoProvider.java (-2 / +16 lines)
Lines 16-21 Link Here
16
import org.eclipse.jface.text.Region;
16
import org.eclipse.jface.text.Region;
17
import org.eclipse.jface.text.information.IInformationProvider;
17
import org.eclipse.jface.text.information.IInformationProvider;
18
import org.eclipse.jface.text.information.IInformationProviderExtension;
18
import org.eclipse.jface.text.information.IInformationProviderExtension;
19
import org.eclipse.pde.internal.core.text.IDocumentRange;
19
import org.eclipse.pde.internal.ui.editor.PDESourcePage;
20
import org.eclipse.pde.internal.ui.editor.PDESourcePage;
20
21
21
/**
22
/**
Lines 69-76 Link Here
69
				(fSourcePage == null)) {
70
				(fSourcePage == null)) {
70
			return null;
71
			return null;
71
		}
72
		}
72
		// Get the current selection, if any
73
73
		Object selection = fSourcePage.getSelection();
74
		// First try to get the selection from the offset within the source page
75
		int offset = subject.getOffset();
76
		IDocumentRange rangeElement;
77
		rangeElement = fSourcePage.getRangeElement(offset, false);
78
79
		Object selection = rangeElement;
80
81
		if (selection == null) {
82
83
			// now try to get the selection in the old way
84
			// (prior to fixing bug 211698)
85
			selection = fSourcePage.getSelection();
86
		}
87
		
74
		// If the input is null, then the dialog does not open
88
		// If the input is null, then the dialog does not open
75
		// Define an empty object for no selection instead of null
89
		// Define an empty object for no selection instead of null
76
		if (selection == null) {
90
		if (selection == null) {

Return to bug 211698