1 4 package org.terracotta.dso.actions; 5 6 import org.eclipse.jdt.core.IMethod; 7 import org.terracotta.dso.ConfigurationHelper; 8 9 17 18 public class DistributedMethodAction extends BaseAction { 19 private IMethod m_method; 20 21 public DistributedMethodAction() { 22 super("Distributed method", AS_CHECK_BOX); 23 } 24 25 public void setMethod(IMethod method) { 26 setJavaElement(m_method = method); 27 setChecked(getConfigHelper().isDistributedMethod(method)); 28 } 29 30 public void performAction() { 31 ConfigurationHelper helper = getConfigHelper(); 32 33 if(isChecked()) { 34 helper.ensureDistributedMethod(m_method); 35 } 36 else { 37 helper.ensureLocalMethod(m_method); 38 } 39 40 inspectCompilationUnit(); 41 } 42 } 43 | Popular Tags |