Bug 127275 [compiler] Generalize ProblemReporter#localSourceEnd
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java
int k= end;
					while (k < documentLen && IndentManipulation.isIndentChar(document.getChar(k))) {
						k++;
					}
					
					document.replace(end, k - end, new String()); 
					document.replace(currentPosition.offset, currentPosition.length, new String());
				} else {
					
					document.replace(currentPosition.offset, currentPosition.length, ModifierKeyword.fromFlagValue(fModifier).toString());
					int end= currentPosition.offset + currentPosition.length; 
					if (end < documentLen && !Character.isWhitespace(document.getChar(end))) {
						document.replace(end, 0, String.valueOf(' ')); 
					}
				}
				
			} catch (BadLocationException e) {
				JavaPlugin.log(e);
			}
		}
		public int getRelevance() { return 0; 	}
		public IContextInformation getContextInformation() { return null; }
		public void apply(IDocument document) {} 
		public Point getSelection(IDocument document) { return null; }
		public void selected(ITextViewer viewer, boolean smartToggle) {}
		public void unselected(ITextViewer viewer) { }
		public boolean validate(IDocument document, int offset, DocumentEvent event) { return false; }
	}
	
	public static void installLinkedVisibilityProposals(LinkedCorrectionProposal proposal, ASTRewrite rewrite, List modifiers, boolean inInterface) {