X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.district.network.ui%2Fsrc%2Forg%2Fsimantics%2Fdistrict%2Fnetwork%2Fui%2Ftechtype%2Ftable%2FTechTypeTableView.java;fp=org.simantics.district.network.ui%2Fsrc%2Forg%2Fsimantics%2Fdistrict%2Fnetwork%2Fui%2Ftechtype%2Ftable%2FTechTypeTableView.java;h=d66c9a8caa05be2a1d4630fedb24d9a68525e1e9;hb=29af77f249a4842bfd3f9280755121c9c98b32a1;hp=8f4b57c98b88384bbfaa9f46594406ab7976c7eb;hpb=62f9a86961adc4fd44782e3c2f79852b1269810d;p=simantics%2Fdistrict.git diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/techtype/table/TechTypeTableView.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/techtype/table/TechTypeTableView.java index 8f4b57c9..d66c9a8c 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/techtype/table/TechTypeTableView.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/techtype/table/TechTypeTableView.java @@ -16,15 +16,10 @@ import org.eclipse.e4.ui.model.application.ui.menu.MToolBar; import org.eclipse.e4.ui.model.application.ui.menu.MToolBarElement; import org.eclipse.e4.ui.workbench.modeling.ESelectionService; import org.eclipse.swt.widgets.Composite; -import org.simantics.Simantics; import org.simantics.db.Resource; import org.simantics.db.common.NamedResource; -import org.simantics.db.common.procedure.adapter.TransientCacheListener; import org.simantics.db.exception.DatabaseException; -import org.simantics.db.layer0.request.PossibleActiveModel; import org.simantics.district.network.DistrictNetworkUtil; -import org.simantics.district.network.techtype.requests.PossibleTechTypeTable; -import org.simantics.district.network.techtype.requests.PossibleTechTypeTableData; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -94,21 +89,7 @@ public class TechTypeTableView { LOGGER.debug("Pipe component type is {}", pipe); - String data = null; - Resource tableResource = null; - if (pipe != null) { - try { - Resource model = Simantics.getSession().syncRequest(new PossibleActiveModel(Simantics.getProjectResource())); - if (model != null) { - tableResource = Simantics.getSession().syncRequest(new PossibleTechTypeTable(model, pipe), TransientCacheListener.instance()); - data = Simantics.getSession().syncRequest(new PossibleTechTypeTableData(model, pipe), TransientCacheListener.instance()); - } - } catch (DatabaseException e) { - LOGGER.error("Failed to read tech type table data for {}", pipe, e); - } - } - - table = new TechTypeTable(parent, 0, pipe, tableResource, data); + table = new TechTypeTable(parent, 0, pipe); } @PreDestroy