1 11 package org.eclipse.jdt.internal.corext.refactoring.base; 12 13 import org.eclipse.jdt.core.compiler.IProblem; 14 15 import org.eclipse.jdt.internal.corext.SourceRange; 16 import org.eclipse.ltk.core.refactoring.RefactoringStatus; 17 import org.eclipse.ltk.core.refactoring.RefactoringStatusContext; 18 import org.eclipse.ltk.core.refactoring.RefactoringStatusEntry; 19 20 23 public class JavaRefactorings { 24 25 public static RefactoringStatusEntry createStatusEntry(IProblem problem, String newWcSource) { 26 RefactoringStatusContext context= new JavaStringStatusContext(newWcSource, new SourceRange(problem)); 27 int severity= problem.isError() ? RefactoringStatus.ERROR: RefactoringStatus.WARNING; 28 return new RefactoringStatusEntry(severity, problem.getMessage(), context); 29 } 30 } 31 | Popular Tags |