1 4 package org.terracotta.dso.actions; 5 6 import org.eclipse.jdt.core.IJavaElement; 7 import org.terracotta.dso.ConfigurationHelper; 8 9 16 17 public class AutolockAction extends BaseAction { 18 public AutolockAction() { 19 super("Autolock", AS_CHECK_BOX); 20 } 21 22 public void setJavaElement(IJavaElement element) { 23 super.setJavaElement(element); 24 setChecked(getConfigHelper().isAutolocked(element)); 25 } 26 27 public void performAction() { 28 ConfigurationHelper helper = getConfigHelper(); 29 30 if(isChecked()) { 31 helper.ensureAutolocked(m_element); 32 } 33 else { 34 helper.ensureNotAutolocked(m_element); 35 } 36 37 inspectCompilationUnit(); 38 } 39 } 40 | Popular Tags |