1 26 27 package org.objectweb.openccm.packaging; 28 29 import org.objectweb.openccm.descriptor.properties.beans.PropertiesBean; 30 import org.objectweb.openccm.descriptor.properties.beans.PropertiesBeanImpl; 31 32 36 public class ComponentpropertiesEditActionListener 37 implements org.objectweb.util.browser.api.MenuItem 38 { 39 44 public int 45 getStatus(org.objectweb.util.browser.api.TreeView treeView) 46 { 47 return org.objectweb.util.browser.api.MenuItem.ENABLED_STATUS; 48 } 49 50 public void 51 actionPerformed (org.objectweb.util.browser.api.MenuItemTreeView the_event) 52 { 53 org.objectweb.util.browser.core.common.DynamicTree calling_tree 55 = (org.objectweb.util.browser.core.common.DynamicTree) 56 the_event.getTree(); 57 58 org.objectweb.apollon.gui.ApollonFrame calling_frame 60 = (org.objectweb.apollon.gui.ApollonFrame) 61 calling_tree.getRootPane().getParent(); 62 63 org.objectweb.openccm.descriptor.componentassembly.beans.ComponentpropertiesBean cpf_file 65 = (org.objectweb.openccm.descriptor.componentassembly.beans.ComponentpropertiesBean) 66 the_event.getSelectedObject(); 67 68 69 java.io.File properties 70 = new java.io.File (cpf_file.getFileinarchive().getName()); 71 72 if (!properties.exists()) 74 { 75 PropertiesBean properties_instance 76 = new PropertiesBeanImpl(); 77 78 properties_instance.setDocType("properties","","dtd/properties.dtd"); 79 80 try { 81 properties_instance.marshalBean( 82 new java.io.File (cpf_file.getFileinarchive().getName()) 83 ); 84 } catch (Exception exception) { 85 exception.printStackTrace(); 86 } 87 } 88 else 89 { 90 } 92 93 FileOperations.open_file( 94 new java.io.File (cpf_file.getFileinarchive().getName()) 95 , calling_frame 96 ); 97 } 98 } 99 | Popular Tags |