@PluginRequestEditorView

Applies to ReadyAPI 3.10, last modified on October 07, 2021

The PluginRequestEditor view creates a custom Request Editor view, to be used for new message formats, or API-specific messages. The editor is displayed as a tab in the message editor panel.

The viewId property defines the name of the View.

The annotated class must implement the EditorView interface.

Sample Request Editor

package com.smartbear.ready.plugin.template.factories;

import com.eviware.soapui.model.ModelItem;
import com.eviware.soapui.plugins.auto.PluginRequestEditorView;
import com.eviware.soapui.support.editor.Editor;
import com.eviware.soapui.support.editor.views.AbstractXmlEditorView;
import com.eviware.soapui.support.editor.xml.XmlEditor;

import javax.swing.JComponent;
import javax.swing.JLabel;

/**
*
*/

@PluginRequestEditorView(viewId = "SampleRequestEditorView")
public class SampleRequestEditorView extends AbstractXmlEditorView {

private ModelItem modelItem;

public SampleRequestEditorView(Editor<?> editor, ModelItem modelItem) {
super("Request Editor View", (XmlEditor) editor, "SampleRequestEditorView");
this.modelItem = modelItem;
}

@Override
public JComponent getComponent() {
return new JLabel(modelItem.getName());
}

@Override
public void setEditable(boolean enabled) {

}

@Override
public boolean saveDocument(boolean validate) {
return true;
}
}
Highlight search results