| java.lang.Object org.netbeans.modules.vmd.api.model.ComponentSerializationSupport
ComponentSerializationSupport | public class ComponentSerializationSupport (Code) | | This class contains a support for a custom component serialization into a xml file which is automatically stored into the global registry.
author: David Kaspar |
Method Summary | |
public static void | refreshDescriptorRegistry(String projectType) Invokes refreshing of descriptor registry of a specified project type. | public static void | runUnderDescriptorRegistryReadAccess(String projectType, Runnable runnable) Runs a task under read access on description registry. | public static void | runUnderDescriptorRegistryWriteAccess(String projectType, Runnable runnable) Runs a task under write access on description registry. | public static void | serialize(String projectType, TypeDescriptor typeDescriptor, PaletteDescriptor paletteDescriptor, List<PropertyDescriptor> properties, List<PresenterSerializer> presenters) Creates a new component descriptor and stores it into xml file and add it into global descriptor registry. | public static boolean | writeDocument(FileObject folder, String filename, String ext, Document doc) | public static void | writeDocument(FileObject file, Document doc) |
refreshDescriptorRegistry | public static void refreshDescriptorRegistry(String projectType)(Code) | | Invokes refreshing of descriptor registry of a specified project type.
Parameters: projectType - the project type |
runUnderDescriptorRegistryReadAccess | public static void runUnderDescriptorRegistryReadAccess(String projectType, Runnable runnable)(Code) | | Runs a task under read access on description registry.
Parameters: projectType - the project type Parameters: runnable - the task |
runUnderDescriptorRegistryWriteAccess | public static void runUnderDescriptorRegistryWriteAccess(String projectType, Runnable runnable)(Code) | | Runs a task under write access on description registry.
Parameters: projectType - the project type Parameters: runnable - the task |
serialize | public static void serialize(String projectType, TypeDescriptor typeDescriptor, PaletteDescriptor paletteDescriptor, List<PropertyDescriptor> properties, List<PresenterSerializer> presenters)(Code) | | Creates a new component descriptor and stores it into xml file and add it into global descriptor registry.
After you add all custom component descriptors, then call ComponentSerializationSupport.refresh to refresh the registry.
Parameters: projectType - the project type Parameters: typeDescriptor - the type descriptor Parameters: paletteDescriptor - the palette descriptor Parameters: properties - the list of declared properties Parameters: presenters - the list of presenter serializers |
|
|