use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditorList in project mdw-designer by CenturyLinkCloud.
the class TaskTemplateEditor method createPages.
@Override
protected void createPages() {
pages = new HashMap<>();
try {
WorkflowAsset pageletAsset = taskTemplate.getPagelet();
if (!pageletAsset.isLoaded())
pageletAsset.load();
String pageletXml = pageletAsset.getContent();
propertyEditors = new PropertyEditorList(taskTemplate, pageletXml);
// general section
addPage((String) null);
int pageCount = 1;
for (String section : propertyEditors.getSections()) {
addPage(section);
pageCount++;
}
addPage(textEditor, getEditorInput());
setPageText(pageCount, "Source");
pages.put("Source", textEditor);
firePropertyChange(PROP_TITLE);
taskTemplate.addElementChangeListener(this);
taskTemplate.addDirtyStateListener(this);
} catch (PartInitException ex) {
PluginMessages.uiError(getSite().getShell(), ex, "Task Template", taskTemplate.getProject());
}
}
use of com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditorList in project mdw-designer by CenturyLinkCloud.
the class AssetDrivenActivityCustomSection method select.
@Override
public boolean select(Object toTest) {
if (toTest == null || !(toTest instanceof Activity))
return false;
Activity testActivity = (Activity) toTest;
if (// manual tasks have asset-driven widgets
testActivity.isManualTask())
// but no custom section
return false;
if (// so do subprocess launch activities
testActivity.isSubProcessInvoke())
return false;
if (testActivity.isForProcessInstance())
return false;
PropertyEditorList propEditorList = new PropertyEditorList((Activity) toTest);
for (PropertyEditor propertyEditor : propEditorList) {
// return true if any widgets are considered asset-driven
if (propertyEditor instanceof WorkflowAssetEditor)
return true;
}
return false;
}
Aggregations