Skip to content

Commit 698b592

Browse files
TruongQuangSBmariusheineeclipse-set-bot
authored
Table: Implement Sxxx – Tabelle weiterer Bearbeitungsvermerke (#2160)
* Ssbv: initial * Designation * Ssbv: handle by open another table * Update Object designation * Fix * SwtBot: add test case for Ssbv * SWTBot disable new test and format * Change table name * Rename template * Rerfresh nattable * Active SWTBot test for Sxxx * fix build error * add column C and add separate rows per value in column B * update Sxxx table * fix nullpointer exceptions when generating tables * fix comment for merging sxxx columns * calculate references of worknotes per table * update tablemodel ecore * Update Sxxx table * Update table reference * update fill column c --------- Co-authored-by: Marius Heine <m.heine@geprog.com> Co-authored-by: eclipse-set-bot <set-bot@eclipse.org>
1 parent 3ee809b commit 698b592

416 files changed

Lines changed: 2945 additions & 164 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

java/bundles/org.eclipse.set.basis/src/org/eclipse/set/basis/constants/Events.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,9 @@ public interface Events {
110110
* When a subwork is selected
111111
*/
112112
String SUBWORK_CHANGED = "subwork/change";
113+
114+
/**
115+
* When a table open after Worknotes table - Sxxx
116+
*/
117+
String RELOAD_WORKNOTES_TABLE = "table/reload/Sxxx";
113118
}

java/bundles/org.eclipse.set.basis/src/org/eclipse/set/basis/constants/ToolboxConstants.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public interface CacheId {
9797
* The cache id for the route and route km of the {@link Punkt_Objekt}
9898
*/
9999
public static final String POINT_OBJECT_ROUTE_KM = "toolbox.cache.point-object-route-km";
100+
100101
}
101102

102103
/**
@@ -292,6 +293,11 @@ public interface CacheId {
292293
*/
293294
public static final String ESTW_SUPPLEMENT_PART_ID_PREFIX = "org.eclipse.set.feature.table.supplement-estw";
294295

296+
/**
297+
* The prefix of Supplement table part
298+
*/
299+
public static final String SUPPLEMENT_TABLE_PART_ID_PREFIX = "org.eclipse.set.feature.table.supplement";
300+
295301
/**
296302
* Rounding result of BigDecimal.divide to place after comma
297303
*/
@@ -357,6 +363,11 @@ public interface CacheId {
357363
*/
358364
public static final String TITLE_FILE_NAME_SEPARATOR = " ⇔ ";
359365

366+
/**
367+
* Shortcut of Worknotes table
368+
*/
369+
public static final String WORKNOTES_TABLE_SHORTCUT = "Sxxx"; //$NON-NLS-1$
370+
360371
/**
361372
* The tolerance value between TOP_Kante length and the sum of GEO_Kanten
362373
* length, which belong to this TOP_Kante (in Meter)

java/bundles/org.eclipse.set.feature.export/src/org/eclipse/set/feature/export/pdf/TableToTableDocument.xtend

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@ import javax.imageio.ImageIO
1717
import javax.xml.parsers.DocumentBuilderFactory
1818
import javax.xml.parsers.ParserConfigurationException
1919
import org.eclipse.set.basis.FreeFieldInfo
20+
import org.eclipse.set.basis.constants.ToolboxConstants
2021
import org.eclipse.set.model.tablemodel.CellContent
2122
import org.eclipse.set.model.tablemodel.CompareCellContent
2223
import org.eclipse.set.model.tablemodel.CompareFootnoteContainer
2324
import org.eclipse.set.model.tablemodel.CompareTableCellContent
25+
import org.eclipse.set.model.tablemodel.CompareTableFootnoteContainer
2426
import org.eclipse.set.model.tablemodel.FootnoteContainer
2527
import org.eclipse.set.model.tablemodel.MultiColorCellContent
2628
import org.eclipse.set.model.tablemodel.MultiColorContent
29+
import org.eclipse.set.model.tablemodel.PlanCompareRow
2730
import org.eclipse.set.model.tablemodel.SimpleFootnoteContainer
2831
import org.eclipse.set.model.tablemodel.Table
2932
import org.eclipse.set.model.tablemodel.TableContent
@@ -41,15 +44,12 @@ import org.w3c.dom.Document
4144
import org.w3c.dom.Element
4245

4346
import static extension org.eclipse.set.model.tablemodel.extensions.CellContentExtensions.*
47+
import static extension org.eclipse.set.model.tablemodel.extensions.TableCellExtensions.*
4448
import static extension org.eclipse.set.model.tablemodel.extensions.TableContentExtensions.*
4549
import static extension org.eclipse.set.model.tablemodel.extensions.TableExtensions.*
46-
import static extension org.eclipse.set.model.tablemodel.extensions.TableCellExtensions.*
4750
import static extension org.eclipse.set.model.tablemodel.extensions.TableRowExtensions.*
4851
import static extension org.eclipse.set.utils.StringExtensions.*
4952
import static extension org.eclipse.set.utils.export.xsl.siteplan.SiteplanXSL.pxToMilimeter
50-
import org.eclipse.set.basis.constants.ToolboxConstants
51-
import org.eclipse.set.model.tablemodel.PlanCompareRow
52-
import org.eclipse.set.model.tablemodel.CompareTableFootnoteContainer
5353

5454
/**
5555
* Transformation from {@link Table} to TableDocument {@link Document}.
@@ -63,7 +63,7 @@ class TableToTableDocument {
6363

6464
public static val String FOOTNOTE_INLINE_TEXT_SEPARATOR = String.
6565
format("%n")
66-
private static val String FOOTNOTE_MARK_SEPRATOR = "; "
66+
static val String FOOTNOTE_MARK_SEPRATOR = "; "
6767

6868
val Document doc
6969
var String tablename
@@ -419,13 +419,17 @@ class TableToTableDocument {
419419
private dispatch def void addFootnoteContent(Element element,
420420
CompareFootnoteContainer fc, int columnNumber, boolean isRemarkColumn) {
421421
val separator = remarkTextInlnie ? FOOTNOTE_INLINE_TEXT_SEPARATOR : FOOTNOTE_MARK_SEPRATOR
422-
val oldFootnotes = fc.oldFootnotes.map[getFootnoteInfo(fc, it)].map [
422+
val oldFootnotes = fc.oldFootnotes.footnotes.map [
423+
getFootnoteInfo(fc, it)
424+
].map [
423425
remarkTextInlnie ? toText : toShorthand
424426
].iterableToString(separator)
425-
val newFootnotes = fc.newFootnotes.map[getFootnoteInfo(fc, it)].map [
427+
val newFootnotes = fc.newFootnotes.footnotes.map [
428+
getFootnoteInfo(fc, it)
429+
].map [
426430
remarkTextInlnie ? toText : toShorthand
427431
].iterableToString(separator)
428-
val unchangedFootnotes = fc.unchangedFootnotes.map [
432+
val unchangedFootnotes = fc.unchangedFootnotes.footnotes.map [
429433
getFootnoteInfo(fc, it)
430434
].map[remarkTextInlnie ? toText : toShorthand].
431435
iterableToString(separator)
@@ -487,8 +491,9 @@ class TableToTableDocument {
487491
private def Element addContentToElement(String content, Element element,
488492
int columnNumber, boolean isRemarkColumn) {
489493
val checkOutput = content.checkForTestOutput(columnNumber)
490-
element.textContent = isRemarkColumn ? checkOutput : checkOutput.
491-
intersperseWithZeroSpacesSC
494+
element.textContent = isRemarkColumn
495+
? checkOutput
496+
: checkOutput.intersperseWithZeroSpacesSC
492497
return element
493498
}
494499

java/bundles/org.eclipse.set.feature.table.pt1/META-INF/MANIFEST.MF

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,6 @@ Service-Component: OSGI-INF/org.eclipse.set.feature.table.pt1.messages.Messages.
161161
OSGI-INF/org.eclipse.set.feature.table.pt1.sszs.SszsDescriptionService.xml,
162162
OSGI-INF/org.eclipse.set.feature.table.pt1.sszs.SszsTransformationService.xml,
163163
OSGI-INF/org.eclipse.set.feature.table.pt1.sszw.SszwDescriptionService.xml,
164-
OSGI-INF/org.eclipse.set.feature.table.pt1.sszw.SszwTransformationService.xml
164+
OSGI-INF/org.eclipse.set.feature.table.pt1.sszw.SszwTransformationService.xml,
165+
OSGI-INF/org.eclipse.set.feature.table.pt1.sxxx.SxxxDescriptionService.xml,
166+
OSGI-INF/org.eclipse.set.feature.table.pt1.sxxx.SxxxTransformationService.xml

java/bundles/org.eclipse.set.feature.table.pt1/OSGI-INF/l10n/bundle.properties

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,10 @@ ToolboxTableNameSslsShort=Ssls
184184
ToolboxTableNameSslsLong=Signalisierungstabelle
185185
ToolboxTableNameSslsPlanningNumber=??
186186

187+
SxxxDescriptionService_ViewName=Sxxx – Tabelle weiterer Bearbeitungsvermerke
188+
SxxxDescriptionService_ViewTooltip=Tabelle weiterer Bearbeitungsvermerke
189+
SxxxTableView_Heading=Tabelle weiterer Bearbeitungsvermerke – Sxxx
190+
ToolboxTableNameSxxxShort=Sxxx
191+
ToolboxTableNameSxxxLong=Tabelle weiterer Bearbeitungsvermerke
192+
ToolboxTableNameSxxxPlanningNumber=??
193+

java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/FootnoteTransformation.xtend

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,14 @@ class FootnoteTransformation {
6868
def void transform(Basis_Objekt object, TableRow row) {
6969
this.row = row
7070
// Direct attachment notes
71-
object?.IDBearbeitungsvermerk?.map[value]?.toSet?.forEach[addFootnote]
72-
object?.referenceFootnotes?.map[value]?.toSet?.forEach[addFootnote]
71+
object?.IDBearbeitungsvermerk?.map[value]?.toSet?.forEach [
72+
object.addFootnote(it)
73+
]
74+
object?.referenceFootnotes?.map[value]?.toSet?.forEach [
75+
object.addFootnote(it)
76+
]
7377

74-
object?.transformObjectStateEnum?.value?.addFootnote
78+
object?.addFootnote(object?.transformObjectStateEnum?.value)
7579
}
7680

7781
private def dispatch Iterable<ID_Bearbeitungsvermerk_TypeClass> getReferenceFootnotes(
@@ -125,7 +129,8 @@ class FootnoteTransformation {
125129
val objectStateNote = #[signalRahmen?.transformObjectStateEnum].
126130
filterNull
127131
val signalBegriffFootntoes = signalRahmen?.signalbegriffe?.flatMap [
128-
IDBearbeitungsvermerk
132+
val stateNote = #[transformObjectStateEnum].filterNull
133+
return #[stateNote, IDBearbeitungsvermerk].filterNull.flatten
129134
]?.filterNull
130135
return #[rahmenFootnotes, objectStateNote, signalBegriffFootntoes].
131136
filterNull.flatten
@@ -284,13 +289,17 @@ class FootnoteTransformation {
284289
return #[routeNotes, kmNotes].filterNull.flatten
285290
}
286291

287-
private def void addFootnote(Bearbeitungsvermerk comment) {
288-
if (comment === null) {
292+
private def void addFootnote(Basis_Objekt obj,
293+
Bearbeitungsvermerk comment) {
294+
if (obj === null || comment === null) {
289295
return
290296
}
291-
if (row.footnotes === null)
297+
if (row.footnotes === null) {
292298
row.footnotes = TablemodelFactory.eINSTANCE.
293299
createSimpleFootnoteContainer()
300+
(row.footnotes as SimpleFootnoteContainer).ownerObject = obj
301+
}
302+
294303
(row.footnotes as SimpleFootnoteContainer).footnotes.add(comment)
295304
}
296305
}

java/bundles/org.eclipse.set.feature.table.pt1/src/org/eclipse/set/feature/table/pt1/messages/Messages.java

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,4 +793,34 @@ private void bindBundleLocalization(
793793
*/
794794
public String ToolboxTableNameSslsPlanningNumber;
795795

796+
/**
797+
* Sxxx
798+
*/
799+
public String ToolboxTableNameSxxxShort;
800+
801+
/**
802+
* Tabelle weiterer Bearbeitungsvermerke – Sxxx
803+
*/
804+
public String SxxxTableView_Heading;
805+
806+
/**
807+
* Tabelle weiterer Bearbeitungsvermerke
808+
*/
809+
public String ToolboxTableNameSxxxLong;
810+
811+
/**
812+
* ???
813+
*/
814+
public String ToolboxTableNameSxxxPlanningNumber;
815+
816+
/**
817+
* Sxxx – Tabelle weiterer Bearbeitungsvermerke
818+
*/
819+
public String SxxxDescriptionService_ViewName;
820+
821+
/**
822+
* Tabelle weiterer Bearbeitungsvermerke
823+
*/
824+
public String SxxxDescriptionService_ViewTooltip;
825+
796826
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* Copyright (c) 2026 DB InfraGO AG and others
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v2.0 which is available at
6+
* https://www.eclipse.org/legal/epl-2.0.
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
*/
11+
package org.eclipse.set.feature.table.pt1.sxxx;
12+
13+
/**
14+
*
15+
*/
16+
@SuppressWarnings("nls")
17+
public class SxxxColumns {
18+
/**
19+
* A: Inhalt Bearbeitungsvermerk
20+
*/
21+
public static final String Text_Content = "A";
22+
23+
/**
24+
* B: Referenziert von Objekt
25+
*/
26+
public static final String Reference_Object = "B";
27+
28+
/**
29+
* C: Ausgabe in Plan
30+
*/
31+
public static final String Visualation_In_Table = "C";
32+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Copyright (c) 2026 DB InfraGO AG and others
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v2.0 which is available at
6+
* https://www.eclipse.org/legal/epl-2.0.
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
*/
11+
package org.eclipse.set.feature.table.pt1.sxxx;
12+
13+
import org.eclipse.set.core.services.part.PartDescriptionService;
14+
import org.eclipse.set.feature.table.AbstractESTWSupplementTableDesciption;
15+
import org.eclipse.set.feature.table.pt1.messages.Messages;
16+
import org.osgi.service.component.annotations.Component;
17+
import org.osgi.service.component.annotations.Reference;
18+
19+
/**
20+
*
21+
*/
22+
@Component(service = PartDescriptionService.class)
23+
public class SxxxDescriptionService
24+
extends AbstractESTWSupplementTableDesciption {
25+
26+
@Reference
27+
Messages messages;
28+
29+
@Override
30+
protected String getToolboxViewName() {
31+
return messages.SxxxDescriptionService_ViewName;
32+
}
33+
34+
@Override
35+
protected String getToolboxViewTooltip() {
36+
return messages.SxxxDescriptionService_ViewTooltip;
37+
}
38+
39+
@Override
40+
protected String getTableShortcut() {
41+
return messages.ToolboxTableNameSxxxShort;
42+
}
43+
44+
}

0 commit comments

Comments
 (0)