Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ public Table createDiffTable(final TableInfo tableInfo,
} catch (final Exception e) {
logger.error("Transformation Error: {} : {}", //$NON-NLS-1$
tableInfo.shortcut(), e.getMessage());
tableStatus.setNonTransformable(true);
tableStatus.setErrorMessages(e.getMessage());
broker.post(Events.TABLEERROR_CHANGED, null);
// Give empty table back
return createEmptyTable(tableInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
*/
package org.eclipse.set.services.table;

import java.util.Optional;

/**
* The status of the Pt1 table by each table state/control area
*
Expand All @@ -19,7 +21,7 @@ public class TableStatus {
private boolean containsErrors;
private boolean containsStateChanged;
private boolean containsPlanChanged;
private boolean nonTransformable;
private Optional<String> errorMessages;
private boolean isEmpty;

/**
Expand All @@ -36,7 +38,7 @@ public void reset() {
containsErrors = false;
containsPlanChanged = false;
containsStateChanged = false;
nonTransformable = false;
errorMessages = Optional.empty();
isEmpty = false;
}

Expand Down Expand Up @@ -89,15 +91,15 @@ public void setContainsPlanChanged(final boolean containsPlanChanged) {
* @return true, if table non transformable
*/
public boolean isNonTransformable() {
return nonTransformable;
return errorMessages.isPresent();
}

/**
* @param nonTransformable
* true, if table non transformable
* @param errorMessages
* the error messages by table transformation
*/
public void setNonTransformable(final boolean nonTransformable) {
this.nonTransformable = nonTransformable;
public void setErrorMessages(final String errorMessages) {
this.errorMessages = Optional.ofNullable(errorMessages);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ public int compareKm(final Set<String> firstKms,
}

private boolean kmPatternCheck(final String km) {
if (km == null) {
return true;
}
final Matcher matcher = PunktObjektStreckeExtensions.KILOMETRIERUNG_PATTERN
.matcher(km);
if (!matcher.matches()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ public boolean isOutdated() {
* whether to enable the export button
*/
public void setEnableExport(final boolean enabled) {
if (exportButton.isDisposed()) {
return;
}
exportButton.setEnabled(enabled);
}

Expand Down
Loading