1 4 package org.terracotta.dso.actions; 5 6 import org.eclipse.jdt.core.IType; 7 import org.terracotta.dso.ConfigurationHelper; 8 import org.terracotta.dso.TcPlugin; 9 10 13 14 22 23 public class BootJarTypeAction extends BaseAction { 24 private IType m_type; 25 26 public BootJarTypeAction() { 27 super("Boot Jar", AS_CHECK_BOX); 28 } 29 30 public void setType(IType type) { 31 setJavaElement(m_type = type); 32 33 boolean isBootClass = TcPlugin.getDefault().isBootClass(type); 34 setEnabled(!isBootClass); 35 setChecked(isBootClass || getConfigHelper().isBootJarClass(type)); 36 } 37 38 public void performAction() { 39 ConfigurationHelper helper = getConfigHelper(); 40 41 if(isChecked()) { 42 helper.ensureBootJarClass(m_type); 43 } 44 else { 45 helper.ensureNotBootJarClass(m_type); 46 } 47 48 inspectCompilationUnit(); 49 } 50 } 51 | Popular Tags |