TextEdit edit= NLSUtil.createNLSEdit(cu, context.getOffset()); if (edit != null) { String label= CorrectionMessages.getString("LocalCorrectionsSubProcessor.addnon-nls.description"); Image image= JavaPluginImages.get(JavaPluginImages.IMG_OBJS_NLS_NEVER_TRANSLATE); CUCorrectionProposal nlsProposal= new CUCorrectionProposal(label, cu, 6, image); nlsProposal.getRootTextEdit().add(edit); proposals.add(nlsProposal); }
	public static void addNLSProposals(ICorrectionContext context, List proposals) throws CoreException {		final ICompilationUnit cu= context.getCompilationUnit();		String name= CorrectionMessages.getString("LocalCorrectionsSubProcessor.externalizestrings.description"); //$NON-NLS-1$				ChangeCorrectionProposal proposal= new ChangeCorrectionProposal(name, null, 0) {			public void apply(IDocument document) {				try {					NLSRefactoring refactoring= new NLSRefactoring(cu);					ExternalizeWizard wizard= new ExternalizeWizard(refactoring);					String dialogTitle= CorrectionMessages.getString("LocalCorrectionsSubProcessor.externalizestrings.dialog.title"); //$NON-NLS-1$					new RefactoringStarter().activate(refactoring, wizard, dialogTitle, true);				} catch (JavaModelException e) {					JavaPlugin.log(e);				}			}		};		proposals.add(proposal);	}