1 4 package org.terracotta.dso.correction; 5 6 import org.eclipse.core.resources.IMarker; 7 import org.eclipse.core.resources.IProject; 8 import org.eclipse.core.runtime.CoreException; 9 import org.eclipse.core.runtime.IProgressMonitor; 10 import org.eclipse.jdt.core.IMethod; 11 12 import org.terracotta.dso.ConfigurationHelper; 13 import org.terracotta.dso.TcPlugin; 14 15 public class EnsureNotLockedResolution extends BaseMarkerResolution { 16 public EnsureNotLockedResolution(IMethod method) { 17 super(method); 18 } 19 20 public String getLabel() { 21 return "Ensure not locked"; 22 } 23 24 public void run(IProgressMonitor monitor) throws CoreException { 25 IMethod method = (IMethod)m_element; 26 IProject project = method.getJavaProject().getProject(); 27 ConfigurationHelper configHelper = TcPlugin.getDefault().getConfigurationHelper(project); 28 29 configHelper.ensureNotLocked(method); 30 m_marker.setAttribute(IMarker.MESSAGE, "No longer locked"); 31 inspectCompilationUnit(); 32 } 33 } 34 35 | Popular Tags |