Bug 15527 JavaCore constants should be used is favor of hard-coded strings
the following classes should use constants defined in JavaCode rather than hard-coded strings StubUtility CodeFormatterUtil CompilationUnitEditor JavaCodeScanner JavaCompiletionProcessor
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
setAction(StructureSelectionAction.ENCLOSING, new StructureSelectEnclosingAction(this, fSelectionHistory));
		setAction(StructureSelectionAction.NEXT, new StructureSelectNextAction(this, fSelectionHistory));
		setAction(StructureSelectionAction.PREVIOUS, new StructureSelectPreviousAction(this, fSelectionHistory));
		StructureSelectHistoryAction historyAction= new StructureSelectHistoryAction(this, fSelectionHistory);
		setAction(StructureSelectionAction.HISTORY, historyAction);
		fSelectionHistory.setHistoryAction(historyAction);		
		fGenerateActionGroup= new GenerateActionGroup(this, ITextEditorActionConstants.GROUP_EDIT);
		ActionGroup rg= new RefactorActionGroup(this, ITextEditorActionConstants.GROUP_EDIT);
		
		fActionGroups.addGroup(rg);
		fActionGroups.addGroup(fGenerateActionGroup);
		
		
		fContextMenuGroup= new CompositeActionGroup(new ActionGroup[] {fGenerateActionGroup, rg});
	}
	/*
	 * @see JavaEditor#getElementAt(int)
	 */
	protected IJavaElement getElementAt(int offset) {
		IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
		ICompilationUnit unit= manager.getWorkingCopy(getEditorInput());
		
		if (unit != null) {
			synchronized (unit) {
				try {
					unit.reconcile();
					return unit.getElementAt(offset);
				} catch (JavaModelException x) {
				}
			}