use of com.centurylink.mdw.plugin.designer.model.ActivityImpl in project mdw-designer by CenturyLinkCloud.
the class WorkflowProject method getSuppressedActivityImplementors.
public List<String> getSuppressedActivityImplementors() throws IOException {
if (suppressedActivityImplementors == null) {
suppressedActivityImplementors = new ArrayList<>();
String compressed = getPersistentProperty(MDW_SUPPRESSED_ACTIVITY_IMPLEMENTORS);
String suppressedImplsProp = compressed == null ? null : StringHelper.uncompress(compressed);
if (suppressedImplsProp == null) {
if (checkRequiredVersion(5, 5)) {
// suppress the old baseline package impls by default
WorkflowPackage baseline52 = getPackage("MDW Baseline");
if (baseline52 != null) {
for (ActivityImpl impl : baseline52.getActivityImpls()) suppressedActivityImplementors.add(impl.getImplClassName());
}
}
} else {
for (String impl : suppressedImplsProp.split(",")) suppressedActivityImplementors.add(impl);
}
}
return suppressedActivityImplementors;
}
use of com.centurylink.mdw.plugin.designer.model.ActivityImpl in project mdw-designer by CenturyLinkCloud.
the class DesignerProxy method getGenericActivityImpl.
/**
* Returns the default implementor as a generic representation.
*/
public ActivityImpl getGenericActivityImpl(String implClass) {
ActivityImplementorVO implVO = dataAccess.getDesignerDataModel().getNodeMetaInfo().getDefaultActivity();
if (implVO == null) {
// even base impl cannot be loaded
implVO = new ActivityImplementorVO();
implVO.setLabel(implClass);
implVO.setAttributeDescription("<PAGELET/>");
}
implVO.setImplementorClassName(implClass);
ActivityImpl impl = new ActivityImpl(implVO, project.getDefaultPackage());
impl.setProject(project);
return impl;
}
use of com.centurylink.mdw.plugin.designer.model.ActivityImpl in project mdw-designer by CenturyLinkCloud.
the class ToolboxFilterDialog method createSelectButtons.
private void createSelectButtons(Composite parent) {
Composite buttonComposite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.numColumns = 0;
layout.marginWidth = 0;
layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
buttonComposite.setLayout(layout);
buttonComposite.setLayoutData(new GridData(SWT.END, SWT.TOP, true, false));
Button selectButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, "Select All", false);
selectButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
suppressedImplementors = new ArrayList<>();
treeViewer.refresh();
}
});
Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, "Deselect All", false);
deselectButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
suppressedImplementors = new ArrayList<>();
for (WorkflowPackage pkg : workflowProject.getTopLevelUserVisiblePackages()) {
for (ActivityImpl impl : pkg.getActivityImpls()) {
if (!suppressedImplementors.contains(impl.getImplClassName()))
suppressedImplementors.add(impl.getImplClassName());
}
}
treeViewer.refresh();
}
});
}
use of com.centurylink.mdw.plugin.designer.model.ActivityImpl in project mdw-designer by CenturyLinkCloud.
the class ToolboxFilterDialog method createPackageTree.
private void createPackageTree(Composite parent) {
treeViewer = new CheckboxTreeViewer(parent, SWT.CHECK | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
treeViewer.setContentProvider(new ViewContentProvider());
treeViewer.setLabelProvider(new ViewLabelProvider());
treeViewer.setCheckStateProvider(new ViewCheckStateProvider());
treeViewer.setInput(workflowProject.getTopLevelUserVisiblePackages());
GridData data = new GridData(GridData.FILL_BOTH);
data.heightHint = 400;
treeViewer.getTree().setLayoutData(data);
treeViewer.addCheckStateListener(new ICheckStateListener() {
public void checkStateChanged(CheckStateChangedEvent event) {
boolean checked = event.getChecked();
if (event.getElement() instanceof WorkflowPackage) {
WorkflowPackage pkg = (WorkflowPackage) event.getElement();
for (ActivityImpl impl : pkg.getActivityImpls()) {
if (checked)
suppressedImplementors.remove(impl.getImplClassName());
else if (!suppressedImplementors.contains(impl.getImplClassName()))
suppressedImplementors.add(impl.getImplClassName());
}
treeViewer.refresh();
} else if (event.getElement() instanceof ActivityImpl) {
ActivityImpl impl = (ActivityImpl) event.getElement();
if (checked)
suppressedImplementors.remove(impl.getImplClassName());
else if (!suppressedImplementors.contains(impl.getImplClassName()))
suppressedImplementors.add(impl.getImplClassName());
treeViewer.refresh();
}
}
});
ColumnViewerToolTipSupport.enableFor(treeViewer);
}
Aggregations