private int diameterIndex;
private int outerDiamterIndex;
private int nominalMassFlowIndex;
+ private int sewageProductionIndex;
// Third page
public int getNominalMassFlowIndex() {
return nominalMassFlowIndex;
}
+
+ public void setSewageProductionIndex(int sewageProductionIndex) {
+ this.sewageProductionIndex = sewageProductionIndex;
+ }
+
+ public int getSewageProductionIndex() {
+ return sewageProductionIndex;
+ }
}
int zCoordColumnIndex = model.getZCoordIndex();
int tempColumnIndex = model.getTempIndex();
int pressureColumnIndex = model.getPressureIndex();
+ int sewageProductionColumnIndex = model.getSewageProductionIndex();
int startXCoordColumnIndex = model.getStartXCoordIndex();
int startYCoordColumnIndex = model.getStartYCoordIndex();
} catch (NumberFormatException e) {
throw new DatabaseException(e);
}
+ }
+ String sewageProductionS = row.get(sewageProductionColumnIndex);
+ if (!sewageProductionS.isEmpty()) {
+ try {
+ double sewageProduction = Double.parseDouble(sewageProductionS);
+ graph.claimLiteral(vertex, DN.Vertex_HasSewageProduction, sewageProduction, Bindings.DOUBLE);
+ } catch (NumberFormatException e) {
+ throw new DatabaseException(e);
+ }
}
} else {
private DynamicComboFieldEditor endZValueSelector;
private DynamicComboFieldEditor tempValueSelector;
private DynamicComboFieldEditor pressureValueSelector;
+ private DynamicComboFieldEditor sewageProductionValueSelector;
private DynamicComboFieldEditor outerDiameterSelector;
private DynamicComboFieldEditor diameterSelector;
validatePageComplete();
}
});
+
+ sewageProductionValueSelector = new DynamicComboFieldEditor("sewageProductionValue", "Sewage production value", parent);
+ sewageProductionValueSelector.addComboListener(new SelectionListener() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ widgetDefaultSelected(e);
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ model.setSewageProductionIndex(Integer.parseInt(sewageProductionValueSelector.getValue()));
+ validatePageComplete();
+ }
+ });
}
private void createEdgeIndexMappingField(Group parent) {
zValueSelector.updateCombo(namesAndValues);
pressureValueSelector.updateCombo(namesAndValues);
tempValueSelector.updateCombo(namesAndValues);
+ sewageProductionValueSelector.updateCombo(namesAndValues);
}
private void updateHeaders() {
if (model.isVertexImport())
setPageComplete(model.getXCoordIndex() != -1 && model.getYCoordIndex() != -1 && model.getComponentMappingIndex() != -1);
else
- setPageComplete(model.getStartXCoordIndex() != 1 && model.getStartYCoordIndex() != -1 && model.getEndXCoordIndex() != -1 && model.getEndYCoordIndex() != -1 && model.getComponentMappingIndex() != -1);
+ setPageComplete(model.getStartXCoordIndex() != -1 && model.getStartYCoordIndex() != -1 && model.getEndXCoordIndex() != -1 && model.getEndYCoordIndex() != -1 && model.getComponentMappingIndex() != -1);
}
}
DN.Vertex <T DIA.Element : L0.Type
@L0.assert DN.Vertex.HasElevation 0.0
+ @L0.assert DN.Vertex.HasSewageProduction 0.0
DN.EdgeDefaultMapping <R L0.HasProperty : DN.EdgeMappingParameterType
L0.HasLabel "Default Edge mapping"
L0.HasRange L0.Double
L0.readOnly false
+DN.Vertex.HasSewageProduction <R L0.HasProperty : SEL.GenericParameterType
+ L0.HasLabel "Sewage Production"
+ L0.HasRange L0.Double
+ L0.readOnly false
+
DN.Vertex.HasTemperature <R L0.HasProperty : SEL.GenericParameterType
L0.HasLabel "Temperature"
L0.HasRange L0.Double
L0.HasRange L0.Double
L0.readOnly false
+DN.Edge.HasRevisedLength <R L0.HasProperty : SEL.GenericParameterType
+ L0.HasLabel "Revised Length"
+ L0.HasRange L0.Double
+ L0.readOnly true
DN.InLayer
@L0.defTag
DN.Mapping.VertexMapping <T DN.Mapping.Base
>-- DN.Mapping.ComponentType --> STR.ComponentType <R L0.DependsOn
>-- DN.Mapping.VertexMapping.ElevationAttribute --> L0.String <R L0.HasProperty
+ >-- DN.Mapping.VertexMapping.SewageProductionAttribute --> L0.String <R L0.HasProperty
>-- DN.Mapping.VertexMapping.TemperatureAttribute --> L0.String <R L0.HasProperty
>-- DN.Mapping.VertexMapping.PressureAttribute --> L0.String <R L0.HasProperty
>-- DN.Mapping.Terminals --> DN.Mapping.TerminalPair <R L0.HasProperty
data VertexMapping = VertexMapping {
componentType :: String,
elevationAttribute :: String,
+ sewageProductionAttribute :: String,
terminals :: [TerminalPair]
}
public final Resource Edge_HasNominalMassFlow_Inverse;
public final Resource Edge_HasOuterDiameter;
public final Resource Edge_HasOuterDiameter_Inverse;
+ public final Resource Edge_HasRevisedLength;
+ public final Resource Edge_HasRevisedLength_Inverse;
public final Resource Functions;
public final Resource Functions_compositeInstantiator;
public final Resource Functions_convertToValue;
public final Resource Mapping_VertexMapping_ElevationAttribute_Inverse;
public final Resource Mapping_VertexMapping_PressureAttribute;
public final Resource Mapping_VertexMapping_PressureAttribute_Inverse;
+ public final Resource Mapping_VertexMapping_SewageProductionAttribute;
+ public final Resource Mapping_VertexMapping_SewageProductionAttribute_Inverse;
public final Resource Mapping_VertexMapping_TemperatureAttribute;
public final Resource Mapping_VertexMapping_TemperatureAttribute_Inverse;
public final Resource SpatialRefSystem;
public final Resource Vertex_HasElevation_Inverse;
public final Resource Vertex_HasPressure;
public final Resource Vertex_HasPressure_Inverse;
+ public final Resource Vertex_HasSewageProduction;
+ public final Resource Vertex_HasSewageProduction_Inverse;
public final Resource Vertex_HasTemperature;
public final Resource Vertex_HasTemperature_Inverse;
public static final String Edge_HasNominalMassFlow_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasNominalMassFlow/Inverse";
public static final String Edge_HasOuterDiameter = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasOuterDiameter";
public static final String Edge_HasOuterDiameter_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasOuterDiameter/Inverse";
+ public static final String Edge_HasRevisedLength = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasRevisedLength";
+ public static final String Edge_HasRevisedLength_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasRevisedLength/Inverse";
public static final String Functions = "http://www.simantics.org/DistrictNetwork-1.0/Functions";
public static final String Functions_compositeInstantiator = "http://www.simantics.org/DistrictNetwork-1.0/Functions/compositeInstantiator";
public static final String Functions_convertToValue = "http://www.simantics.org/DistrictNetwork-1.0/Functions/convertToValue";
public static final String Mapping_VertexMapping_ElevationAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/ElevationAttribute/Inverse";
public static final String Mapping_VertexMapping_PressureAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/PressureAttribute";
public static final String Mapping_VertexMapping_PressureAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/PressureAttribute/Inverse";
+ public static final String Mapping_VertexMapping_SewageProductionAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/SewageProductionAttribute";
+ public static final String Mapping_VertexMapping_SewageProductionAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/SewageProductionAttribute/Inverse";
public static final String Mapping_VertexMapping_TemperatureAttribute = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/TemperatureAttribute";
public static final String Mapping_VertexMapping_TemperatureAttribute_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Mapping/VertexMapping/TemperatureAttribute/Inverse";
public static final String SpatialRefSystem = "http://www.simantics.org/DistrictNetwork-1.0/SpatialRefSystem";
public static final String Vertex_HasElevation_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasElevation/Inverse";
public static final String Vertex_HasPressure = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasPressure";
public static final String Vertex_HasPressure_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasPressure/Inverse";
+ public static final String Vertex_HasSewageProduction = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasSewageProduction";
+ public static final String Vertex_HasSewageProduction_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasSewageProduction/Inverse";
public static final String Vertex_HasTemperature = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasTemperature";
public static final String Vertex_HasTemperature_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Vertex/HasTemperature/Inverse";
}
Edge_HasNominalMassFlow_Inverse = getResourceOrNull(graph, URIs.Edge_HasNominalMassFlow_Inverse);
Edge_HasOuterDiameter = getResourceOrNull(graph, URIs.Edge_HasOuterDiameter);
Edge_HasOuterDiameter_Inverse = getResourceOrNull(graph, URIs.Edge_HasOuterDiameter_Inverse);
+ Edge_HasRevisedLength = getResourceOrNull(graph, URIs.Edge_HasRevisedLength);
+ Edge_HasRevisedLength_Inverse = getResourceOrNull(graph, URIs.Edge_HasRevisedLength_Inverse);
Functions = getResourceOrNull(graph, URIs.Functions);
Functions_compositeInstantiator = getResourceOrNull(graph, URIs.Functions_compositeInstantiator);
Functions_convertToValue = getResourceOrNull(graph, URIs.Functions_convertToValue);
Mapping_VertexMapping_ElevationAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_ElevationAttribute_Inverse);
Mapping_VertexMapping_PressureAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_PressureAttribute);
Mapping_VertexMapping_PressureAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_PressureAttribute_Inverse);
+ Mapping_VertexMapping_SewageProductionAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_SewageProductionAttribute);
+ Mapping_VertexMapping_SewageProductionAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_SewageProductionAttribute_Inverse);
Mapping_VertexMapping_TemperatureAttribute = getResourceOrNull(graph, URIs.Mapping_VertexMapping_TemperatureAttribute);
Mapping_VertexMapping_TemperatureAttribute_Inverse = getResourceOrNull(graph, URIs.Mapping_VertexMapping_TemperatureAttribute_Inverse);
SpatialRefSystem = getResourceOrNull(graph, URIs.SpatialRefSystem);
Vertex_HasElevation_Inverse = getResourceOrNull(graph, URIs.Vertex_HasElevation_Inverse);
Vertex_HasPressure = getResourceOrNull(graph, URIs.Vertex_HasPressure);
Vertex_HasPressure_Inverse = getResourceOrNull(graph, URIs.Vertex_HasPressure_Inverse);
+ Vertex_HasSewageProduction = getResourceOrNull(graph, URIs.Vertex_HasSewageProduction);
+ Vertex_HasSewageProduction_Inverse = getResourceOrNull(graph, URIs.Vertex_HasSewageProduction_Inverse);
Vertex_HasTemperature = getResourceOrNull(graph, URIs.Vertex_HasTemperature);
Vertex_HasTemperature_Inverse = getResourceOrNull(graph, URIs.Vertex_HasTemperature_Inverse);
}
<elements xsi:type="commands:Command" xmi:id="_A1HBQOFYEeaJP6VyXP72Jw" elementId="org.simantics.district.network.ui.joinVertices" commandName="Join Vertices"/>
<elements xsi:type="commands:Command" xmi:id="_QzdUQOIcEeaJP6VyXP72Jw" elementId="org.simantics.district.network.ui.setFocusable" commandName="Set Focusable"/>
<elements xsi:type="commands:Command" xmi:id="_4wJtADWxEeeVXaXEq4_qpA" elementId="org.simantics.district.network.ui.command.changemapping" commandName="Change Mapping"/>
+ <elements xsi:type="commands:Command" xmi:id="_XKNggHwjEeeX39AS-AGdqw" elementId="org.simantics.district.network.ui.command.simplifyPointVertices" commandName="Simplify Point Vertices"/>
+ <elements xsi:type="commands:Command" xmi:id="_OnqzgHwqEeeX39AS-AGdqw" elementId="org.simantics.district.network.ui.command.simplifySewageVertices" commandName="Simplify Sewage Vertices"/>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_Js7rUMMAEea1mdgpHNVHMA" featurename="menuContributions" parentElementId="xpath:/">
<elements xsi:type="menu:MenuContribution" xmi:id="_MbrJgMMAEea1mdgpHNVHMA" elementId="org.simantics.district.network.ui.menucontribution.0" parentId="help">
<children xsi:type="menu:HandledMenuItem" xmi:id="_O_UgUOIgEeaJP6VyXP72Jw" elementId="org.simantics.district.network.ui.handledmenuitem.joinvertices" label="Join Vertices" iconURI="platform:/plugin/org.simantics.ui/icons/etool16/arrow_join.png" tooltip="Join multiple vertices as one" command="_A1HBQOFYEeaJP6VyXP72Jw"/>
<children xsi:type="menu:DynamicMenuContribution" xmi:id="_dieAsOIgEeaJP6VyXP72Jw" elementId="org.simantics.district.network.ui.dynamicmenucontribution.setFocusable" label="Set Focusable" contributionURI="bundleclass://org.simantics.district.network.ui/org.simantics.district.network.ui.contributions.SetFocusableDynamicMenuContribution"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_QbF4UDWyEeeVXaXEq4_qpA" elementId="org.simantics.district.network.ui.handledmenuitem.changemapping" label="Change Mapping" tooltip="Change mapping of multiple elements" command="_4wJtADWxEeeVXaXEq4_qpA"/>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_oUGZoHwjEeeX39AS-AGdqw" elementId="org.simantics.district.network.ui.handledmenuitem.simplifypointvertices" label="Simplify Point Vertices" tooltip="Simplify Point Vertices" command="_XKNggHwjEeeX39AS-AGdqw"/>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_ZKZLYHwqEeeX39AS-AGdqw" elementId="org.simantics.district.network.ui.handledmenuitem.simplifysewagevertices" label="Simplify Sewage Vertices" tooltip="Simplify sewage vertices" command="_OnqzgHwqEeeX39AS-AGdqw"/>
</elements>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_dbiHcMMBEea1mdgpHNVHMA" featurename="handlers" parentElementId="xpath:/">
<elements xsi:type="commands:Handler" xmi:id="_DPcVsOFYEeaJP6VyXP72Jw" elementId="org.simantics.district.network.ui.handler.joinVertices" contributionURI="bundleclass://org.simantics.district.network.ui/org.simantics.district.network.ui.contributions.JoinVerticesHandler" command="_A1HBQOFYEeaJP6VyXP72Jw"/>
<elements xsi:type="commands:Handler" xmi:id="_VPgBwOIcEeaJP6VyXP72Jw" elementId="org.simantics.district.network.ui.handler.setFocusable" contributionURI="bundleclass://org.simantics.district.network.ui/org.simantics.district.network.ui.contributions.SetFocusableHandler" command="_QzdUQOIcEeaJP6VyXP72Jw"/>
<elements xsi:type="commands:Handler" xmi:id="_LojWYDWyEeeVXaXEq4_qpA" elementId="org.simantics.district.network.ui.handler.0" contributionURI="bundleclass://org.simantics.district.network.ui/org.simantics.district.network.ui.contributions.ChangeMappingTypeHandler" command="_4wJtADWxEeeVXaXEq4_qpA"/>
+ <elements xsi:type="commands:Handler" xmi:id="_euxeIHwjEeeX39AS-AGdqw" elementId="org.simantics.district.network.ui.handler.simplifyPointVertices" contributionURI="bundleclass://org.simantics.district.network.ui/org.simantics.district.network.ui.contributions.SimplifyPointVerticesHandler" command="_XKNggHwjEeeX39AS-AGdqw"/>
+ <elements xsi:type="commands:Handler" xmi:id="_UpVbAHwqEeeX39AS-AGdqw" elementId="org.simantics.district.network.ui.handler.simplifySewageVertices" contributionURI="bundleclass://org.simantics.district.network.ui/org.simantics.district.network.ui.contributions.SimplifySewageVerticesHandler" command="_OnqzgHwqEeeX39AS-AGdqw"/>
</fragments>
</fragment:ModelFragments>
--- /dev/null
+package org.simantics.district.network.ui.contributions;
+
+import javax.inject.Named;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.ui.IEditorPart;
+import org.simantics.Simantics;
+import org.simantics.ui.workbench.IResourceEditorInput;
+import org.simantics.ui.workbench.e4.E4WorkbenchUtils;
+import org.simantics.district.network.ui.internal.Activator;
+import org.simantics.DatabaseJob;
+import org.simantics.db.WriteGraph;
+import org.simantics.db.common.request.WriteRequest;
+import org.simantics.db.exception.DatabaseException;
+
+public class SimplifyPointVerticesHandler {
+
+ @Execute
+ public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart mActiveEditorPart) {
+ IEditorPart activeEditorPart = E4WorkbenchUtils.getActiveIEditorPart(mActiveEditorPart);
+ IResourceEditorInput input = (IResourceEditorInput) activeEditorPart.getEditorInput();
+
+ Job job = new DatabaseJob("Simplify Point Vertices") {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ Simantics.getSession().syncRequest(new WriteRequest() {
+
+ @Override
+ public void perform(WriteGraph graph) throws DatabaseException {
+ Simantics.applySCL("Apros/District/SimplifyMapping", "simplifyPointVertices", graph, input.getResource());
+ }
+ });
+ } catch (DatabaseException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, getName() + " failed.", e);
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ }
+
+}
--- /dev/null
+package org.simantics.district.network.ui.contributions;
+
+import javax.inject.Named;
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.SelectionStatusDialog;
+import org.simantics.DatabaseJob;
+import org.simantics.Simantics;
+import org.simantics.db.WriteGraph;
+import org.simantics.db.common.request.WriteRequest;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.ui.workbench.IResourceEditorInput;
+import org.simantics.ui.workbench.e4.E4WorkbenchUtils;
+import org.simantics.district.network.ui.internal.Activator;
+import org.simantics.district.network.ui.function.Functions;
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.common.request.ReadRequest;
+
+public class SimplifySewageVerticesHandler {
+
+ @Execute
+ public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart mActiveEditorPart) {
+ IEditorPart activeEditorPart = E4WorkbenchUtils.getActiveIEditorPart(mActiveEditorPart);
+ IResourceEditorInput input = (IResourceEditorInput) activeEditorPart.getEditorInput();
+
+ SelectMappingDialog dialog = new SelectMappingDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), input.getResource());
+ if (dialog.open() != Dialog.OK)
+ return;
+
+ Resource mapping = dialog.getSewageVertexMapping();
+ Job job = new DatabaseJob("Simplify Sewage Vertices") {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ Simantics.getSession().syncRequest(new WriteRequest() {
+
+ @Override
+ public void perform(WriteGraph graph) throws DatabaseException {
+ Simantics.applySCL("Apros/District/SimplifyMapping", "simplifySewageVertices", graph, mapping, input.getResource());
+ }
+
+ });
+ } catch (DatabaseException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, getName() + " failed.", e);
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ }
+
+ private static class SelectMappingDialog extends SelectionStatusDialog {
+
+ private Combo vertexMappingCombo;
+
+ private Composite composite;
+
+ private Resource diagram;
+ private Map<String, Resource> vertexMappings = new HashMap<>();
+
+ private Resource sewageVertexMapping;
+
+ protected SelectMappingDialog(Shell parentShell, Resource diagram) {
+ super(parentShell);
+ this.diagram = diagram;
+ setTitle("Select the sewage vertex mapping");
+ }
+
+ public Resource getSewageVertexMapping() {
+ return sewageVertexMapping;
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ composite = (Composite) super.createDialogArea(parent);
+
+ createMappingsGroup(composite);
+
+ Simantics.getSession().asyncRequest(new ReadRequest() {
+
+ @Override
+ public void run(ReadGraph graph) throws DatabaseException {
+ vertexMappings = Functions.getVertexMappings(graph, diagram);
+ composite.getDisplay().asyncExec(() -> {
+ vertexMappingCombo.setItems(vertexMappings.keySet().toArray(new String[vertexMappings.size()]));
+ vertexMappingCombo.select(0);
+ });
+
+ }
+ });
+ return composite;
+ }
+
+ @Override
+ protected void computeResult() {
+ sewageVertexMapping = vertexMappings.get(vertexMappingCombo.getItem(vertexMappingCombo.getSelectionIndex()));
+ }
+
+ private void createMappingsGroup(Composite parent) {
+ Group group= new Group(parent, SWT.NONE);
+ group.setFont(parent.getFont());
+ group.setText("Default mappings");
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(group);
+ group.setLayout(new GridLayout(1, false));
+
+ Composite cmposite = new Composite(group, SWT.NONE);
+ cmposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
+ cmposite.setLayout(new GridLayout(2, false));
+
+ Label vertexMappingLabel = new Label(cmposite, SWT.NONE);
+ vertexMappingLabel.setText("Sewage vertex mapping");
+
+ vertexMappingCombo = new Combo(cmposite, SWT.READ_ONLY | SWT.BORDER);
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(vertexMappingCombo);
+
+ }
+ }
+}
\ No newline at end of file