1 4 package org.terracotta.dso.actions; 5 6 import org.eclipse.jdt.core.IField; 7 import org.terracotta.dso.ConfigurationHelper; 8 9 19 20 public class TransientFieldAction extends BaseAction { 21 private IField m_field; 22 23 public TransientFieldAction() { 24 super("Transient field", AS_CHECK_BOX); 25 } 26 27 public void setField(IField field) { 28 setJavaElement(m_field = field); 29 setChecked(getConfigHelper().isTransient(m_field)); 30 } 31 32 public void performAction() { 33 ConfigurationHelper helper = getConfigHelper(); 34 35 if(isChecked()) { 36 helper.ensureTransient(m_field); 37 } 38 else { 39 helper.ensureNotTransient(m_field); 40 } 41 42 inspectCompilationUnit(); 43 } 44 } 45 | Popular Tags |