Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
b9a9738f
Commit
b9a9738f
authored
Feb 18, 2026
by
Luna Riegel
Browse files
Feat: Add CityObject retrieval passthrough for View
parent
c3ec34c5
Changes
3
Show whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModel.java
View file @
b9a9738f
...
@@ -119,6 +119,14 @@ public class CityDoctorModel {
...
@@ -119,6 +119,14 @@ public class CityDoctorModel {
return
globalErrors
;
return
globalErrors
;
}
}
public
CityObject
getCityObject
(
GmlId
gmlid
){
CityObject
co
=
cache
.
get
(
gmlid
);
if
(
co
==
null
){
throw
new
IllegalArgumentException
(
"Requested CityObject "
+
gmlid
+
", which doesn't exist"
);
}
return
co
;
}
public
File
getFile
()
{
public
File
getFile
()
{
return
file
;
return
file
;
}
}
...
...
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/CityDoctorController.java
View file @
b9a9738f
...
@@ -1604,6 +1604,15 @@ public class CityDoctorController {
...
@@ -1604,6 +1604,15 @@ public class CityDoctorController {
return
model
;
return
model
;
}
}
public
CityObject
retrieveCityObject
(
GmlId
gmlId
)
{
try
{
return
model
.
getCityObject
(
gmlId
);
}
catch
(
IllegalArgumentException
e
){
logger
.
warn
(
e
.
getMessage
());
return
null
;
}
}
public
void
showView
(
View
v
)
{
public
void
showView
(
View
v
)
{
v
.
fireOnShowEvent
(
model
,
currentChecker
,
mainWindow
);
v
.
fireOnShowEvent
(
model
,
currentChecker
,
mainWindow
);
}
}
...
...
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/MainWindow.java
View file @
b9a9738f
...
@@ -5,6 +5,7 @@ import de.hft.stuttgart.citydoctor2.check.ValidationConfiguration;
...
@@ -5,6 +5,7 @@ import de.hft.stuttgart.citydoctor2.check.ValidationConfiguration;
import
de.hft.stuttgart.citydoctor2.datastructure.BoundingBox
;
import
de.hft.stuttgart.citydoctor2.datastructure.BoundingBox
;
import
de.hft.stuttgart.citydoctor2.datastructure.CityObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.CityObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.FeatureType
;
import
de.hft.stuttgart.citydoctor2.datastructure.FeatureType
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlId
;
import
de.hft.stuttgart.citydoctor2.gui.logger.GuiLogger
;
import
de.hft.stuttgart.citydoctor2.gui.logger.GuiLogger
;
import
de.hft.stuttgart.citydoctor2.gui.tree.Renderable
;
import
de.hft.stuttgart.citydoctor2.gui.tree.Renderable
;
import
de.hft.stuttgart.citydoctor2.gui.tree.RenderableTreeCell
;
import
de.hft.stuttgart.citydoctor2.gui.tree.RenderableTreeCell
;
...
@@ -830,6 +831,9 @@ public class MainWindow extends Application {
...
@@ -830,6 +831,9 @@ public class MainWindow extends Application {
node
.
getFeatureExportAction
(
this
);
node
.
getFeatureExportAction
(
this
);
}
}
public
CityObject
retrieveCityObject
(
GmlId
id
){
return
controller
.
retrieveCityObject
(
id
);
}
private
void
setupSelectListener
(
TreeView
<
Renderable
>
view
)
{
private
void
setupSelectListener
(
TreeView
<
Renderable
>
view
)
{
view
.
getSelectionModel
().
selectedItemProperty
().
addListener
((
obs
,
oldI
,
newI
)
->
{
view
.
getSelectionModel
().
selectedItemProperty
().
addListener
((
obs
,
oldI
,
newI
)
->
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment