Commit 04a99c1d authored by Romain Bioteau's avatar Romain Bioteau
Browse files

fix(builder) index uid pages after starting UID

parent 25942c1a
......@@ -16,6 +16,8 @@ package org.bonitasoft.studio.designer.core.bar;
import org.bonitasoft.studio.model.process.Element;
import org.bonitasoft.studio.model.process.FormMapping;
import org.bonitasoft.studio.model.process.ProcessPackage;
import org.bonitasoft.studio.model.process.Task;
public abstract class FormMappingException extends Exception {
......@@ -28,4 +30,16 @@ public abstract class FormMappingException extends Exception {
protected String containerName() {
return ((Element) formMapping.eContainer()).getName();
}
protected String containerType() {
return formMapping.eContainer() instanceof Task ? "task" : formType();
}
private String formType() {
return ProcessPackage.Literals.PAGE_FLOW__FORM_MAPPING.equals(formMapping.eContainingFeature()) ? "overview form" : "instantiation form";
}
protected String formId() {
return formMapping.getTargetForm().hasContent() ? formMapping.getTargetForm().getContent() : null;
}
}
......@@ -14,9 +14,7 @@
*/
package org.bonitasoft.studio.designer.core.bar;
import org.bonitasoft.studio.designer.i18n.Messages;
import org.bonitasoft.studio.model.process.FormMapping;
import org.eclipse.osgi.util.NLS;
public class InternalFormNotFoundException extends FormMappingException {
......@@ -26,7 +24,10 @@ public class InternalFormNotFoundException extends FormMappingException {
@Override
public String getMessage() {
return NLS.bind(Messages.internalFormMappingUndefined, containerName());
if(formId() != null) {
return String.format("UIDesigner form with id '%s' has not been found for '%s' %s.", formId(), containerName(), containerType());
}
return String.format("No UIDesigner form is undefined on '%s' %s.", formId(), containerName(), containerType());
}
}
......@@ -401,11 +401,13 @@ public class ExportBarWizardPage extends WizardPage implements ICheckStateListen
final StringBuilder report = new StringBuilder("");
final List<String> alreadyInReport = new ArrayList<>(selectedList.size());
for (final IStatus s : status.getChildren()) {
final String fileName = s.getMessage().substring(0, s.getMessage().indexOf(":"));
if (!alreadyInReport.contains(fileName)) {
report.append(fileName);
report.append("\n");
alreadyInReport.add(fileName);
if(s.getMessage() != null && s.getMessage().indexOf(":") != -1) {
final String fileName = s.getMessage().substring(0, s.getMessage().indexOf(":"));
if (!alreadyInReport.contains(fileName)) {
report.append(fileName);
report.append("\n");
alreadyInReport.add(fileName);
}
}
}
if (!FileActionDialog.getDisablePopup()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment