CoreSpellingProblem iProblem= new CoreSpellingProblem(problem.getOffset(), problem.getOffset() + problem.getLength() - 1, line, problem.getMessage(), word, dictionaryMatch, sentenceStart, fDocument, fEditor.getEditorInput().getName()); fAddAnnotations.put(new ProblemAnnotation(iProblem, null), new Position(problem.getOffset(), problem.getLength()));
IEditorInput editorInput= fEditor.getEditorInput(); if (editorInput != null) { CoreSpellingProblem iProblem= new CoreSpellingProblem(problem.getOffset(), problem.getOffset() + problem.getLength() - 1, line, problem.getMessage(), word, dictionaryMatch, sentenceStart, fDocument, editorInput.getName()); fAddAnnotations.put(new ProblemAnnotation(iProblem, null), new Position(problem.getOffset(), problem.getLength())); }
		public void accept(SpellingProblem problem) {			try {				int line= fDocument.getLineOfOffset(problem.getOffset()) + 1;				String word= fDocument.get(problem.getOffset(), problem.getLength());				boolean dictionaryMatch= false;				boolean sentenceStart= false;				if (problem instanceof JavaSpellingProblem) {					dictionaryMatch= ((JavaSpellingProblem)problem).isDictionaryMatch();					sentenceStart= ((JavaSpellingProblem) problem).isSentenceStart();				}				CoreSpellingProblem iProblem= new CoreSpellingProblem(problem.getOffset(), problem.getOffset() + problem.getLength() - 1, line, problem.getMessage(), word, dictionaryMatch, sentenceStart, fDocument, fEditor.getEditorInput().getName());				fAddAnnotations.put(new ProblemAnnotation(iProblem, null), new Position(problem.getOffset(), problem.getLength()));			} catch (BadLocationException x) {				// drop this SpellingProblem			}		}