XML Editor 21.0
We have a requirement to capture the user input and insert into ditamap.
I've taken the sample of workspace access extension plugin as base and created a menu option(i.e Metadata Form) to open a Swing window form. Able to capture the userinput data some thing as below.
Code: Select all
public class CustomWorkspaceAccessPluginExtension implements WorkspaceAccessPluginExtension {
@SuppressWarnings("serial")
private AbstractAction createShowOpenMetadataformAction(
final StandalonePluginWorkspace pluginWorkspaceAccess) {
return new AbstractAction("Metadata Form") {
public void actionPerformed(ActionEvent actionevent) {
//Get the current opened XML document
// pluginWorkspaceAccess.showInformationMessage("Iam in Metadata form");
MetadataForm.display();
String category = MetadataForm.getCategory();
}
};
}
Code: Select all
public class MetadataForm extends JFrame{
public MetadataForm(){
JPanel mainPanel = new JPanel(new GridBagLayout());
HashMap<String,String> categoryMap = extractSSOT("2003");
}
}
Code: Select all
<keydef>
<topicmeta>
<keywords>
<keyword>
categrogy: Category
<keyword>
</keywords>
</topicmeta>
</keydef>
Thanks,
Samba.