Index: applications/editors/josm/plugins/indoor_sweepline/.classpath
===================================================================
--- applications/editors/josm/plugins/indoor_sweepline/.classpath	(revision 32479)
+++ applications/editors/josm/plugins/indoor_sweepline/.classpath	(revision 32479)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="/JOSM"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
Index: applications/editors/josm/plugins/indoor_sweepline/.project
===================================================================
--- applications/editors/josm/plugins/indoor_sweepline/.project	(revision 32479)
+++ applications/editors/josm/plugins/indoor_sweepline/.project	(revision 32479)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>JOSM-indoor_sweepline</name>
+	<comment></comment>
+	<projects>
+		<project>JOSM</project>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
Index: applications/editors/josm/plugins/indoor_sweepline/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- applications/editors/josm/plugins/indoor_sweepline/.settings/org.eclipse.jdt.core.prefs	(revision 32479)
+++ applications/editors/josm/plugins/indoor_sweepline/.settings/org.eclipse.jdt.core.prefs	(revision 32479)
@@ -0,0 +1,90 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
Index: applications/editors/josm/plugins/indoor_sweepline/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- applications/editors/josm/plugins/indoor_sweepline/.settings/org.eclipse.jdt.ui.prefs	(revision 32479)
+++ applications/editors/josm/plugins/indoor_sweepline/.settings/org.eclipse.jdt.ui.prefs	(revision 32479)
@@ -0,0 +1,60 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+sp_cleanup.use_type_arguments=false
Index: applications/editors/josm/plugins/indoor_sweepline/build.xml
===================================================================
--- applications/editors/josm/plugins/indoor_sweepline/build.xml	(revision 32478)
+++ applications/editors/josm/plugins/indoor_sweepline/build.xml	(revision 32479)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="Commit message"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="7817"/>
+    <property name="plugin.main.version" value="10279"/>
 
     <property name="plugin.author" value="Roland M. Olbricht"/>
Index: applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/Beam.java
===================================================================
--- applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/Beam.java	(revision 32478)
+++ applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/Beam.java	(revision 32479)
@@ -8,206 +8,206 @@
     public Beam(Vector<Double> blueprint, double blueprintOffset, CorridorPart.ReachableSide defaultSide)
     {
-	offset = blueprintOffset;
-	parts = new Vector<CorridorPart>();
-	
-	setDefaultSide_(defaultSide);
-	if (defaultSide == CorridorPart.ReachableSide.RIGHT)
-	{
-	    for (int i = 1; i < blueprint.size(); i += 2)
-	    {
-		addCorridorPart_(true, CorridorPart.Type.WALL,
-		    blueprint.elementAt(i).doubleValue() - blueprint.elementAt(i-1).doubleValue());
-		if (i+1 < blueprint.size())
-		    addCorridorPart_(true, CorridorPart.Type.VOID,
-			blueprint.elementAt(i+1).doubleValue() - blueprint.elementAt(i).doubleValue());
-	    }
-	}
-	else
-	{
-	    for (int i = 1; i < blueprint.size(); i += 2)
-	    {
-		addCorridorPart_(true, CorridorPart.Type.PASSAGE,
-		    blueprint.elementAt(i).doubleValue() - blueprint.elementAt(i-1).doubleValue());
-		if (i+1 < blueprint.size())
-		    addCorridorPart_(true, CorridorPart.Type.VOID,
-			blueprint.elementAt(i+1).doubleValue() - blueprint.elementAt(i).doubleValue());
-	    }
-	}
-	adjustStripCache();
-    }
-    
-    
+        offset = blueprintOffset;
+        parts = new Vector<>();
+
+        setDefaultSide_(defaultSide);
+        if (defaultSide == CorridorPart.ReachableSide.RIGHT)
+        {
+            for (int i = 1; i < blueprint.size(); i += 2)
+            {
+                addCorridorPart_(true, CorridorPart.Type.WALL,
+                        blueprint.elementAt(i).doubleValue() - blueprint.elementAt(i-1).doubleValue());
+                if (i+1 < blueprint.size())
+                    addCorridorPart_(true, CorridorPart.Type.VOID,
+                            blueprint.elementAt(i+1).doubleValue() - blueprint.elementAt(i).doubleValue());
+            }
+        }
+        else
+        {
+            for (int i = 1; i < blueprint.size(); i += 2)
+            {
+                addCorridorPart_(true, CorridorPart.Type.PASSAGE,
+                        blueprint.elementAt(i).doubleValue() - blueprint.elementAt(i-1).doubleValue());
+                if (i+1 < blueprint.size())
+                    addCorridorPart_(true, CorridorPart.Type.VOID,
+                            blueprint.elementAt(i+1).doubleValue() - blueprint.elementAt(i).doubleValue());
+            }
+        }
+        adjustStripCache();
+    }
+
+
     private void setDefaultSide_(CorridorPart.ReachableSide defaultSide)
     {
-	this.defaultSide = defaultSide;
-    }
-    
+        this.defaultSide = defaultSide;
+    }
+
     public void setDefaultSide(CorridorPart.ReachableSide defaultSide)
     {
-	setDefaultSide_(defaultSide);
-	adjustStripCache();
-    }
-    
-    
+        setDefaultSide_(defaultSide);
+        adjustStripCache();
+    }
+
+
     public Vector<CorridorPart> getBeamParts()
     {
-	return parts;
-    }
-    
-    
+        return parts;
+    }
+
+
     public double getBeamOffset()
     {
-	return offset;
-    }
-    
+        return offset;
+    }
+
     public void setBeamOffset(double beamOffset)
     {
-	offset = beamOffset;
-    }
-
-    
+        offset = beamOffset;
+    }
+
+
     private void addCorridorPart_(boolean append, CorridorPart.Type type, double width)
     {
-	CorridorPart.ReachableSide side = defaultSide == CorridorPart.ReachableSide.RIGHT ?
-	    defaultSide : CorridorPart.ReachableSide.ALL;
-	    
-	if (append)
-	    parts.add(new CorridorPart(width, type, side));
-	else
-	    parts.add(0, new CorridorPart(width, type, side));
+        CorridorPart.ReachableSide side = defaultSide == CorridorPart.ReachableSide.RIGHT ?
+                defaultSide : CorridorPart.ReachableSide.ALL;
+
+        if (append)
+            parts.add(new CorridorPart(width, type, side));
+        else
+            parts.add(0, new CorridorPart(width, type, side));
     }
 
     public void addCorridorPart(boolean append, double width)
     {
-	addCorridorPart_(append,
-	    defaultSide == CorridorPart.ReachableSide.RIGHT ? CorridorPart.Type.WALL : CorridorPart.Type.PASSAGE,
-	    width);
-	adjustStripCache();
-    }
-
-    
+        addCorridorPart_(append,
+                defaultSide == CorridorPart.ReachableSide.RIGHT ? CorridorPart.Type.WALL : CorridorPart.Type.PASSAGE,
+                        width);
+        adjustStripCache();
+    }
+
+
     public void setCorridorPartWidth(int partIndex, double value)
     {
-	parts.elementAt(partIndex).width = value;
-	adjustStripCache();
-    }
-
-    
+        parts.elementAt(partIndex).width = value;
+        adjustStripCache();
+    }
+
+
     public void setCorridorPartType(int partIndex, CorridorPart.Type type)
     {
-	parts.elementAt(partIndex).setType(type, defaultSide);
-	enforceSideCoherence();
-	adjustStripCache();
-    }
-
-    
+        parts.elementAt(partIndex).setType(type, defaultSide);
+        enforceSideCoherence();
+        adjustStripCache();
+    }
+
+
     public void setCorridorPartSide(int partIndex, CorridorPart.ReachableSide side)
     {
-	parts.elementAt(partIndex).setSide(side, defaultSide);
-	enforceSideCoherence();    
-	adjustStripCache();
-    }
-    
-    
+        parts.elementAt(partIndex).setSide(side, defaultSide);
+        enforceSideCoherence();
+        adjustStripCache();
+    }
+
+
     private void enforceSideCoherence()
     {
-	for (int i = 1; i < parts.size(); ++i)
-	{
-	    if (parts.elementAt(i).getSide() != CorridorPart.ReachableSide.ALL
-		    && parts.elementAt(i-1).getSide() != CorridorPart.ReachableSide.ALL)
-		parts.elementAt(i).setSide(parts.elementAt(i-1).getSide(), defaultSide);
-	}
-    }
-    
-    
+        for (int i = 1; i < parts.size(); ++i)
+        {
+            if (parts.elementAt(i).getSide() != CorridorPart.ReachableSide.ALL
+                    && parts.elementAt(i-1).getSide() != CorridorPart.ReachableSide.ALL)
+                parts.elementAt(i).setSide(parts.elementAt(i-1).getSide(), defaultSide);
+        }
+    }
+
+
     private boolean isVoidAbove(int i)
     {
-	return i == 0 || parts.elementAt(i-1).getType() == CorridorPart.Type.VOID
-	    || (parts.elementAt(i-1).getSide() == CorridorPart.ReachableSide.RIGHT
-		&& defaultSide == CorridorPart.ReachableSide.LEFT)
-	    || (parts.elementAt(i-1).getSide() == CorridorPart.ReachableSide.LEFT
-		&& defaultSide == CorridorPart.ReachableSide.RIGHT);
-    }
-    
+        return i == 0 || parts.elementAt(i-1).getType() == CorridorPart.Type.VOID
+                || (parts.elementAt(i-1).getSide() == CorridorPart.ReachableSide.RIGHT
+                && defaultSide == CorridorPart.ReachableSide.LEFT)
+                || (parts.elementAt(i-1).getSide() == CorridorPart.ReachableSide.LEFT
+                && defaultSide == CorridorPart.ReachableSide.RIGHT);
+    }
+
     private boolean isVoidBelow(int i)
     {
-	return i == parts.size() || parts.elementAt(i).getType() == CorridorPart.Type.VOID
-	    || (parts.elementAt(i).getSide() == CorridorPart.ReachableSide.RIGHT
-		&& defaultSide == CorridorPart.ReachableSide.LEFT)
-	    || (parts.elementAt(i).getSide() == CorridorPart.ReachableSide.LEFT
-		&& defaultSide == CorridorPart.ReachableSide.RIGHT);
-    }
-    
+        return i == parts.size() || parts.elementAt(i).getType() == CorridorPart.Type.VOID
+                || (parts.elementAt(i).getSide() == CorridorPart.ReachableSide.RIGHT
+                && defaultSide == CorridorPart.ReachableSide.LEFT)
+                || (parts.elementAt(i).getSide() == CorridorPart.ReachableSide.LEFT
+                && defaultSide == CorridorPart.ReachableSide.RIGHT);
+    }
+
     private boolean isPassageAbove(int i)
     {
-	return i > 0
-	    && parts.elementAt(i-1).getType() == CorridorPart.Type.PASSAGE
-	    && defaultSide == CorridorPart.ReachableSide.ALL;
-    }
-    
+        return i > 0
+                && parts.elementAt(i-1).getType() == CorridorPart.Type.PASSAGE
+                && defaultSide == CorridorPart.ReachableSide.ALL;
+    }
+
     private boolean isPassageBelow(int i)
     {
-	return i < parts.size()
-	    && parts.elementAt(i).getType() == CorridorPart.Type.PASSAGE
-	    && defaultSide == CorridorPart.ReachableSide.ALL;
-    }
-    
+        return i < parts.size()
+                && parts.elementAt(i).getType() == CorridorPart.Type.PASSAGE
+                && defaultSide == CorridorPart.ReachableSide.ALL;
+    }
+
     private boolean isReachableLeft(int i)
     {
-	if (defaultSide == CorridorPart.ReachableSide.RIGHT)
-	    return false;
-	if (parts.elementAt(i).getSide() == CorridorPart.ReachableSide.LEFT)
-	    return true;
-	return defaultSide == CorridorPart.ReachableSide.LEFT;
-    }
-    
-    
+        if (defaultSide == CorridorPart.ReachableSide.RIGHT)
+            return false;
+        if (parts.elementAt(i).getSide() == CorridorPart.ReachableSide.LEFT)
+            return true;
+        return defaultSide == CorridorPart.ReachableSide.LEFT;
+    }
+
+
     private void connectTwoPos(StripPosition newPos, boolean toLeft)
     {
-	StripPosition other = null;
-	if (rhsStrips.size() > 0 && rhsStrips.elementAt(rhsStrips.size()-1).connectedTo == -1)
-	{
-	    newPos.connectedToSameSide = !toLeft;
-	    newPos.connectedTo = rhsStrips.size()-1;
-	    other = rhsStrips.elementAt(rhsStrips.size()-1);
-	}
-	else
-	{
-	    newPos.connectedToSameSide = toLeft;
-	    newPos.connectedTo = lhsStrips.size()-1;
-	    other = lhsStrips.elementAt(lhsStrips.size()-1);
-	}
-	    
-	other.connectedToSameSide = newPos.connectedToSameSide;
-	if (toLeft)
-	{
-	    other.connectedTo = lhsStrips.size();
-	    lhsStrips.add(newPos);
-	}
-	else
-	{
-	    other.connectedTo = rhsStrips.size();			
-	    rhsStrips.add(newPos);
-	}
-    }
-    
-    
+        StripPosition other = null;
+        if (rhsStrips.size() > 0 && rhsStrips.elementAt(rhsStrips.size()-1).connectedTo == -1)
+        {
+            newPos.connectedToSameSide = !toLeft;
+            newPos.connectedTo = rhsStrips.size()-1;
+            other = rhsStrips.elementAt(rhsStrips.size()-1);
+        }
+        else
+        {
+            newPos.connectedToSameSide = toLeft;
+            newPos.connectedTo = lhsStrips.size()-1;
+            other = lhsStrips.elementAt(lhsStrips.size()-1);
+        }
+
+        other.connectedToSameSide = newPos.connectedToSameSide;
+        if (toLeft)
+        {
+            other.connectedTo = lhsStrips.size();
+            lhsStrips.add(newPos);
+        }
+        else
+        {
+            other.connectedTo = rhsStrips.size();
+            rhsStrips.add(newPos);
+        }
+    }
+
+
     private class StripPosition
     {
-	StripPosition(int nodeIndex, double offset)
-	{
-	    this.nodeIndex = nodeIndex;
-	    this.offset = offset;
-	    connectedTo = -1;
-	    connectedToSameSide = false;
-	}
-    
-	public int nodeIndex;
-	public double offset;
-	public int connectedTo;
-	public boolean connectedToSameSide;
-    }
-    
-    
+        StripPosition(int nodeIndex, double offset)
+        {
+            this.nodeIndex = nodeIndex;
+            this.offset = offset;
+            connectedTo = -1;
+            connectedToSameSide = false;
+        }
+
+        public int nodeIndex;
+        public double offset;
+        public int connectedTo;
+        public boolean connectedToSameSide;
+    }
+
+
     private double offset;
     private Vector<CorridorPart> parts;
@@ -215,137 +215,137 @@
     private Vector<StripPosition> rhsStrips;
 
-    
+
     private void adjustStripCache()
     {
-	lhsStrips = new Vector<StripPosition>();
-	rhsStrips = new Vector<StripPosition>();
-	
-	double offset = 0;
-	
-	for (int i = 0; i <= parts.size(); ++i)
-	{
-	    if (isVoidBelow(i))
-	    {
-		if (isPassageAbove(i))
-		{
-		    StripPosition lhs = new StripPosition(i, offset);
-		    StripPosition rhs = new StripPosition(i, offset);
-		    
-		    lhs.connectedToSameSide = false;
-		    lhs.connectedTo = rhsStrips.size();
-		    rhs.connectedToSameSide = false;
-		    rhs.connectedTo = lhsStrips.size();
-		    
-		    lhsStrips.add(lhs);
-		    rhsStrips.add(rhs);
-		}
-		else if (!isVoidAbove(i))
-		    connectTwoPos(new StripPosition(i, offset), isReachableLeft(i-1));
-	    }
-	    else if (isPassageBelow(i))
-	    {
-		if (isVoidAbove(i))
-		{
-		    StripPosition lhs = new StripPosition(i, offset);
-		    StripPosition rhs = new StripPosition(i, offset);
-		    
-		    lhs.connectedToSameSide = false;
-		    lhs.connectedTo = rhsStrips.size();
-		    rhs.connectedToSameSide = false;
-		    rhs.connectedTo = lhsStrips.size();
-		    
-		    lhsStrips.add(lhs);
-		    rhsStrips.add(rhs);
-		}
-		else if (!isPassageAbove(i))
-		    connectTwoPos(new StripPosition(i, offset), !isReachableLeft(i-1));
-	    }
-	    else
-	    {
-		if (isVoidAbove(i))
-		{
-		    if (isReachableLeft(i))
-			lhsStrips.add(new StripPosition(i, offset));
-		    else
-			rhsStrips.add(new StripPosition(i, offset));
-		}
-		else if (isPassageAbove(i))
-		{
-		    if (isReachableLeft(i))
-			rhsStrips.add(new StripPosition(i, offset));
-		    else
-			lhsStrips.add(new StripPosition(i, offset));
-		}
-	    }
-	    
-	    if (i < parts.size())
-		offset += parts.elementAt(i).width;
-	}
-    }
-    
-    
+        lhsStrips = new Vector<>();
+        rhsStrips = new Vector<>();
+
+        double offset = 0;
+
+        for (int i = 0; i <= parts.size(); ++i)
+        {
+            if (isVoidBelow(i))
+            {
+                if (isPassageAbove(i))
+                {
+                    StripPosition lhs = new StripPosition(i, offset);
+                    StripPosition rhs = new StripPosition(i, offset);
+
+                    lhs.connectedToSameSide = false;
+                    lhs.connectedTo = rhsStrips.size();
+                    rhs.connectedToSameSide = false;
+                    rhs.connectedTo = lhsStrips.size();
+
+                    lhsStrips.add(lhs);
+                    rhsStrips.add(rhs);
+                }
+                else if (!isVoidAbove(i))
+                    connectTwoPos(new StripPosition(i, offset), isReachableLeft(i-1));
+            }
+            else if (isPassageBelow(i))
+            {
+                if (isVoidAbove(i))
+                {
+                    StripPosition lhs = new StripPosition(i, offset);
+                    StripPosition rhs = new StripPosition(i, offset);
+
+                    lhs.connectedToSameSide = false;
+                    lhs.connectedTo = rhsStrips.size();
+                    rhs.connectedToSameSide = false;
+                    rhs.connectedTo = lhsStrips.size();
+
+                    lhsStrips.add(lhs);
+                    rhsStrips.add(rhs);
+                }
+                else if (!isPassageAbove(i))
+                    connectTwoPos(new StripPosition(i, offset), !isReachableLeft(i-1));
+            }
+            else
+            {
+                if (isVoidAbove(i))
+                {
+                    if (isReachableLeft(i))
+                        lhsStrips.add(new StripPosition(i, offset));
+                    else
+                        rhsStrips.add(new StripPosition(i, offset));
+                }
+                else if (isPassageAbove(i))
+                {
+                    if (isReachableLeft(i))
+                        rhsStrips.add(new StripPosition(i, offset));
+                    else
+                        lhsStrips.add(new StripPosition(i, offset));
+                }
+            }
+
+            if (i < parts.size())
+                offset += parts.elementAt(i).width;
+        }
+    }
+
+
     public Vector<Double> leftHandSideStrips()
     {
-	Vector<Double> offsets = new Vector<Double>();
-	for (StripPosition pos : lhsStrips)
-	    offsets.add(pos.offset);
-	    
-	return offsets;
-    }
-    
-    
+        Vector<Double> offsets = new Vector<>();
+        for (StripPosition pos : lhsStrips)
+            offsets.add(pos.offset);
+
+        return offsets;
+    }
+
+
     public Vector<Double> rightHandSideStrips()
     {
-	Vector<Double> offsets = new Vector<Double>();
-	for (StripPosition pos : rhsStrips)
-	    offsets.add(pos.offset);
-	    
-	return offsets;
-    }
-    
-    
+        Vector<Double> offsets = new Vector<>();
+        for (StripPosition pos : rhsStrips)
+            offsets.add(pos.offset);
+
+        return offsets;
+    }
+
+
     public int getBeamPartIndex(boolean toTheLeft, int i)
     {
-	if (toTheLeft)
-	    return lhsStrips.elementAt(i).nodeIndex;
-	else
-	    return rhsStrips.elementAt(i).nodeIndex;
-    }
-    
+        if (toTheLeft)
+            return lhsStrips.elementAt(i).nodeIndex;
+        else
+            return rhsStrips.elementAt(i).nodeIndex;
+    }
+
 
     public boolean appendNodes(IndoorSweeplineModel.SweepPolygonCursor cursor, boolean fromRight,
-	BeamGeography geography, String level)
-    {
-	if (fromRight)
-	{
-	    StripPosition pos = rhsStrips.elementAt(cursor.partIndex);
-	    StripPosition to = pos.connectedToSameSide ?
-		rhsStrips.elementAt(pos.connectedTo) : lhsStrips.elementAt(pos.connectedTo);
-		
-	    geography.appendNodes(pos.nodeIndex, to.nodeIndex, level);
-	    
-	    if (!pos.connectedToSameSide)
-		--cursor.stripIndex;
-	    cursor.partIndex = pos.connectedTo;
-	    
-	    return !pos.connectedToSameSide;
-	}
-	else
-	{
-	    StripPosition pos = lhsStrips.elementAt(cursor.partIndex);
-	    StripPosition to = pos.connectedToSameSide ?
-		lhsStrips.elementAt(pos.connectedTo) : rhsStrips.elementAt(pos.connectedTo);
-		
-	    geography.appendNodes(pos.nodeIndex, to.nodeIndex, level);
-	    
-	    if (!pos.connectedToSameSide)
-		++cursor.stripIndex;
-	    cursor.partIndex = pos.connectedTo;
-	    
-	    return pos.connectedToSameSide;
-	}
-    }
-    
-    
+            BeamGeography geography, String level)
+    {
+        if (fromRight)
+        {
+            StripPosition pos = rhsStrips.elementAt(cursor.partIndex);
+            StripPosition to = pos.connectedToSameSide ?
+                    rhsStrips.elementAt(pos.connectedTo) : lhsStrips.elementAt(pos.connectedTo);
+
+                    geography.appendNodes(pos.nodeIndex, to.nodeIndex, level);
+
+                    if (!pos.connectedToSameSide)
+                        --cursor.stripIndex;
+                    cursor.partIndex = pos.connectedTo;
+
+                    return !pos.connectedToSameSide;
+        }
+        else
+        {
+            StripPosition pos = lhsStrips.elementAt(cursor.partIndex);
+            StripPosition to = pos.connectedToSameSide ?
+                    lhsStrips.elementAt(pos.connectedTo) : rhsStrips.elementAt(pos.connectedTo);
+
+                    geography.appendNodes(pos.nodeIndex, to.nodeIndex, level);
+
+                    if (!pos.connectedToSameSide)
+                        ++cursor.stripIndex;
+                    cursor.partIndex = pos.connectedTo;
+
+                    return pos.connectedToSameSide;
+        }
+    }
+
+
     private CorridorPart.ReachableSide defaultSide;
 }
Index: applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/BeamGeography.java
===================================================================
--- applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/BeamGeography.java	(revision 32478)
+++ applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/BeamGeography.java	(revision 32479)
@@ -1,6 +1,6 @@
 package indoor_sweepline;
 
-import java.util.List;
 import java.util.Vector;
+
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -12,91 +12,91 @@
     public BeamGeography(DataSet dataSet, ModelGeography target)
     {
-	partsGeography = new Vector<CorridorGeography>();
-	nodes = new Vector<Node>();
-	this.dataSet = dataSet;
-	this.target = target;
+        partsGeography = new Vector<>();
+        nodes = new Vector<>();
+        this.dataSet = dataSet;
+        this.target = target;
     }
 
-    
+
     public void appendNodes(int from, int to, String level)
     {
-	if (from <= to)
-	{
-	    for (int i = from; i < to; ++i)
-	    {
-		target.appendNode(nodes.elementAt(i));
-		CorridorPart part = parts.elementAt(i);
-		partsGeography.elementAt(i).appendNodes(part.getType(), part.getSide(), level,
-		    nodes.elementAt(i).getCoor(), nodes.elementAt(i+1).getCoor(), target);
-	    }
-	    target.appendNode(nodes.elementAt(to));
-	}
-	else
-	{
-	    for (int i = from; i > to; --i)
-	    {
-		target.appendNode(nodes.elementAt(i));
-		CorridorPart part = parts.elementAt(i-1);
-		partsGeography.elementAt(i-1).appendNodes(part.getType(), part.getSide(), level,
-		    nodes.elementAt(i).getCoor(), nodes.elementAt(i-1).getCoor(), target);
-	    }
-	    target.appendNode(nodes.elementAt(to));
-	}
+        if (from <= to)
+        {
+            for (int i = from; i < to; ++i)
+            {
+                target.appendNode(nodes.elementAt(i));
+                CorridorPart part = parts.elementAt(i);
+                partsGeography.elementAt(i).appendNodes(part.getType(), part.getSide(), level,
+                        nodes.elementAt(i).getCoor(), nodes.elementAt(i+1).getCoor(), target);
+            }
+            target.appendNode(nodes.elementAt(to));
+        }
+        else
+        {
+            for (int i = from; i > to; --i)
+            {
+                target.appendNode(nodes.elementAt(i));
+                CorridorPart part = parts.elementAt(i-1);
+                partsGeography.elementAt(i-1).appendNodes(part.getType(), part.getSide(), level,
+                        nodes.elementAt(i).getCoor(), nodes.elementAt(i-1).getCoor(), target);
+            }
+            target.appendNode(nodes.elementAt(to));
+        }
     }
 
-    
+
     public void adjustNodes(LatLon pivot, Vector<CorridorPart> parts, double beamOffset)
     {
-	double offset = -beamOffset;
-	this.parts = parts;
-	
-	adjustNode(0, new LatLon(addMetersToLat(pivot, offset), pivot.lon()));
-    
-	for (int i = 0; i < parts.size(); ++i)
-	{
-	    adjustPartGeography(i);
-	    offset += parts.elementAt(i).width;
-	    adjustNode(i+1, new LatLon(addMetersToLat(pivot, offset), pivot.lon()));
-	}
-	
-	// Size reduction not implemented
+        double offset = -beamOffset;
+        this.parts = parts;
+
+        adjustNode(0, new LatLon(addMetersToLat(pivot, offset), pivot.lon()));
+
+        for (int i = 0; i < parts.size(); ++i)
+        {
+            adjustPartGeography(i);
+            offset += parts.elementAt(i).width;
+            adjustNode(i+1, new LatLon(addMetersToLat(pivot, offset), pivot.lon()));
+        }
+
+        // Size reduction not implemented
     }
-    
-    
+
+
     private void adjustNode(int i, LatLon coor)
     {
-	if (nodes.size() <= i)
-	    nodes.setSize(i+1);
-	Node node = nodes.elementAt(i);
-	if (node == null)
-	{
-	    node = new Node(coor);
-	    dataSet.addPrimitive(node);
-	    nodes.setElementAt(node, i);
-	}
-	else
-	    node.setCoor(coor);
+        if (nodes.size() <= i)
+            nodes.setSize(i+1);
+        Node node = nodes.elementAt(i);
+        if (node == null)
+        {
+            node = new Node(coor);
+            dataSet.addPrimitive(node);
+            nodes.setElementAt(node, i);
+        }
+        else
+            node.setCoor(coor);
     }
-    
-    
+
+
     private void adjustPartGeography(int i)
     {
-	if (partsGeography.size() <= i)
-	    partsGeography.setSize(i+1);
-	CorridorGeography partGeography = partsGeography.elementAt(i);
-	if (partGeography == null)
-	{
-	    partGeography = new CorridorGeography(dataSet);
-	    partsGeography.setElementAt(partGeography, i);
-	}
+        if (partsGeography.size() <= i)
+            partsGeography.setSize(i+1);
+        CorridorGeography partGeography = partsGeography.elementAt(i);
+        if (partGeography == null)
+        {
+            partGeography = new CorridorGeography(dataSet);
+            partsGeography.setElementAt(partGeography, i);
+        }
     }
-    
-    
+
+
     public LatLon coorAt(int i)
     {
-	return nodes.elementAt(i).getCoor();
+        return nodes.elementAt(i).getCoor();
     }
-    
-    
+
+
     private Vector<CorridorPart> parts;
     private Vector<CorridorGeography> partsGeography;
@@ -105,8 +105,8 @@
     private Vector<Node> nodes;
 
-    
+
     private static double addMetersToLat(LatLon latLon, double south)
     {
-	return latLon.lat() - south *(360./4e7);
+        return latLon.lat() - south *(360./4e7);
     }
 }
Index: applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/CorridorGeography.java
===================================================================
--- applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/CorridorGeography.java	(revision 32478)
+++ applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/CorridorGeography.java	(revision 32479)
@@ -1,6 +1,6 @@
 package indoor_sweepline;
 
-import java.util.List;
 import java.util.Vector;
+
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -13,158 +13,158 @@
     public CorridorGeography(DataSet dataSet)
     {
-	this.dataSet = dataSet;
+        this.dataSet = dataSet;
     }
-    
-    
+
+
     private static final double MIN_LENGTH = 10.;
-    
-    
+
+
     private void setExtraElements(CorridorPart.ReachableSide side, LatLon from, LatLon to,
-	boolean extraWayUp, double minLength)
+            boolean extraWayUp, double minLength)
     {
-	LatLon middleCoor = new LatLon((from.lat() + to.lat())/2.,
-	    (from.lon() + to.lon())/2.);
-	if (middleNode == null)
-	{
-	    middleNode = new Node(middleCoor);
-	    dataSet.addPrimitive(middleNode);
-	}
-	else
-	    middleNode.setCoor(middleCoor);
-	    
-	LatLon start = from;
-	if (side == CorridorPart.ReachableSide.LEFT)
-	{
-	    if (middleCoor.lat() < start.lat())
-		start = to;
-	}
-	else if (side == CorridorPart.ReachableSide.RIGHT)
-	{
-	    if (start.lat() < middleCoor.lat())
-		start = to;
-	}
-	else if (side == CorridorPart.ReachableSide.FRONT)
-	{
-	    if (start.lon() < middleCoor.lon())
-		start = to;
-	}
-	else if (side == CorridorPart.ReachableSide.BACK)
-	{
-	    if (middleCoor.lon() < start.lon())
-		start = to;
-	}
-	    
-	double scale = Math.cos(middleCoor.lat() * (Math.PI/180.));
-	double length = Math.sqrt((start.lat() - middleCoor.lat()) * (start.lat() - middleCoor.lat()) +
-	    (start.lon() - middleCoor.lon()) * (start.lon() - middleCoor.lon()) * scale * scale) / 180. * 20000000.;
-	double lengthFactor = length < minLength ? minLength / length : 1.;
-	LatLon detachedCoor = new LatLon(middleCoor.lat() + (start.lon() - middleCoor.lon()) * scale * lengthFactor,
-	    middleCoor.lon() - (start.lat() - middleCoor.lat()) / scale * lengthFactor);
-	if (detachedNode == null)
-	{
-	    detachedNode = new Node(detachedCoor);
-	    dataSet.addPrimitive(detachedNode);
-	}
-	else
-	    detachedNode.setCoor(detachedCoor);
-	
-	Vector<Node> extraWayNodes = new Vector<Node>();
-	if (extraWayUp)
-	{
-	    extraWayNodes.add(middleNode);
-	    extraWayNodes.add(detachedNode);
-	}
-	else
-	{
-	    extraWayNodes.add(detachedNode);
-	    extraWayNodes.add(middleNode);
-	}
-	if (extraWay == null)
-	{
-	    extraWay = new Way();
-	    extraWay.setNodes(extraWayNodes);
-	    dataSet.addPrimitive(extraWay);
-	}
-	else
-	    extraWay.setNodes(extraWayNodes);
+        LatLon middleCoor = new LatLon((from.lat() + to.lat())/2.,
+                (from.lon() + to.lon())/2.);
+        if (middleNode == null)
+        {
+            middleNode = new Node(middleCoor);
+            dataSet.addPrimitive(middleNode);
+        }
+        else
+            middleNode.setCoor(middleCoor);
+
+        LatLon start = from;
+        if (side == CorridorPart.ReachableSide.LEFT)
+        {
+            if (middleCoor.lat() < start.lat())
+                start = to;
+        }
+        else if (side == CorridorPart.ReachableSide.RIGHT)
+        {
+            if (start.lat() < middleCoor.lat())
+                start = to;
+        }
+        else if (side == CorridorPart.ReachableSide.FRONT)
+        {
+            if (start.lon() < middleCoor.lon())
+                start = to;
+        }
+        else if (side == CorridorPart.ReachableSide.BACK)
+        {
+            if (middleCoor.lon() < start.lon())
+                start = to;
+        }
+
+        double scale = Math.cos(middleCoor.lat() * (Math.PI/180.));
+        double length = Math.sqrt((start.lat() - middleCoor.lat()) * (start.lat() - middleCoor.lat()) +
+                (start.lon() - middleCoor.lon()) * (start.lon() - middleCoor.lon()) * scale * scale) / 180. * 20000000.;
+        double lengthFactor = length < minLength ? minLength / length : 1.;
+        LatLon detachedCoor = new LatLon(middleCoor.lat() + (start.lon() - middleCoor.lon()) * scale * lengthFactor,
+                middleCoor.lon() - (start.lat() - middleCoor.lat()) / scale * lengthFactor);
+        if (detachedNode == null)
+        {
+            detachedNode = new Node(detachedCoor);
+            dataSet.addPrimitive(detachedNode);
+        }
+        else
+            detachedNode.setCoor(detachedCoor);
+
+        Vector<Node> extraWayNodes = new Vector<>();
+        if (extraWayUp)
+        {
+            extraWayNodes.add(middleNode);
+            extraWayNodes.add(detachedNode);
+        }
+        else
+        {
+            extraWayNodes.add(detachedNode);
+            extraWayNodes.add(middleNode);
+        }
+        if (extraWay == null)
+        {
+            extraWay = new Way();
+            extraWay.setNodes(extraWayNodes);
+            dataSet.addPrimitive(extraWay);
+        }
+        else
+            extraWay.setNodes(extraWayNodes);
     }
-    
-    
+
+
     public void appendNodes(CorridorPart.Type type, CorridorPart.ReachableSide side, String level,
-	LatLon from, LatLon to, ModelGeography target)
+            LatLon from, LatLon to, ModelGeography target)
     {
-	if (type == CorridorPart.Type.STAIRS_UP || type == CorridorPart.Type.STAIRS_DOWN)
-	{
-	    setExtraElements(side, from, to, type == CorridorPart.Type.STAIRS_UP, MIN_LENGTH);
-	    target.appendNode(middleNode);
+        if (type == CorridorPart.Type.STAIRS_UP || type == CorridorPart.Type.STAIRS_DOWN)
+        {
+            setExtraElements(side, from, to, type == CorridorPart.Type.STAIRS_UP, MIN_LENGTH);
+            target.appendNode(middleNode);
 
-	    detachedNode.removeAll();
+            detachedNode.removeAll();
 
-	    extraWay.removeAll();
-	    extraWay.put("highway", "steps");
-	    extraWay.put("incline", "up");
-	    extraWay.put("level", level);
-	}
-	else if (type == CorridorPart.Type.ESCALATOR_UP_LEAVING
-	    || type == CorridorPart.Type.ESCALATOR_UP_ARRIVING
-	    || type == CorridorPart.Type.ESCALATOR_UP_BIDIRECTIONAL
-	    || type == CorridorPart.Type.ESCALATOR_DOWN_LEAVING
-	    || type == CorridorPart.Type.ESCALATOR_DOWN_ARRIVING
-	    || type == CorridorPart.Type.ESCALATOR_DOWN_BIDIRECTIONAL)
-	{
-	    setExtraElements(side, from, to,
-		type == CorridorPart.Type.ESCALATOR_UP_LEAVING
-		|| type == CorridorPart.Type.ESCALATOR_UP_ARRIVING
-		|| type == CorridorPart.Type.ESCALATOR_UP_BIDIRECTIONAL, MIN_LENGTH);
-	    target.appendNode(middleNode);
+            extraWay.removeAll();
+            extraWay.put("highway", "steps");
+            extraWay.put("incline", "up");
+            extraWay.put("level", level);
+        }
+        else if (type == CorridorPart.Type.ESCALATOR_UP_LEAVING
+                || type == CorridorPart.Type.ESCALATOR_UP_ARRIVING
+                || type == CorridorPart.Type.ESCALATOR_UP_BIDIRECTIONAL
+                || type == CorridorPart.Type.ESCALATOR_DOWN_LEAVING
+                || type == CorridorPart.Type.ESCALATOR_DOWN_ARRIVING
+                || type == CorridorPart.Type.ESCALATOR_DOWN_BIDIRECTIONAL)
+        {
+            setExtraElements(side, from, to,
+                    type == CorridorPart.Type.ESCALATOR_UP_LEAVING
+                    || type == CorridorPart.Type.ESCALATOR_UP_ARRIVING
+                    || type == CorridorPart.Type.ESCALATOR_UP_BIDIRECTIONAL, MIN_LENGTH);
+            target.appendNode(middleNode);
 
-	    detachedNode.removeAll();
+            detachedNode.removeAll();
 
-	    extraWay.removeAll();
-	    extraWay.put("highway", "steps");
-	    extraWay.put("incline", "up");
-	    if (type == CorridorPart.Type.ESCALATOR_UP_LEAVING
-		    || type == CorridorPart.Type.ESCALATOR_DOWN_ARRIVING)
-		extraWay.put("conveying", "forward");
-	    else if (type == CorridorPart.Type.ESCALATOR_UP_ARRIVING
-		    || type == CorridorPart.Type.ESCALATOR_DOWN_LEAVING)
-		extraWay.put("conveying", "backward");
-	    else
-		extraWay.put("conveying", "reversible");
-	    extraWay.put("level", level);
-	}
-	else if (type == CorridorPart.Type.ELEVATOR)
-	{
-	    setExtraElements(side, from, to, true, 0.);
-	    target.appendNode(middleNode);
+            extraWay.removeAll();
+            extraWay.put("highway", "steps");
+            extraWay.put("incline", "up");
+            if (type == CorridorPart.Type.ESCALATOR_UP_LEAVING
+                    || type == CorridorPart.Type.ESCALATOR_DOWN_ARRIVING)
+                extraWay.put("conveying", "forward");
+            else if (type == CorridorPart.Type.ESCALATOR_UP_ARRIVING
+                    || type == CorridorPart.Type.ESCALATOR_DOWN_LEAVING)
+                extraWay.put("conveying", "backward");
+            else
+                extraWay.put("conveying", "reversible");
+            extraWay.put("level", level);
+        }
+        else if (type == CorridorPart.Type.ELEVATOR)
+        {
+            setExtraElements(side, from, to, true, 0.);
+            target.appendNode(middleNode);
 
-	    detachedNode.removeAll();
-	    detachedNode.put("highway", "elevator");
-	    
-	    extraWay.removeAll();
-	    extraWay.put("highway", "footway");
-	    extraWay.put("level", level);
-	}
-	else
-	{
-	    if (extraWay != null)
-	    {
-		extraWay.setDeleted(true);
-		extraWay = null;
-	    }
-	    if (middleNode != null)
-	    {
-		middleNode.setDeleted(true);
-		middleNode = null;
-	    }
-	    if (detachedNode != null)
-	    {
-		detachedNode.setDeleted(true);
-		detachedNode = null;
-	    }
-	}
+            detachedNode.removeAll();
+            detachedNode.put("highway", "elevator");
+
+            extraWay.removeAll();
+            extraWay.put("highway", "footway");
+            extraWay.put("level", level);
+        }
+        else
+        {
+            if (extraWay != null)
+            {
+                extraWay.setDeleted(true);
+                extraWay = null;
+            }
+            if (middleNode != null)
+            {
+                middleNode.setDeleted(true);
+                middleNode = null;
+            }
+            if (detachedNode != null)
+            {
+                detachedNode.setDeleted(true);
+                detachedNode = null;
+            }
+        }
     }
-    
-    
+
+
     private DataSet dataSet;
     private Node middleNode;
Index: applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/CorridorPart.java
===================================================================
--- applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/CorridorPart.java	(revision 32478)
+++ applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/CorridorPart.java	(revision 32479)
@@ -1,7 +1,3 @@
 package indoor_sweepline;
-
-import java.util.List;
-import java.util.Vector;
-
 
 public class CorridorPart
Index: applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweepline.java
===================================================================
--- applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweepline.java	(revision 32478)
+++ applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweepline.java	(revision 32479)
@@ -3,6 +3,6 @@
 import javax.swing.JMenu;
 import javax.swing.JMenuItem;
+
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.gui.MainMenu;
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
Index: applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineController.java
===================================================================
--- applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineController.java	(revision 32478)
+++ applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineController.java	(revision 32479)
@@ -2,20 +2,25 @@
 
 import java.util.List;
+
 import javax.swing.DefaultComboBoxModel;
+
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.coor.LatLon;
-import org.openstreetmap.josm.gui.layer.Layer;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.gui.MapView;
 
 
-public class IndoorSweeplineController implements MapView.LayerChangeListener
+public class IndoorSweeplineController implements LayerChangeListener
 {
     public IndoorSweeplineController(OsmDataLayer activeLayer, LatLon center)
     {
-	MapView.addLayerChangeListener(this);
-	layer = activeLayer;
-	model = new IndoorSweeplineModel(activeLayer, center);
-	dialog = new IndoorSweeplineWizardDialog(this);
-	dialog.setVisible(true);
+        Main.getLayerManager().addLayerChangeListener(this);
+        layer = activeLayer;
+        model = new IndoorSweeplineModel(activeLayer, center);
+        dialog = new IndoorSweeplineWizardDialog(this);
+        dialog.setVisible(true);
     }
 
@@ -23,114 +28,112 @@
     public IndoorSweeplineWizardDialog view()
     {
-	return dialog;
+        return dialog;
     }
 
-    
     @Override
-    public void activeLayerChange(Layer oldLayer, Layer newLayer)
+    public void layerOrderChanged(LayerOrderChangeEvent e)
     {
     }
 
     @Override
-    public void layerAdded(Layer newLayer)
+    public void layerAdded(LayerAddEvent e)
     {
     }
 
     @Override
-    public void layerRemoved(Layer oldLayer)
+    public void layerRemoving(LayerRemoveEvent e)
     {
-	if (oldLayer == layer)
-	    dialog.setVisible(false);
+        if (e.getRemovedLayer() == layer)
+            dialog.setVisible(false);
     }
-    
-    
+
     public int leftRightCount()
     {
-	return model.leftRightCount();
+        return model.leftRightCount();
     }
-    
+
     public void addRightStructure()
     {
-	if (model.leftRightCount() % 2 == 0)
-	    model.addBeam();
-	else
-	    model.addStrip();
+        if (model.leftRightCount() % 2 == 0)
+            model.addBeam();
+        else
+            model.addStrip();
     }
-    
+
     public DefaultComboBoxModel<String> structures()
     {
-	return model.structures();
+        return model.structures();
     }
-    
+
     public double getStripWidth(int index)
     {
-	return model.getStripWidth(index);
+        return model.getStripWidth(index);
     }
-    
+
     public void setStripWidth(int index, double value)
     {
-	model.setStripWidth(index, value);
+        model.setStripWidth(index, value);
     }
-    
+
     public double getBeamOffset(int index)
     {
-	return model.getBeamOffset(index);
+        return model.getBeamOffset(index);
     }
-    
+
     public void setBeamOffset(int index, double beamOffset)
     {
-	model.setBeamOffset(index, beamOffset);
+        model.setBeamOffset(index, beamOffset);
     }
-    
+
     public List<CorridorPart> getBeamParts(int index)
     {
-	return model.getBeamParts(index);
+        return model.getBeamParts(index);
     }
-    
+
     public void addCorridorPart(int beamIndex, boolean append, double value)
     {
-	model.addCorridorPart(beamIndex, append, value);
+        model.addCorridorPart(beamIndex, append, value);
     }
-    
+
     public void setCorridorPartWidth(int beamIndex, int partIndex, double value)
     {
-	model.setCorridorPartWidth(beamIndex, partIndex, value);
+        model.setCorridorPartWidth(beamIndex, partIndex, value);
     }
-    
+
     public void setCorridorPartType(int beamIndex, int partIndex, CorridorPart.Type type)
     {
-	model.setCorridorPartType(beamIndex, partIndex, type);
+        model.setCorridorPartType(beamIndex, partIndex, type);
     }
-    
+
     public void setCorridorPartSide(int beamIndex, int partIndex, CorridorPart.ReachableSide side)
     {
-	model.setCorridorPartSide(beamIndex, partIndex, side);
+        model.setCorridorPartSide(beamIndex, partIndex, side);
     }
-    
+
     public Strip getStrip(int beamIndex)
     {
-	return model.getStrip(beamIndex);
+        return model.getStrip(beamIndex);
     }
-        
+
     public IndoorSweeplineModel.Type getType()
     {
-	return model.getType();
+        return model.getType();
     }
-    
+
     public void setType(IndoorSweeplineModel.Type type)
     {
-	model.setType(type);
+        model.setType(type);
     }
-    
+
     public String getLevel()
     {
-	return model.getLevel();
+        return model.getLevel();
     }
-    
+
     public void setLevel(String level)
     {
-	model.setLevel(level);
+        model.setLevel(level);
     }
-    
+
     private OsmDataLayer layer;
     private IndoorSweeplineModel model;
Index: applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineModel.java
===================================================================
--- applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineModel.java	(revision 32478)
+++ applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineModel.java	(revision 32479)
@@ -3,8 +3,9 @@
 import java.util.List;
 import java.util.Vector;
+
 import javax.swing.DefaultComboBoxModel;
+
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.coor.LatLon;
-import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 
@@ -13,5 +14,5 @@
 - focus to useful table entry after cell edit
 - keyboard shortcuts
-*/
+ */
 
 
@@ -20,6 +21,6 @@
     public enum Type
     {
-	CORRIDOR,
-	PLATFORM
+        CORRIDOR,
+        PLATFORM
     };
 
@@ -27,28 +28,28 @@
     public IndoorSweeplineModel(OsmDataLayer activeLayer, LatLon center)
     {
-	target = new ModelGeography(activeLayer.data, center);
-	
-	beams = new Vector<Beam>();
-	strips = new Vector<Strip>();
-	type = Type.CORRIDOR;
-	level = "-1";
-	addBeam();
-	addStrip();
-	addBeam();
-	
-	structureBox = new DefaultComboBoxModel<String>();
-    }
-    
-    
+        target = new ModelGeography(activeLayer.data, center);
+
+        beams = new Vector<>();
+        strips = new Vector<>();
+        type = Type.CORRIDOR;
+        level = "-1";
+        addBeam();
+        addStrip();
+        addBeam();
+
+        structureBox = new DefaultComboBoxModel<>();
+    }
+
+
     private ModelGeography target;
-    
-    
+
+
     public void addBeam()
     {
-	CorridorPart.ReachableSide side = CorridorPart.ReachableSide.LEFT;
-	if (beams.size() == 0)
-	    side = CorridorPart.ReachableSide.RIGHT;
-	    
-	double width = 10.;
+        CorridorPart.ReachableSide side = CorridorPart.ReachableSide.LEFT;
+        if (beams.size() == 0)
+            side = CorridorPart.ReachableSide.RIGHT;
+
+        /*double width = 10.;
 	if (beams.size() > 0)
 	{
@@ -57,297 +58,297 @@
 		width += part.width;
 	}
-    
+
 	double offset = 0;
 	for (int i = 0; i < strips.size(); ++i)
-	    offset += strips.elementAt(i).width;
-	
-	if (strips.size() == 0)
-	{
-	    Vector<Double> blueprint = new Vector<Double>();
-	    blueprint.addElement(0.);
-	    blueprint.addElement(10.);
-	    beams.add(new Beam(blueprint, 0., side));
-	}
-	else
-	    beams.add(new Beam(strips.elementAt(strips.size()-1).lhs,
-		beams.elementAt(beams.size()-1).getBeamOffset(), side));
-	
-	if (strips.size() > 0)
-	    strips.elementAt(beams.size()-2).rhs = beams.elementAt(beams.size()-1).leftHandSideStrips();
-	    
-	updateOsmModel();
-    }
-    
-    
+	    offset += strips.elementAt(i).width;*/
+
+        if (strips.size() == 0)
+        {
+            Vector<Double> blueprint = new Vector<>();
+            blueprint.addElement(0.);
+            blueprint.addElement(10.);
+            beams.add(new Beam(blueprint, 0., side));
+        }
+        else
+            beams.add(new Beam(strips.elementAt(strips.size()-1).lhs,
+                    beams.elementAt(beams.size()-1).getBeamOffset(), side));
+
+        if (strips.size() > 0)
+            strips.elementAt(beams.size()-2).rhs = beams.elementAt(beams.size()-1).leftHandSideStrips();
+
+        updateOsmModel();
+    }
+
+
     public void addStrip()
     {
-	strips.add(new Strip(target.getDataSet()));
-	if (beams.size() > 1)
-	{
-	    beams.elementAt(beams.size()-1).setDefaultSide(CorridorPart.ReachableSide.ALL);
-	    strips.elementAt(strips.size()-2).rhs = beams.elementAt(strips.size()-1).leftHandSideStrips();
-	}
-	strips.elementAt(strips.size()-1).lhs = beams.elementAt(strips.size()-1).rightHandSideStrips();	    
-	
-	updateOsmModel();
-    }
-
-    
+        strips.add(new Strip(target.getDataSet()));
+        if (beams.size() > 1)
+        {
+            beams.elementAt(beams.size()-1).setDefaultSide(CorridorPart.ReachableSide.ALL);
+            strips.elementAt(strips.size()-2).rhs = beams.elementAt(strips.size()-1).leftHandSideStrips();
+        }
+        strips.elementAt(strips.size()-1).lhs = beams.elementAt(strips.size()-1).rightHandSideStrips();
+
+        updateOsmModel();
+    }
+
+
     public int leftRightCount()
     {
-	return beams.size() + strips.size();
-    }
-    
-    
+        return beams.size() + strips.size();
+    }
+
+
     public DefaultComboBoxModel<String> structures()
     {
-	structureBox.removeAllElements();
-	double offset = 0;
-	for (int i = 0; i < strips.size(); ++i)
-	{
-	    if (i < beams.size())
-		structureBox.addElement(Double.toString(offset));
-	    structureBox.addElement(Double.toString(offset) + " - "
-		+ Double.toString(offset + strips.elementAt(i).width));
-	    offset += strips.elementAt(i).width;
-	}
-	if (strips.size() < beams.size())
-	    structureBox.addElement(Double.toString(offset));
-	
-	return structureBox;
-    }
-    
-    
+        structureBox.removeAllElements();
+        double offset = 0;
+        for (int i = 0; i < strips.size(); ++i)
+        {
+            if (i < beams.size())
+                structureBox.addElement(Double.toString(offset));
+            structureBox.addElement(Double.toString(offset) + " - "
+                    + Double.toString(offset + strips.elementAt(i).width));
+            offset += strips.elementAt(i).width;
+        }
+        if (strips.size() < beams.size())
+            structureBox.addElement(Double.toString(offset));
+
+        return structureBox;
+    }
+
+
     public Strip getStrip(int index)
     {
-	return strips.elementAt(index / 2);
-    }
-    
-    
+        return strips.elementAt(index / 2);
+    }
+
+
     public double getStripWidth(int index)
     {
-	return strips.elementAt(index / 2).width;
-    }
-    
-    
+        return strips.elementAt(index / 2).width;
+    }
+
+
     public void setStripWidth(int index, double value)
     {
-	strips.elementAt(index / 2).width = value;
-	
-	updateOsmModel();
-    }
-    
-    
+        strips.elementAt(index / 2).width = value;
+
+        updateOsmModel();
+    }
+
+
     public double getBeamOffset(int index)
     {
-	return beams.elementAt(index / 2).getBeamOffset();
-    }
-    
+        return beams.elementAt(index / 2).getBeamOffset();
+    }
+
     public void setBeamOffset(int index, double beamOffset)
     {
-	beams.elementAt(index / 2).setBeamOffset(beamOffset);	    
-	updateOsmModel();
-    }
-    
-    
+        beams.elementAt(index / 2).setBeamOffset(beamOffset);
+        updateOsmModel();
+    }
+
+
     public List<CorridorPart> getBeamParts(int index)
     {
-	return beams.elementAt(index / 2).getBeamParts();
-    }
-
-    
+        return beams.elementAt(index / 2).getBeamParts();
+    }
+
+
     public void addCorridorPart(int beamIndex, boolean append, double value)
     {
-	beams.elementAt(beamIndex / 2).addCorridorPart(append, value);
-	if (beamIndex / 2 > 0)
-	    strips.elementAt(beamIndex / 2 - 1).rhs = beams.elementAt(beamIndex / 2).leftHandSideStrips();
-	if (beamIndex / 2 < strips.size())
-	    strips.elementAt(beamIndex / 2).lhs = beams.elementAt(beamIndex / 2).rightHandSideStrips();
-	    
-	updateOsmModel();
-    }
-
-    
+        beams.elementAt(beamIndex / 2).addCorridorPart(append, value);
+        if (beamIndex / 2 > 0)
+            strips.elementAt(beamIndex / 2 - 1).rhs = beams.elementAt(beamIndex / 2).leftHandSideStrips();
+        if (beamIndex / 2 < strips.size())
+            strips.elementAt(beamIndex / 2).lhs = beams.elementAt(beamIndex / 2).rightHandSideStrips();
+
+        updateOsmModel();
+    }
+
+
     public void setCorridorPartWidth(int beamIndex, int partIndex, double value)
     {
-	beams.elementAt(beamIndex / 2).setCorridorPartWidth(partIndex, value);
-	if (beamIndex / 2 > 0)
-	    strips.elementAt(beamIndex / 2 - 1).rhs = beams.elementAt(beamIndex / 2).leftHandSideStrips();
-	if (beamIndex / 2 < strips.size())
-	    strips.elementAt(beamIndex / 2).lhs = beams.elementAt(beamIndex / 2).rightHandSideStrips();
-	    
-	updateOsmModel();
-    }
-
-    
+        beams.elementAt(beamIndex / 2).setCorridorPartWidth(partIndex, value);
+        if (beamIndex / 2 > 0)
+            strips.elementAt(beamIndex / 2 - 1).rhs = beams.elementAt(beamIndex / 2).leftHandSideStrips();
+        if (beamIndex / 2 < strips.size())
+            strips.elementAt(beamIndex / 2).lhs = beams.elementAt(beamIndex / 2).rightHandSideStrips();
+
+        updateOsmModel();
+    }
+
+
     public void setCorridorPartType(int beamIndex, int partIndex, CorridorPart.Type type)
     {
-	if (beamIndex % 2 == 0)
-	{
-	    beams.elementAt(beamIndex / 2).setCorridorPartType(partIndex, type);
-	    if (beamIndex / 2 > 0)
-		strips.elementAt(beamIndex / 2 - 1).rhs = beams.elementAt(beamIndex / 2).leftHandSideStrips();
-	    if (beamIndex / 2 < strips.size())
-		strips.elementAt(beamIndex / 2).lhs = beams.elementAt(beamIndex / 2).rightHandSideStrips();
-	}
-	else
-	{
-	    if (type != CorridorPart.Type.PASSAGE && type != CorridorPart.Type.VOID)
-		strips.elementAt(beamIndex / 2).setCorridorPartType(partIndex, type);
-	}
-	    
-	updateOsmModel();
-    }
-
-    
+        if (beamIndex % 2 == 0)
+        {
+            beams.elementAt(beamIndex / 2).setCorridorPartType(partIndex, type);
+            if (beamIndex / 2 > 0)
+                strips.elementAt(beamIndex / 2 - 1).rhs = beams.elementAt(beamIndex / 2).leftHandSideStrips();
+            if (beamIndex / 2 < strips.size())
+                strips.elementAt(beamIndex / 2).lhs = beams.elementAt(beamIndex / 2).rightHandSideStrips();
+        }
+        else
+        {
+            if (type != CorridorPart.Type.PASSAGE && type != CorridorPart.Type.VOID)
+                strips.elementAt(beamIndex / 2).setCorridorPartType(partIndex, type);
+        }
+
+        updateOsmModel();
+    }
+
+
     public void setCorridorPartSide(int beamIndex, int partIndex, CorridorPart.ReachableSide side)
     {
-	beams.elementAt(beamIndex / 2).setCorridorPartSide(partIndex, side);
-	if (beamIndex / 2 > 0)
-	    strips.elementAt(beamIndex / 2 - 1).rhs = beams.elementAt(beamIndex / 2).leftHandSideStrips();
-	if (beamIndex / 2 < strips.size())
-	    strips.elementAt(beamIndex / 2).lhs = beams.elementAt(beamIndex / 2).rightHandSideStrips();
-	    
-	updateOsmModel();
-    }
-    
-    
+        beams.elementAt(beamIndex / 2).setCorridorPartSide(partIndex, side);
+        if (beamIndex / 2 > 0)
+            strips.elementAt(beamIndex / 2 - 1).rhs = beams.elementAt(beamIndex / 2).leftHandSideStrips();
+        if (beamIndex / 2 < strips.size())
+            strips.elementAt(beamIndex / 2).lhs = beams.elementAt(beamIndex / 2).rightHandSideStrips();
+
+        updateOsmModel();
+    }
+
+
     public Type getType()
     {
-	return type;
-    }
-    
+        return type;
+    }
+
     public void setType(Type type)
     {
-	this.type = type;
-	updateOsmModel();
-    }
-    
-    
+        this.type = type;
+        updateOsmModel();
+    }
+
+
     public String getLevel()
     {
-	return level;
-    }
-    
+        return level;
+    }
+
     public void setLevel(String level)
     {
-	this.level = level;
-	updateOsmModel();
-    }
-    
-    
+        this.level = level;
+        updateOsmModel();
+    }
+
+
     private Vector<Beam> beams;
     private Vector<Strip> strips;
     private Type type;
     private String level;
-    
+
     DefaultComboBoxModel<String> structureBox;
 
-    
+
     private void updateOsmModel()
     {
-	distributeWays();
-	Main.map.mapView.repaint();
-    }
-        
-    
+        distributeWays();
+        Main.map.mapView.repaint();
+    }
+
+
     public class SweepPolygonCursor
     {
-	public SweepPolygonCursor(int stripIndex, int partIndex)
-	{
-	    this.stripIndex = stripIndex;
-	    this.partIndex = partIndex;
-	}
-	
-	public boolean equals(SweepPolygonCursor rhs)
-	{
-	    return rhs != null
-		&& stripIndex == rhs.stripIndex && partIndex == rhs.partIndex;
-	}
-    
-	public int stripIndex;
-	public int partIndex;
-    }
-    
-    
+        public SweepPolygonCursor(int stripIndex, int partIndex)
+        {
+            this.stripIndex = stripIndex;
+            this.partIndex = partIndex;
+        }
+
+        public boolean equals(SweepPolygonCursor rhs)
+        {
+            return rhs != null
+                    && stripIndex == rhs.stripIndex && partIndex == rhs.partIndex;
+        }
+
+        public int stripIndex;
+        public int partIndex;
+    }
+
+
     private void distributeWays()
     {
-	target.startGeographyBuild(beams, strips);
-    
-	Vector<Vector<Boolean>> stripRefs = new Vector<Vector<Boolean>>();
-	for (Strip strip : strips)
-	{
-	    Vector<Boolean> refs = new Vector<Boolean>();
-	    if (strip.lhs.size() < strip.rhs.size())
-		refs.setSize(strip.rhs.size());
-	    else
-		refs.setSize(strip.lhs.size());
-	    stripRefs.add(refs);
-	}
-	
-	Boolean truePtr = new Boolean(true);
-	for (int i = 0; i < stripRefs.size(); ++i)
-	{
-	    Vector<Boolean> refs = stripRefs.elementAt(i);
-	    for (int j = 0; j < refs.size(); ++j)
-	    {
-		if (refs.elementAt(j) == null)
-		{
-		    target.startWay();
-		
-		    SweepPolygonCursor cursor = new SweepPolygonCursor(i, j);
-		    
-		    boolean toTheLeft = true;
-		    while (stripRefs.elementAt(cursor.stripIndex).elementAt(cursor.partIndex) == null)
-		    {
-			stripRefs.elementAt(cursor.stripIndex).setElementAt(truePtr, cursor.partIndex);
-			if (toTheLeft && cursor.partIndex < strips.elementAt(cursor.stripIndex).lhs.size())
-			{
-			    target.appendCorridorPart(
-				strips.elementAt(cursor.stripIndex).partAt(cursor.partIndex),
-				strips.elementAt(cursor.stripIndex).geographyAt(cursor.partIndex),
-				cursor.stripIndex,
-				beams.elementAt(cursor.stripIndex).getBeamPartIndex(!toTheLeft, cursor.partIndex),
-				level);
-			    toTheLeft = beams.elementAt(cursor.stripIndex).appendNodes(
-				cursor, toTheLeft, target.beamAt(cursor.stripIndex), level);
-			}
-			else if (!toTheLeft && cursor.partIndex < strips.elementAt(cursor.stripIndex).rhs.size())
-			{
-			    target.appendCorridorPart(
-				strips.elementAt(cursor.stripIndex).partAt(cursor.partIndex),
-				strips.elementAt(cursor.stripIndex).geographyAt(cursor.partIndex),
-				cursor.stripIndex + 1,
-				beams.elementAt(cursor.stripIndex + 1).getBeamPartIndex(!toTheLeft, cursor.partIndex),
-				level);
-			    toTheLeft = beams.elementAt(cursor.stripIndex + 1).appendNodes(
-				cursor, toTheLeft, target.beamAt(cursor.stripIndex + 1), level);
-			}
-			else
-			    toTheLeft = appendUturn(cursor, toTheLeft);
-		    }
-		    
-		    target.finishWay(strips.elementAt(cursor.stripIndex), cursor.partIndex, j % 2 == 0, level);
-		}
-	    }
-	}
-	
-	target.finishGeographyBuild(type, level);
-    }
-    
-    
+        target.startGeographyBuild(beams, strips);
+
+        Vector<Vector<Boolean>> stripRefs = new Vector<>();
+        for (Strip strip : strips)
+        {
+            Vector<Boolean> refs = new Vector<>();
+            if (strip.lhs.size() < strip.rhs.size())
+                refs.setSize(strip.rhs.size());
+            else
+                refs.setSize(strip.lhs.size());
+            stripRefs.add(refs);
+        }
+
+        Boolean truePtr = new Boolean(true);
+        for (int i = 0; i < stripRefs.size(); ++i)
+        {
+            Vector<Boolean> refs = stripRefs.elementAt(i);
+            for (int j = 0; j < refs.size(); ++j)
+            {
+                if (refs.elementAt(j) == null)
+                {
+                    target.startWay();
+
+                    SweepPolygonCursor cursor = new SweepPolygonCursor(i, j);
+
+                    boolean toTheLeft = true;
+                    while (stripRefs.elementAt(cursor.stripIndex).elementAt(cursor.partIndex) == null)
+                    {
+                        stripRefs.elementAt(cursor.stripIndex).setElementAt(truePtr, cursor.partIndex);
+                        if (toTheLeft && cursor.partIndex < strips.elementAt(cursor.stripIndex).lhs.size())
+                        {
+                            target.appendCorridorPart(
+                                    strips.elementAt(cursor.stripIndex).partAt(cursor.partIndex),
+                                    strips.elementAt(cursor.stripIndex).geographyAt(cursor.partIndex),
+                                    cursor.stripIndex,
+                                    beams.elementAt(cursor.stripIndex).getBeamPartIndex(!toTheLeft, cursor.partIndex),
+                                    level);
+                            toTheLeft = beams.elementAt(cursor.stripIndex).appendNodes(
+                                    cursor, toTheLeft, target.beamAt(cursor.stripIndex), level);
+                        }
+                        else if (!toTheLeft && cursor.partIndex < strips.elementAt(cursor.stripIndex).rhs.size())
+                        {
+                            target.appendCorridorPart(
+                                    strips.elementAt(cursor.stripIndex).partAt(cursor.partIndex),
+                                    strips.elementAt(cursor.stripIndex).geographyAt(cursor.partIndex),
+                                    cursor.stripIndex + 1,
+                                    beams.elementAt(cursor.stripIndex + 1).getBeamPartIndex(!toTheLeft, cursor.partIndex),
+                                    level);
+                            toTheLeft = beams.elementAt(cursor.stripIndex + 1).appendNodes(
+                                    cursor, toTheLeft, target.beamAt(cursor.stripIndex + 1), level);
+                        }
+                        else
+                            toTheLeft = appendUturn(cursor, toTheLeft);
+                    }
+
+                    target.finishWay(strips.elementAt(cursor.stripIndex), cursor.partIndex, j % 2 == 0, level);
+                }
+            }
+        }
+
+        target.finishGeographyBuild(type, level);
+    }
+
+
     private boolean appendUturn(SweepPolygonCursor cursor, boolean toTheLeft)
     {
-	Strip strip = strips.elementAt(cursor.stripIndex);
-	target.appendUturnNode(strip, cursor.partIndex, cursor.stripIndex,
-	    beams.elementAt(toTheLeft ? cursor.stripIndex + 1 : cursor.stripIndex).
-		getBeamPartIndex(toTheLeft, cursor.partIndex),
-	    toTheLeft, level);
-	
-	if (cursor.partIndex % 2 == 0)
-	    ++cursor.partIndex;
-	else
-	    --cursor.partIndex;
-	return !toTheLeft;
+        Strip strip = strips.elementAt(cursor.stripIndex);
+        target.appendUturnNode(strip, cursor.partIndex, cursor.stripIndex,
+                beams.elementAt(toTheLeft ? cursor.stripIndex + 1 : cursor.stripIndex).
+                getBeamPartIndex(toTheLeft, cursor.partIndex),
+                toTheLeft, level);
+
+        if (cursor.partIndex % 2 == 0)
+            ++cursor.partIndex;
+        else
+            --cursor.partIndex;
+        return !toTheLeft;
     }
 }
Index: applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineWizardAction.java
===================================================================
--- applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineWizardAction.java	(revision 32478)
+++ applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineWizardAction.java	(revision 32479)
@@ -4,20 +4,27 @@
 
 import java.awt.event.ActionEvent;
+
 import javax.swing.JOptionPane;
+
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.projection.Projections;
 import org.openstreetmap.josm.gui.layer.Layer;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent;
+import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent;
+import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.gui.MapView;
 
 
-public class IndoorSweeplineWizardAction extends JosmAction implements MapView.LayerChangeListener
+public class IndoorSweeplineWizardAction extends JosmAction implements LayerChangeListener, ActiveLayerChangeListener
 {
     public IndoorSweeplineWizardAction()
     {
-	super(tr("Concourse wizard ..."), null,
-	    tr("Opens up a wizard to create a concourse"), null, false);
-	MapView.addLayerChangeListener(this);
+        super(tr("Concourse wizard ..."), null,
+                tr("Opens up a wizard to create a concourse"), null, false);
+        Main.getLayerManager().addLayerChangeListener(this);
     }
 
@@ -25,40 +32,44 @@
     public void actionPerformed(ActionEvent event)
     {
-	if (layer == null)
-	    JOptionPane.showMessageDialog(JOptionPane.getFrameForComponent(Main.parent),
-		"No default layer found.");
-	else if (!(layer instanceof OsmDataLayer))
-	    JOptionPane.showMessageDialog(JOptionPane.getFrameForComponent(Main.parent),
-		"The default layer is not an OSM layer.");
-	else if (Main.map == null)
-	    JOptionPane.showMessageDialog(JOptionPane.getFrameForComponent(Main.parent),
-		"No map found.");
-	else if (Main.map.mapView == null)
-	    JOptionPane.showMessageDialog(JOptionPane.getFrameForComponent(Main.parent),
-		"No map view found.");
-	else
-	    new IndoorSweeplineController((OsmDataLayer)layer,
-		Projections.inverseProject(Main.map.mapView.getCenter()));
-    }
-
-    
-    @Override
-    public void activeLayerChange(Layer oldLayer, Layer newLayer)
-    {
-	layer = newLayer;
+        if (layer == null)
+            JOptionPane.showMessageDialog(JOptionPane.getFrameForComponent(Main.parent),
+                    "No default layer found.");
+        else if (!(layer instanceof OsmDataLayer))
+            JOptionPane.showMessageDialog(JOptionPane.getFrameForComponent(Main.parent),
+                    "The default layer is not an OSM layer.");
+        else if (Main.map == null)
+            JOptionPane.showMessageDialog(JOptionPane.getFrameForComponent(Main.parent),
+                    "No map found.");
+        else if (Main.map.mapView == null)
+            JOptionPane.showMessageDialog(JOptionPane.getFrameForComponent(Main.parent),
+                    "No map view found.");
+        else
+            new IndoorSweeplineController((OsmDataLayer)layer,
+                    Projections.inverseProject(Main.map.mapView.getCenter()));
     }
 
     @Override
-    public void layerAdded(Layer newLayer)
+    public void activeOrEditLayerChanged(ActiveLayerChangeEvent e)
+    {
+        layer = Main.getLayerManager().getActiveLayer();
+    }
+
+    @Override
+    public void layerOrderChanged(LayerOrderChangeEvent e)
     {
     }
 
     @Override
-    public void layerRemoved(Layer oldLayer)
+    public void layerAdded(LayerAddEvent e)
     {
-	if (layer == oldLayer)
-	    layer = null;
     }
-        
+
+    @Override
+    public void layerRemoving(LayerRemoveEvent e)
+    {
+        if (layer == e.getRemovedLayer())
+            layer = null;
+    }
+
     private Layer layer;
 }
Index: applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineWizardDialog.java
===================================================================
--- applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineWizardDialog.java	(revision 32478)
+++ applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/IndoorSweeplineWizardDialog.java	(revision 32479)
@@ -10,4 +10,5 @@
 import java.util.List;
 import java.util.Vector;
+
 import javax.swing.AbstractAction;
 import javax.swing.DefaultCellEditor;
@@ -29,4 +30,5 @@
 import javax.swing.table.TableColumn;
 import javax.swing.table.TableModel;
+
 import org.openstreetmap.josm.Main;
 
@@ -36,238 +38,239 @@
     public IndoorSweeplineWizardDialog(IndoorSweeplineController controller)
     {
-	super(JOptionPane.getFrameForComponent(Main.parent), "Indoor Sweepline Wizard", false);
-	
-	this.controller = controller;
-	beamIndex = 0;
-	prev = new PrevAction();
-	next = new NextAction();
-	
-	GridbagPanel panel = new GridbagPanel();
-	
-	panel.add(new JLabel(tr("Vertical layer:")), 0, 0, 3, 1);
-	panel.add(makeLevelField(), 3, 0, 1, 1);
-	panel.add(new JLabel(tr("Structure type:")), 0, 1, 3, 1);
-	panel.add(typeBox(), 3, 1, 1, 1);
-	
-	panel.add(new JButton(prev), 0, 2, 1, 1);
-	panel.add(structureBox(), 1, 2, 1, 1);	
-	panel.add(new JButton(next), 2, 2, 2, 1);
-
-	panel.add(makeWidthLabel(), 0, 3, 3, 1);
-	panel.add(makeWidthField(), 3, 3, 1, 1);
-
-	panel.add(makeStructureTable(), 0, 4, 4, 1);
-	
-	add(panel);
-	pack();
-	refresh();
-    }
-    
-
+        super(JOptionPane.getFrameForComponent(Main.parent), "Indoor Sweepline Wizard", false);
+
+        this.controller = controller;
+        beamIndex = 0;
+        prev = new PrevAction();
+        next = new NextAction();
+
+        GridbagPanel panel = new GridbagPanel();
+
+        panel.add(new JLabel(tr("Vertical layer:")), 0, 0, 3, 1);
+        panel.add(makeLevelField(), 3, 0, 1, 1);
+        panel.add(new JLabel(tr("Structure type:")), 0, 1, 3, 1);
+        panel.add(typeBox(), 3, 1, 1, 1);
+
+        panel.add(new JButton(prev), 0, 2, 1, 1);
+        panel.add(structureBox(), 1, 2, 1, 1);
+        panel.add(new JButton(next), 2, 2, 2, 1);
+
+        panel.add(makeWidthLabel(), 0, 3, 3, 1);
+        panel.add(makeWidthField(), 3, 3, 1, 1);
+
+        panel.add(makeStructureTable(), 0, 4, 4, 1);
+
+        add(panel);
+        pack();
+        refresh();
+    }
+
+
+    @Override
     public void setVisible(boolean visible)
-    {	
-	if (visible)
-	    setLocationRelativeTo(JOptionPane.getFrameForComponent(Main.parent));
-	super.setVisible(visible);
-    }
-    
-    
+    {
+        if (visible)
+            setLocationRelativeTo(JOptionPane.getFrameForComponent(Main.parent));
+        super.setVisible(visible);
+    }
+
+
     private void refresh()
     {
-	inRefresh = true;
-	
-	leftRightCount = controller.leftRightCount();
-	prev.setEnabled(beamIndex > 0);
-	
-	DefaultComboBoxModel<String> structureBoxModel = controller.structures();
-	structureBoxModel.setSelectedItem(structureBoxModel.getElementAt(beamIndex));
-	
-	try
-	{
-	    if (beamIndex % 2 == 0)
-	    {
-		widthOffsetLabel.setText("Offset into background:");
-		stripWidth.setText(Double.toString(controller.getBeamOffset(beamIndex)));
-	    }
-	    else
-	    {
-		widthOffsetLabel.setText("Strip width:");
-		stripWidth.setText(Double.toString(controller.getStripWidth(beamIndex)));
-	    }
-	}
-	catch (IllegalStateException ex)
-	{
-	}
-	
-	try
-	{
-	    level.setText(controller.getLevel());
-	}
-	catch (IllegalStateException ex)
-	{
-	}
-	
-	typeBoxModel.setSelectedItem(structureTypeToString(controller.getType()));
-	
-	
-	structureTableModel.setRowCount(0);
-	if (beamIndex % 2 == 0)
-	{
-	    Vector<Object> row = new Vector<Object>();
-	    row.addElement("");
-	    row.addElement("");
-	    row.addElement("");
-	    structureTableModel.addRow(row);
-	    
-	    List<CorridorPart> parts = controller.getBeamParts(beamIndex);
-	    for (CorridorPart part : parts)
-	    {
-		row = new Vector<Object>();
-		row.addElement(Double.toString(part.width));
-		row.addElement(corridorPartTypeToString(part.getType()));
-		row.addElement(corridorPartSideToString(part.getSide()));
-		structureTableModel.addRow(row);
-	    }
-	    row = new Vector<Object>();
-	    row.addElement("");
-	    row.addElement("");
-	    row.addElement("");
-	    structureTableModel.addRow(row);
-	    structureTableModel.isBeam = true;
-	}
-	else
-	{
-	    Strip strip = controller.getStrip(beamIndex);
-	    for (int i = 0; i < strip.lhs.size() || i < strip.rhs.size(); ++i)
-	    {
-		Vector<Object> row = new Vector<Object>();
-		String position = i < strip.lhs.size() ? strip.lhs.elementAt(i).toString() : "X";
-		position += " - " + (i < strip.rhs.size() ? strip.rhs.elementAt(i).toString() : "X");
-		row.addElement(position);
-		row.addElement(i < strip.parts.size() ?
-		    corridorPartTypeToString(strip.parts.elementAt(i).getType()) : "wall");
-		row.addElement(i < strip.parts.size() ?
-		    corridorPartSideToString(strip.parts.elementAt(i).getSide()) : "all");
-		structureTableModel.addRow(row);
-	    }
-	    structureTableModel.isBeam = false;
-	}
-	
-	inRefresh = false;
-    }
-    
-    
+        inRefresh = true;
+
+        leftRightCount = controller.leftRightCount();
+        prev.setEnabled(beamIndex > 0);
+
+        DefaultComboBoxModel<String> structureBoxModel = controller.structures();
+        structureBoxModel.setSelectedItem(structureBoxModel.getElementAt(beamIndex));
+
+        try
+        {
+            if (beamIndex % 2 == 0)
+            {
+                widthOffsetLabel.setText("Offset into background:");
+                stripWidth.setText(Double.toString(controller.getBeamOffset(beamIndex)));
+            }
+            else
+            {
+                widthOffsetLabel.setText("Strip width:");
+                stripWidth.setText(Double.toString(controller.getStripWidth(beamIndex)));
+            }
+        }
+        catch (IllegalStateException ex)
+        {
+        }
+
+        try
+        {
+            level.setText(controller.getLevel());
+        }
+        catch (IllegalStateException ex)
+        {
+        }
+
+        typeBoxModel.setSelectedItem(structureTypeToString(controller.getType()));
+
+
+        structureTableModel.setRowCount(0);
+        if (beamIndex % 2 == 0)
+        {
+            Vector<Object> row = new Vector<>();
+            row.addElement("");
+            row.addElement("");
+            row.addElement("");
+            structureTableModel.addRow(row);
+
+            List<CorridorPart> parts = controller.getBeamParts(beamIndex);
+            for (CorridorPart part : parts)
+            {
+                row = new Vector<>();
+                row.addElement(Double.toString(part.width));
+                row.addElement(corridorPartTypeToString(part.getType()));
+                row.addElement(corridorPartSideToString(part.getSide()));
+                structureTableModel.addRow(row);
+            }
+            row = new Vector<>();
+            row.addElement("");
+            row.addElement("");
+            row.addElement("");
+            structureTableModel.addRow(row);
+            structureTableModel.isBeam = true;
+        }
+        else
+        {
+            Strip strip = controller.getStrip(beamIndex);
+            for (int i = 0; i < strip.lhs.size() || i < strip.rhs.size(); ++i)
+            {
+                Vector<Object> row = new Vector<>();
+                String position = i < strip.lhs.size() ? strip.lhs.elementAt(i).toString() : "X";
+                position += " - " + (i < strip.rhs.size() ? strip.rhs.elementAt(i).toString() : "X");
+                row.addElement(position);
+                row.addElement(i < strip.parts.size() ?
+                        corridorPartTypeToString(strip.parts.elementAt(i).getType()) : "wall");
+                row.addElement(i < strip.parts.size() ?
+                        corridorPartSideToString(strip.parts.elementAt(i).getSide()) : "all");
+                structureTableModel.addRow(row);
+            }
+            structureTableModel.isBeam = false;
+        }
+
+        inRefresh = false;
+    }
+
+
     private String corridorPartTypeToString(CorridorPart.Type type)
     {
-	if (type == CorridorPart.Type.VOID)
-	    return "void";
-	else if (type == CorridorPart.Type.PASSAGE)
-	    return "passage";
-	else if (type == CorridorPart.Type.WALL)
-	    return "wall";
-	else if (type == CorridorPart.Type.STAIRS_UP)
-	    return "stairs to upper level";
-	else if (type == CorridorPart.Type.STAIRS_DOWN)
-	    return "stairs to lower level";
-	else if (type == CorridorPart.Type.ESCALATOR_UP_LEAVING)
-	    return "escalator leaving to upper level";
-	else if (type == CorridorPart.Type.ESCALATOR_UP_ARRIVING)
-	    return "escalator arriving from upper level";
-	else if (type == CorridorPart.Type.ESCALATOR_UP_BIDIRECTIONAL)
-	    return "escalator (reversible) to upper level";
-	else if (type == CorridorPart.Type.ESCALATOR_DOWN_LEAVING)
-	    return "escalator leaving to lower level";
-	else if (type == CorridorPart.Type.ESCALATOR_DOWN_ARRIVING)
-	    return "escalator arriving from lower level";
-	else if (type == CorridorPart.Type.ESCALATOR_DOWN_BIDIRECTIONAL)
-	    return "escalator (reversible) to lower level";
-	else if (type == CorridorPart.Type.ELEVATOR)
-	    return "elevator";
-	return "";
-    }
-    
-    
+        if (type == CorridorPart.Type.VOID)
+            return "void";
+        else if (type == CorridorPart.Type.PASSAGE)
+            return "passage";
+        else if (type == CorridorPart.Type.WALL)
+            return "wall";
+        else if (type == CorridorPart.Type.STAIRS_UP)
+            return "stairs to upper level";
+        else if (type == CorridorPart.Type.STAIRS_DOWN)
+            return "stairs to lower level";
+        else if (type == CorridorPart.Type.ESCALATOR_UP_LEAVING)
+            return "escalator leaving to upper level";
+        else if (type == CorridorPart.Type.ESCALATOR_UP_ARRIVING)
+            return "escalator arriving from upper level";
+        else if (type == CorridorPart.Type.ESCALATOR_UP_BIDIRECTIONAL)
+            return "escalator (reversible) to upper level";
+        else if (type == CorridorPart.Type.ESCALATOR_DOWN_LEAVING)
+            return "escalator leaving to lower level";
+        else if (type == CorridorPart.Type.ESCALATOR_DOWN_ARRIVING)
+            return "escalator arriving from lower level";
+        else if (type == CorridorPart.Type.ESCALATOR_DOWN_BIDIRECTIONAL)
+            return "escalator (reversible) to lower level";
+        else if (type == CorridorPart.Type.ELEVATOR)
+            return "elevator";
+        return "";
+    }
+
+
     private CorridorPart.Type parseCorridorPartType(String val)
     {
-	if (val == "void")
-	    return CorridorPart.Type.VOID;
-	else if (val == "passage")
-	    return CorridorPart.Type.PASSAGE;
-	else if (val == "wall")
-	    return CorridorPart.Type.WALL;
-	else if (val == "stairs to upper level")
-	    return CorridorPart.Type.STAIRS_UP;
-	else if (val == "stairs to lower level")
-	    return CorridorPart.Type.STAIRS_DOWN;
-	else if (val == "escalator leaving to upper level")
-	    return CorridorPart.Type.ESCALATOR_UP_LEAVING;
-	else if (val == "escalator arriving from upper level")
-	    return CorridorPart.Type.ESCALATOR_UP_ARRIVING;
-	else if (val == "escalator (reversible) to upper level")
-	    return CorridorPart.Type.ESCALATOR_UP_BIDIRECTIONAL;
-	else if (val == "escalator leaving to lower level")
-	    return CorridorPart.Type.ESCALATOR_DOWN_LEAVING;
-	else if (val == "escalator arriving from lower level")
-	    return CorridorPart.Type.ESCALATOR_DOWN_ARRIVING;
-	else if (val == "escalator (reversible) to lower level")
-	    return CorridorPart.Type.ESCALATOR_DOWN_BIDIRECTIONAL;
-	else if (val == "elevator")
-	    return CorridorPart.Type.ELEVATOR;
-	return CorridorPart.Type.VOID;
-    }
-    
-    
+        if (val == "void")
+            return CorridorPart.Type.VOID;
+        else if (val == "passage")
+            return CorridorPart.Type.PASSAGE;
+        else if (val == "wall")
+            return CorridorPart.Type.WALL;
+        else if (val == "stairs to upper level")
+            return CorridorPart.Type.STAIRS_UP;
+        else if (val == "stairs to lower level")
+            return CorridorPart.Type.STAIRS_DOWN;
+        else if (val == "escalator leaving to upper level")
+            return CorridorPart.Type.ESCALATOR_UP_LEAVING;
+        else if (val == "escalator arriving from upper level")
+            return CorridorPart.Type.ESCALATOR_UP_ARRIVING;
+        else if (val == "escalator (reversible) to upper level")
+            return CorridorPart.Type.ESCALATOR_UP_BIDIRECTIONAL;
+        else if (val == "escalator leaving to lower level")
+            return CorridorPart.Type.ESCALATOR_DOWN_LEAVING;
+        else if (val == "escalator arriving from lower level")
+            return CorridorPart.Type.ESCALATOR_DOWN_ARRIVING;
+        else if (val == "escalator (reversible) to lower level")
+            return CorridorPart.Type.ESCALATOR_DOWN_BIDIRECTIONAL;
+        else if (val == "elevator")
+            return CorridorPart.Type.ELEVATOR;
+        return CorridorPart.Type.VOID;
+    }
+
+
     private String corridorPartSideToString(CorridorPart.ReachableSide side)
     {
-	if (side == CorridorPart.ReachableSide.ALL)
-	    return "all";
-	else if (side == CorridorPart.ReachableSide.FRONT)
-	    return "front";
-	else if (side == CorridorPart.ReachableSide.BACK)
-	    return "back";
-	else if (side == CorridorPart.ReachableSide.LEFT)
-	    return "left";
-	else if (side == CorridorPart.ReachableSide.RIGHT)
-	    return "right";
-	return "";
-    }
-    
-    
+        if (side == CorridorPart.ReachableSide.ALL)
+            return "all";
+        else if (side == CorridorPart.ReachableSide.FRONT)
+            return "front";
+        else if (side == CorridorPart.ReachableSide.BACK)
+            return "back";
+        else if (side == CorridorPart.ReachableSide.LEFT)
+            return "left";
+        else if (side == CorridorPart.ReachableSide.RIGHT)
+            return "right";
+        return "";
+    }
+
+
     private CorridorPart.ReachableSide parseCorridorPartSide(String val)
     {
-	if (val == "all")
-	    return CorridorPart.ReachableSide.ALL;
-	else if (val == "front")
-	    return CorridorPart.ReachableSide.FRONT;
-	else if (val == "back")
-	    return CorridorPart.ReachableSide.BACK;
-	else if (val == "left")
-	    return CorridorPart.ReachableSide.LEFT;
-	else if (val == "right")
-	    return CorridorPart.ReachableSide.RIGHT;
-	return CorridorPart.ReachableSide.ALL;
-    }
-    
-    
+        if (val == "all")
+            return CorridorPart.ReachableSide.ALL;
+        else if (val == "front")
+            return CorridorPart.ReachableSide.FRONT;
+        else if (val == "back")
+            return CorridorPart.ReachableSide.BACK;
+        else if (val == "left")
+            return CorridorPart.ReachableSide.LEFT;
+        else if (val == "right")
+            return CorridorPart.ReachableSide.RIGHT;
+        return CorridorPart.ReachableSide.ALL;
+    }
+
+
     private String structureTypeToString(IndoorSweeplineModel.Type type)
     {
-	if (type == IndoorSweeplineModel.Type.CORRIDOR)
-	    return "corridor";
-	else if (type == IndoorSweeplineModel.Type.PLATFORM)
-	    return "platform";
-	return "";
-    }
-    
-    
-    private JComboBox structureBox()
-    {
-	JComboBox structureBox = new JComboBox<String>(controller.structures());
-	structureBox.addActionListener(new StructureBoxListener());
-	return structureBox;
-    }
-    
-    
+        if (type == IndoorSweeplineModel.Type.CORRIDOR)
+            return "corridor";
+        else if (type == IndoorSweeplineModel.Type.PLATFORM)
+            return "platform";
+        return "";
+    }
+
+
+    private JComboBox<String> structureBox()
+    {
+        JComboBox<String> structureBox = new JComboBox<>(controller.structures());
+        structureBox.addActionListener(new StructureBoxListener());
+        return structureBox;
+    }
+
+
     private IndoorSweeplineController controller;
-    
+
     private int beamIndex;
     private int leftRightCount;
@@ -275,317 +278,330 @@
     private NextAction next;
     boolean inRefresh;
-    
-    
-    private JComboBox typeBox()
-    {
-	if (typeBoxModel == null)
-	{
-	    typeBoxModel = new DefaultComboBoxModel<String>();
-	    typeBoxModel.addElement("corridor");
-	    typeBoxModel.addElement("platform");
-	}
-	JComboBox typeBox = new JComboBox<String>(typeBoxModel);
-	typeBox.addActionListener(new TypeBoxListener());
-	return typeBox;
-    }
-    
+
+
+    private JComboBox<String> typeBox()
+    {
+        if (typeBoxModel == null)
+        {
+            typeBoxModel = new DefaultComboBoxModel<>();
+            typeBoxModel.addElement("corridor");
+            typeBoxModel.addElement("platform");
+        }
+        JComboBox<String> typeBox = new JComboBox<>(typeBoxModel);
+        typeBox.addActionListener(new TypeBoxListener());
+        return typeBox;
+    }
+
     private DefaultComboBoxModel<String> typeBoxModel;
-    
-    
+
+
     private class TypeBoxListener implements ActionListener
     {
-	public void actionPerformed(ActionEvent e)
-	{
-	    if (inRefresh)
-		return;
-		
-	    String entry = (String)((JComboBox)e.getSource()).getSelectedItem();
-	    if (entry == "corridor")
-		controller.setType(IndoorSweeplineModel.Type.CORRIDOR);
-	    else
-		controller.setType(IndoorSweeplineModel.Type.PLATFORM);
-		
-	    refresh();
-	}
-    }
-    
-    
+        @Override
+        public void actionPerformed(ActionEvent e)
+        {
+            if (inRefresh)
+                return;
+
+            @SuppressWarnings("unchecked")
+            String entry = (String)((JComboBox<String>)e.getSource()).getSelectedItem();
+            if (entry == "corridor")
+                controller.setType(IndoorSweeplineModel.Type.CORRIDOR);
+            else
+                controller.setType(IndoorSweeplineModel.Type.PLATFORM);
+
+            refresh();
+        }
+    }
+
+
     private class PrevAction extends AbstractAction
     {
-	public PrevAction()
-	{
-	    super("Prev");
-	}
-    
-	public void actionPerformed(ActionEvent e)
-	{
-	    if (inRefresh)
-		return;
-		
-	    if (beamIndex > 0)
-		--beamIndex;
-	    refresh();
-	}
-    }
-    
-    
+        public PrevAction()
+        {
+            super("Prev");
+        }
+
+        @Override
+        public void actionPerformed(ActionEvent e)
+        {
+            if (inRefresh)
+                return;
+
+            if (beamIndex > 0)
+                --beamIndex;
+            refresh();
+        }
+    }
+
+
     private class NextAction extends AbstractAction
     {
-	public NextAction()
-	{
-	    super("Next");
-	}
-    
-	public void actionPerformed(ActionEvent e)
-	{
-	    if (inRefresh)
-		return;
-		
-	    ++beamIndex;
-	    if (beamIndex >= leftRightCount)
-		controller.addRightStructure();
-	    refresh();
-	}
-    }
-    
-    
+        public NextAction()
+        {
+            super("Next");
+        }
+
+        @Override
+        public void actionPerformed(ActionEvent e)
+        {
+            if (inRefresh)
+                return;
+
+            ++beamIndex;
+            if (beamIndex >= leftRightCount)
+                controller.addRightStructure();
+            refresh();
+        }
+    }
+
+
     private class StructureBoxListener implements ActionListener
     {
-	public void actionPerformed(ActionEvent e)
-	{
-	    if (inRefresh)
-		return;
-		
-	    String entry = (String)((JComboBox)e.getSource()).getSelectedItem();
-	    DefaultComboBoxModel<String> structureBoxModel = controller.structures();
-	    for (int i = 0; i < structureBoxModel.getSize(); ++i)
-	    {
-		if (structureBoxModel.getElementAt(i).equals(entry))
-		    beamIndex = i;
-	    }
-	    refresh();
-	}
-    }
-    
-    
+        @Override
+        public void actionPerformed(ActionEvent e)
+        {
+            if (inRefresh)
+                return;
+
+            @SuppressWarnings("unchecked")
+            String entry = (String)((JComboBox<String>)e.getSource()).getSelectedItem();
+            DefaultComboBoxModel<String> structureBoxModel = controller.structures();
+            for (int i = 0; i < structureBoxModel.getSize(); ++i)
+            {
+                if (structureBoxModel.getElementAt(i).equals(entry))
+                    beamIndex = i;
+            }
+            refresh();
+        }
+    }
+
+
     private JLabel widthOffsetLabel;
-    
+
     private JLabel makeWidthLabel()
     {
-	widthOffsetLabel = new JLabel(tr("Offset into background:"));
-	return widthOffsetLabel;
-    }
-    
-    
+        widthOffsetLabel = new JLabel(tr("Offset into background:"));
+        return widthOffsetLabel;
+    }
+
+
     private JTextField stripWidth;
-    
+
     private JTextField makeWidthField()
     {
-	stripWidth = new JTextField(5);
-	stripWidth.getDocument().addDocumentListener(new StripWidthListener());
-	return stripWidth;
-    }
-    
-    
+        stripWidth = new JTextField(5);
+        stripWidth.getDocument().addDocumentListener(new StripWidthListener());
+        return stripWidth;
+    }
+
+
     private class StripWidthListener implements DocumentListener
     {
-	public void changedUpdate(DocumentEvent e)
-	{
-	    update(e);
-	}
-	
-	public void insertUpdate(DocumentEvent e)
-	{
-	    update(e);
-	}
-	
-	public void removeUpdate(DocumentEvent e)
-	{
-	    update(e);
-	}
-	
-	
-	private void update(DocumentEvent e)
-	{
-	    if (inRefresh)
-		return;
-	    
-	    try
-	    {
-		if (beamIndex % 2 == 0)
-		    controller.setBeamOffset(beamIndex, Double.parseDouble(stripWidth.getText()));
-		else
-		    controller.setStripWidth(beamIndex, Double.parseDouble(stripWidth.getText()));
-	    }
-	    catch (NumberFormatException ex)
-	    {
-	    }
-	    
-	    refresh();
-	}
-    }
-
-    
+        @Override
+        public void changedUpdate(DocumentEvent e)
+        {
+            update(e);
+        }
+
+        @Override
+        public void insertUpdate(DocumentEvent e)
+        {
+            update(e);
+        }
+
+        @Override
+        public void removeUpdate(DocumentEvent e)
+        {
+            update(e);
+        }
+
+
+        private void update(DocumentEvent e)
+        {
+            if (inRefresh)
+                return;
+
+            try
+            {
+                if (beamIndex % 2 == 0)
+                    controller.setBeamOffset(beamIndex, Double.parseDouble(stripWidth.getText()));
+                else
+                    controller.setStripWidth(beamIndex, Double.parseDouble(stripWidth.getText()));
+            }
+            catch (NumberFormatException ex)
+            {
+            }
+
+            refresh();
+        }
+    }
+
+
     private JTextField level;
-    
+
     private JTextField makeLevelField()
     {
-	level = new JTextField(5);
-	level.getDocument().addDocumentListener(new LevelFieldListener());
-	return level;
-    }
-    
-    
+        level = new JTextField(5);
+        level.getDocument().addDocumentListener(new LevelFieldListener());
+        return level;
+    }
+
+
     private class LevelFieldListener implements DocumentListener
     {
-	public void changedUpdate(DocumentEvent e)
-	{
-	    update(e);
-	}
-	
-	public void insertUpdate(DocumentEvent e)
-	{
-	    update(e);
-	}
-	
-	public void removeUpdate(DocumentEvent e)
-	{
-	    update(e);
-	}
-	
-	
-	private void update(DocumentEvent e)
-	{
-	    if (inRefresh)
-		return;
-	    
-	    controller.setLevel(level.getText());
-	    
-	    refresh();
-	}
-    }
-
-    
+        @Override
+        public void changedUpdate(DocumentEvent e)
+        {
+            update(e);
+        }
+
+        @Override
+        public void insertUpdate(DocumentEvent e)
+        {
+            update(e);
+        }
+
+        @Override
+        public void removeUpdate(DocumentEvent e)
+        {
+            update(e);
+        }
+
+
+        private void update(DocumentEvent e)
+        {
+            if (inRefresh)
+                return;
+
+            controller.setLevel(level.getText());
+
+            refresh();
+        }
+    }
+
+
     private class StructureTableModel extends DefaultTableModel
     {
-	@Override
-	public boolean isCellEditable(int row, int column)
-	{
-	    return isBeam || column == 1;
-	}
-	
-	public boolean isBeam;
-    }
-    
+        @Override
+        public boolean isCellEditable(int row, int column)
+        {
+            return isBeam || column == 1;
+        }
+
+        public boolean isBeam;
+    }
+
     private StructureTableModel structureTableModel;
-    
+
     private JScrollPane makeStructureTable()
     {
-	structureTableModel = new StructureTableModel();	
-	structureTableModel.addColumn("Width");
-	structureTableModel.addColumn("Type");
-	structureTableModel.addColumn("Reachable Side");
-	structureTableModel.addTableModelListener(new StructureTableListener());
-	
-	JTable table = new JTable(structureTableModel);
-	
-	TableColumn column = table.getColumnModel().getColumn(1);
-	JComboBox<String> comboBox = new JComboBox<String>();
-	comboBox.addItem("void");
-	comboBox.addItem("passage");
-	comboBox.addItem("wall");
-	comboBox.addItem("stairs to upper level");
-	comboBox.addItem("stairs to lower level");
-	comboBox.addItem("escalator leaving to upper level");
-	comboBox.addItem("escalator arriving from upper level");
-	comboBox.addItem("escalator (reversible) to upper level");
-	comboBox.addItem("escalator leaving to lower level");
-	comboBox.addItem("escalator arriving from lower level");
-	comboBox.addItem("escalator (reversible) to lower level");
-	comboBox.addItem("elevator");
-	column.setCellEditor(new DefaultCellEditor(comboBox));
-
-	column = table.getColumnModel().getColumn(2);
-	comboBox = new JComboBox<String>();
-	comboBox.addItem("all");
-	comboBox.addItem("left");
-	comboBox.addItem("right");
-	column.setCellEditor(new DefaultCellEditor(comboBox));
-
-	return new JScrollPane(table);
-    }
-    
+        structureTableModel = new StructureTableModel();
+        structureTableModel.addColumn("Width");
+        structureTableModel.addColumn("Type");
+        structureTableModel.addColumn("Reachable Side");
+        structureTableModel.addTableModelListener(new StructureTableListener());
+
+        JTable table = new JTable(structureTableModel);
+
+        TableColumn column = table.getColumnModel().getColumn(1);
+        JComboBox<String> comboBox = new JComboBox<>();
+        comboBox.addItem("void");
+        comboBox.addItem("passage");
+        comboBox.addItem("wall");
+        comboBox.addItem("stairs to upper level");
+        comboBox.addItem("stairs to lower level");
+        comboBox.addItem("escalator leaving to upper level");
+        comboBox.addItem("escalator arriving from upper level");
+        comboBox.addItem("escalator (reversible) to upper level");
+        comboBox.addItem("escalator leaving to lower level");
+        comboBox.addItem("escalator arriving from lower level");
+        comboBox.addItem("escalator (reversible) to lower level");
+        comboBox.addItem("elevator");
+        column.setCellEditor(new DefaultCellEditor(comboBox));
+
+        column = table.getColumnModel().getColumn(2);
+        comboBox = new JComboBox<>();
+        comboBox.addItem("all");
+        comboBox.addItem("left");
+        comboBox.addItem("right");
+        column.setCellEditor(new DefaultCellEditor(comboBox));
+
+        return new JScrollPane(table);
+    }
+
     private class StructureTableListener implements TableModelListener
     {
-	public void tableChanged(TableModelEvent e)
-	{
-	    if (inRefresh)
-		return;
-	    
-	    int column = e.getColumn();
-	    int row = e.getFirstRow();
-	    if (column == 0 && beamIndex % 2 == 0)
-	    {
-		try
-		{
-		    if (row == 0 || row == structureTableModel.getRowCount() - 1)
-			controller.addCorridorPart(beamIndex, row != 0,
-			    Double.parseDouble(((TableModel)e.getSource()).getValueAt(row, column).toString()));
-		    else
-			controller.setCorridorPartWidth(beamIndex, row - 1,
-			    Double.parseDouble(((TableModel)e.getSource()).getValueAt(row, column).toString()));
-		}
-		catch (NumberFormatException ex)
-		{
-		}
-	    }
-	    else if (column == 1 && beamIndex % 2 == 0)
-	    {
-		if (row > 0 && row < structureTableModel.getRowCount() - 1)
-		    controller.setCorridorPartType(beamIndex, row - 1,
-			parseCorridorPartType(((TableModel)e.getSource()).getValueAt(row, column).toString()));
-	    }
-	    else if (column == 1 && beamIndex % 2 == 1)
-	    {
-		controller.setCorridorPartType(beamIndex, row,
-		    parseCorridorPartType(((TableModel)e.getSource()).getValueAt(row, column).toString()));
-	    }
-	    else if (column == 2 && beamIndex % 2 == 0)
-	    {
-		if (row > 0 && row < structureTableModel.getRowCount() - 1)
-		    controller.setCorridorPartSide(beamIndex, row - 1,
-			parseCorridorPartSide(((TableModel)e.getSource()).getValueAt(row, column).toString()));
-	    }
-	    
-	    refresh();
-	}
-    }
-    
-    
+        @Override
+        public void tableChanged(TableModelEvent e)
+        {
+            if (inRefresh)
+                return;
+
+            int column = e.getColumn();
+            int row = e.getFirstRow();
+            if (column == 0 && beamIndex % 2 == 0)
+            {
+                try
+                {
+                    if (row == 0 || row == structureTableModel.getRowCount() - 1)
+                        controller.addCorridorPart(beamIndex, row != 0,
+                        Double.parseDouble(((TableModel)e.getSource()).getValueAt(row, column).toString()));
+                    else
+                        controller.setCorridorPartWidth(beamIndex, row - 1,
+                                Double.parseDouble(((TableModel)e.getSource()).getValueAt(row, column).toString()));
+                }
+                catch (NumberFormatException ex)
+                {
+                }
+            }
+            else if (column == 1 && beamIndex % 2 == 0)
+            {
+                if (row > 0 && row < structureTableModel.getRowCount() - 1)
+                    controller.setCorridorPartType(beamIndex, row - 1,
+                            parseCorridorPartType(((TableModel)e.getSource()).getValueAt(row, column).toString()));
+            }
+            else if (column == 1 && beamIndex % 2 == 1)
+            {
+                controller.setCorridorPartType(beamIndex, row,
+                        parseCorridorPartType(((TableModel)e.getSource()).getValueAt(row, column).toString()));
+            }
+            else if (column == 2 && beamIndex % 2 == 0)
+            {
+                if (row > 0 && row < structureTableModel.getRowCount() - 1)
+                    controller.setCorridorPartSide(beamIndex, row - 1,
+                            parseCorridorPartSide(((TableModel)e.getSource()).getValueAt(row, column).toString()));
+            }
+
+            refresh();
+        }
+    }
+
+
     private class GridbagPanel extends JPanel
     {
-	public GridbagPanel()
-	{
-	    gridbag = new GridBagLayout();
-	    layoutCons = new GridBagConstraints();
-	    setLayout(gridbag);
-	}
-	
-	public void add(Component comp, int gridx, int gridy, int gridwidth, int gridheight)
-	{
-	    layoutCons.gridx = gridx;
-	    layoutCons.gridy = gridy;
-	    layoutCons.gridwidth = gridwidth;
-	    layoutCons.gridheight = gridheight;
-	    layoutCons.weightx = 0.0;
-	    layoutCons.weighty = 0.0;
-	    layoutCons.fill = GridBagConstraints.BOTH;
-	
-	    gridbag.setConstraints(comp, layoutCons);
-	    add(comp);
-	}
-	
-	private GridBagLayout gridbag;
-	private GridBagConstraints layoutCons;
+        public GridbagPanel()
+        {
+            gridbag = new GridBagLayout();
+            layoutCons = new GridBagConstraints();
+            setLayout(gridbag);
+        }
+
+        public void add(Component comp, int gridx, int gridy, int gridwidth, int gridheight)
+        {
+            layoutCons.gridx = gridx;
+            layoutCons.gridy = gridy;
+            layoutCons.gridwidth = gridwidth;
+            layoutCons.gridheight = gridheight;
+            layoutCons.weightx = 0.0;
+            layoutCons.weighty = 0.0;
+            layoutCons.fill = GridBagConstraints.BOTH;
+
+            gridbag.setConstraints(comp, layoutCons);
+            add(comp);
+        }
+
+        private GridBagLayout gridbag;
+        private GridBagConstraints layoutCons;
     }
 }
Index: applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/ModelGeography.java
===================================================================
--- applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/ModelGeography.java	(revision 32478)
+++ applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/ModelGeography.java	(revision 32479)
@@ -3,4 +3,5 @@
 import java.util.List;
 import java.util.Vector;
+
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -16,238 +17,238 @@
     public ModelGeography(DataSet dataSet, LatLon center)
     {
-	beamsGeography = new Vector<BeamGeography>();
-	
-	this.dataSet = dataSet;
-	this.center = center;
-    
-	wayPool = new Vector<Way>();
-	wayPoolCount = 0;
-	nodePool = new Vector<Node>();
-	nodePoolCount = 0;
-	
-	nodes = null;
-	multipolygon = null;
-	members = null;
-    }
-    
+        beamsGeography = new Vector<>();
+
+        this.dataSet = dataSet;
+        this.center = center;
+
+        wayPool = new Vector<>();
+        wayPoolCount = 0;
+        nodePool = new Vector<>();
+        nodePoolCount = 0;
+
+        nodes = null;
+        multipolygon = null;
+        members = null;
+    }
+
 
     private Vector<BeamGeography> beamsGeography;
-    
+
     private DataSet dataSet;
     private LatLon center;
-    
+
     private Vector<Way> wayPool;
     private int wayPoolCount;
     private Vector<Node> nodePool;
     private int nodePoolCount;
-    
+
     private Vector<Node> nodes;
     private Relation multipolygon;
     private Vector<RelationMember> members;
 
-    
+
     public void appendNode(Node node)
     {
-	nodes.add(node);
-    }
-    
-    
+        nodes.add(node);
+    }
+
+
     public DataSet getDataSet()
     {
-	return dataSet;
-    }
-    
-    
+        return dataSet;
+    }
+
+
     public BeamGeography beamAt(int i)
     {
-	return beamsGeography.elementAt(i);
-    }
-
-    
+        return beamsGeography.elementAt(i);
+    }
+
+
     public void startGeographyBuild(Vector<Beam> beams, Vector<Strip> strips)
     {
-	if (beamsGeography.size() < beams.size())
-	    beamsGeography.setSize(beams.size());
-	
-	double offset = 0;	
-	for (int i = 0; i < beams.size(); ++i)
-	{
-	    if (beamsGeography.elementAt(i) == null)
-		beamsGeography.setElementAt(new BeamGeography(dataSet, this), i);
-	    beamsGeography.elementAt(i).adjustNodes(new LatLon(center.lat(), addMetersToLon(center, offset)),
-		beams.elementAt(i).getBeamParts(), beams.elementAt(i).getBeamOffset());
-		
-	    if (i < strips.size())
-		offset += strips.elementAt(i).width;
-	}
-	
-	nodePoolCount = 0;
-	wayPoolCount = 0;
-	
-	members = new Vector<RelationMember>();
-	if (multipolygon != null)
-	    multipolygon.setMembers(members);
-    }
-    
-    
+        if (beamsGeography.size() < beams.size())
+            beamsGeography.setSize(beams.size());
+
+        double offset = 0;
+        for (int i = 0; i < beams.size(); ++i)
+        {
+            if (beamsGeography.elementAt(i) == null)
+                beamsGeography.setElementAt(new BeamGeography(dataSet, this), i);
+            beamsGeography.elementAt(i).adjustNodes(new LatLon(center.lat(), addMetersToLon(center, offset)),
+                    beams.elementAt(i).getBeamParts(), beams.elementAt(i).getBeamOffset());
+
+            if (i < strips.size())
+                offset += strips.elementAt(i).width;
+        }
+
+        nodePoolCount = 0;
+        wayPoolCount = 0;
+
+        members = new Vector<>();
+        if (multipolygon != null)
+            multipolygon.setMembers(members);
+    }
+
+
     public void startWay()
     {
-	nodes = new Vector<Node>();
-    }
-    
-    
+        nodes = new Vector<>();
+    }
+
+
     public void finishWay(Strip strip, int partIndex, boolean isOuter, String level)
     {
-	if (nodes.size() > 0)
-	{
-	    CorridorPart part = strip.partAt(partIndex);
-	    strip.geographyAt(partIndex).appendNodes(part.getType(), part.getSide(), level,
-		nodes.elementAt(nodes.size()-1).getCoor(), nodes.elementAt(0).getCoor(), this);
-	    nodes.add(nodes.elementAt(0));
-	}
-	assignNds(nodes);
-	members.add(new RelationMember(isOuter ? "outer" : "inner", wayPool.elementAt(wayPoolCount)));
-	++wayPoolCount;
-    }
-    
-    
+        if (nodes.size() > 0)
+        {
+            CorridorPart part = strip.partAt(partIndex);
+            strip.geographyAt(partIndex).appendNodes(part.getType(), part.getSide(), level,
+                    nodes.elementAt(nodes.size()-1).getCoor(), nodes.elementAt(0).getCoor(), this);
+            nodes.add(nodes.elementAt(0));
+        }
+        assignNds(nodes);
+        members.add(new RelationMember(isOuter ? "outer" : "inner", wayPool.elementAt(wayPoolCount)));
+        ++wayPoolCount;
+    }
+
+
     public void appendCorridorPart(CorridorPart part, CorridorGeography partGeography, int beamIndex, int partIndex,
-	String level)
-    {
-	if (nodes.size() > 0)
-	    partGeography.appendNodes(part.getType(), part.getSide(), level,
-		nodes.elementAt(nodes.size()-1).getCoor(),
-		beamsGeography.elementAt(beamIndex).coorAt(partIndex), this);
-    }
-    
-    
+            String level)
+    {
+        if (nodes.size() > 0)
+            partGeography.appendNodes(part.getType(), part.getSide(), level,
+                    nodes.elementAt(nodes.size()-1).getCoor(),
+                    beamsGeography.elementAt(beamIndex).coorAt(partIndex), this);
+    }
+
+
     public void appendUturnNode(Strip strip, int partIndex, int stripIndex, int beamNodeIndex, boolean toTheLeft,
-	String level)
-    {
-	if (toTheLeft)
-	    assignCoor(addMeterOffset(beamsGeography.elementAt(stripIndex + 1).coorAt(beamNodeIndex),
-		0, -strip.width / 2.));
-	else
-	    assignCoor(addMeterOffset(beamsGeography.elementAt(stripIndex).coorAt(beamNodeIndex),
-		0, strip.width / 2.));
-	
-	if (nodes.size() > 0)
-	{
-	    CorridorPart part = strip.partAt(partIndex);
-	    strip.geographyAt(partIndex).appendNodes(part.getType(), part.getSide(), level,
-		nodes.elementAt(nodes.size()-1).getCoor(), nodePool.elementAt(nodePoolCount).getCoor(), this);
-	}
-	nodes.add(nodePool.elementAt(nodePoolCount));
-	++nodePoolCount;
-    }
-    
-    
+            String level)
+    {
+        if (toTheLeft)
+            assignCoor(addMeterOffset(beamsGeography.elementAt(stripIndex + 1).coorAt(beamNodeIndex),
+                    0, -strip.width / 2.));
+        else
+            assignCoor(addMeterOffset(beamsGeography.elementAt(stripIndex).coorAt(beamNodeIndex),
+                    0, strip.width / 2.));
+
+        if (nodes.size() > 0)
+        {
+            CorridorPart part = strip.partAt(partIndex);
+            strip.geographyAt(partIndex).appendNodes(part.getType(), part.getSide(), level,
+                    nodes.elementAt(nodes.size()-1).getCoor(), nodePool.elementAt(nodePoolCount).getCoor(), this);
+        }
+        nodes.add(nodePool.elementAt(nodePoolCount));
+        ++nodePoolCount;
+    }
+
+
     public void finishGeographyBuild(IndoorSweeplineModel.Type type, String level)
     {
-	for (int i = nodePoolCount; i < nodePool.size(); ++i)
-	    nodePool.elementAt(i).setDeleted(true);
-	nodePool.setSize(nodePoolCount);
-	
-	for (int i = wayPoolCount; i < wayPool.size(); ++i)
-	    wayPool.elementAt(i).setDeleted(true);
-	wayPool.setSize(wayPoolCount);
-	
-	adjustMultipolygonRelation(type, level);
-    }
-    
-    
+        for (int i = nodePoolCount; i < nodePool.size(); ++i)
+            nodePool.elementAt(i).setDeleted(true);
+        nodePool.setSize(nodePoolCount);
+
+        for (int i = wayPoolCount; i < wayPool.size(); ++i)
+            wayPool.elementAt(i).setDeleted(true);
+        wayPool.setSize(wayPoolCount);
+
+        adjustMultipolygonRelation(type, level);
+    }
+
+
     private static LatLon addMeterOffset(LatLon latLon, double south, double east)
     {
-	double scale = Math.cos(latLon.lat() * (Math.PI/180.));
-	return new LatLon(latLon.lat() - south *(360./4e7), latLon.lon() + east / scale *(360./4e7));
-    }
-
-    
+        double scale = Math.cos(latLon.lat() * (Math.PI/180.));
+        return new LatLon(latLon.lat() - south *(360./4e7), latLon.lon() + east / scale *(360./4e7));
+    }
+
+
     private static double addMetersToLon(LatLon latLon, double east)
     {
-	double scale = Math.cos(latLon.lat() * (Math.PI/180.));
-	return latLon.lon() + east / scale *(360./4e7);
-    }
-
-    
+        double scale = Math.cos(latLon.lat() * (Math.PI/180.));
+        return latLon.lon() + east / scale *(360./4e7);
+    }
+
+
     private void assignCoor(LatLon latLon)
     {
-	if (nodePoolCount < nodePool.size())
-	    nodePool.elementAt(nodePoolCount).setCoor(latLon);
-	else
-	{
-	    Node node = new Node(latLon);
-	    dataSet.addPrimitive(node);
-	    nodePool.add(node);
-	}
-    }
-    
-    
+        if (nodePoolCount < nodePool.size())
+            nodePool.elementAt(nodePoolCount).setCoor(latLon);
+        else
+        {
+            Node node = new Node(latLon);
+            dataSet.addPrimitive(node);
+            nodePool.add(node);
+        }
+    }
+
+
     private void assignNds(List<Node> nodes)
     {
-	if (wayPoolCount < wayPool.size())
-	    wayPool.elementAt(wayPoolCount).setNodes(nodes);
-	else
-	{
-	    Way way = new Way();
-	    way.setNodes(nodes);
-	    dataSet.addPrimitive(way);
-	    wayPool.add(way);
-	}
-    }
-    
-    
+        if (wayPoolCount < wayPool.size())
+            wayPool.elementAt(wayPoolCount).setNodes(nodes);
+        else
+        {
+            Way way = new Way();
+            way.setNodes(nodes);
+            dataSet.addPrimitive(way);
+            wayPool.add(way);
+        }
+    }
+
+
     private static void addPolygonTags(IndoorSweeplineModel.Type type, String level, OsmPrimitive obj)
     {
-	if (type == IndoorSweeplineModel.Type.PLATFORM)
-	{
-	    obj.put("railway", "platform");
-	    obj.put("public_transport", "platform");
-	    obj.put("area", "yes");
-	    obj.put("level", level);
-	}
-	else
-	{
-	    obj.put("highway", "pedestrian");
-	    obj.put("indoor", "corridor");
-	    obj.put("area", "yes");
-	    obj.put("level", level);
-	}
-    }
-    
-    
+        if (type == IndoorSweeplineModel.Type.PLATFORM)
+        {
+            obj.put("railway", "platform");
+            obj.put("public_transport", "platform");
+            obj.put("area", "yes");
+            obj.put("level", level);
+        }
+        else
+        {
+            obj.put("highway", "pedestrian");
+            obj.put("indoor", "corridor");
+            obj.put("area", "yes");
+            obj.put("level", level);
+        }
+    }
+
+
     private void adjustMultipolygonRelation(IndoorSweeplineModel.Type type, String level)
     {
-	if (members.size() > 1)
-	{
-	    if (wayPool.size() > 0)
-		wayPool.elementAt(0).removeAll();
-	    
-	    if (multipolygon == null)
-	    {
-		multipolygon = new Relation();
-		dataSet.addPrimitive(multipolygon);		
-	    }
-	    
-	    multipolygon.removeAll();
-	    multipolygon.put("type", "multipolygon");
-	    addPolygonTags(type, level, multipolygon);
-	    
-	    multipolygon.setMembers(members);
-	}
-	else
-	{
-	    if (multipolygon != null)
-	    {
-		multipolygon.setDeleted(true);
-		multipolygon = null;
-	    }
-	    
-	    if (wayPool.size() == 1)
-	    {
-		wayPool.elementAt(0).removeAll();
-		addPolygonTags(type, level, wayPool.elementAt(0));
-	    }
-	}
+        if (members.size() > 1)
+        {
+            if (wayPool.size() > 0)
+                wayPool.elementAt(0).removeAll();
+
+            if (multipolygon == null)
+            {
+                multipolygon = new Relation();
+                dataSet.addPrimitive(multipolygon);
+            }
+
+            multipolygon.removeAll();
+            multipolygon.put("type", "multipolygon");
+            addPolygonTags(type, level, multipolygon);
+
+            multipolygon.setMembers(members);
+        }
+        else
+        {
+            if (multipolygon != null)
+            {
+                multipolygon.setDeleted(true);
+                multipolygon = null;
+            }
+
+            if (wayPool.size() == 1)
+            {
+                wayPool.elementAt(0).removeAll();
+                addPolygonTags(type, level, wayPool.elementAt(0));
+            }
+        }
     }
 }
Index: applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/Strip.java
===================================================================
--- applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/Strip.java	(revision 32478)
+++ applications/editors/josm/plugins/indoor_sweepline/src/indoor_sweepline/Strip.java	(revision 32479)
@@ -3,4 +3,5 @@
 
 import java.util.Vector;
+
 import org.openstreetmap.josm.data.osm.DataSet;
 
@@ -10,53 +11,53 @@
     public Strip(DataSet dataSet)
     {
-	width = 10.;
-	parts = new Vector<CorridorPart>();
-	partsGeography = new Vector<CorridorGeography>();
-	lhs = new Vector<Double>();
-	rhs = new Vector<Double>();
-	
-	this.dataSet = dataSet;
+        width = 10.;
+        parts = new Vector<>();
+        partsGeography = new Vector<>();
+        lhs = new Vector<>();
+        rhs = new Vector<>();
+
+        this.dataSet = dataSet;
     }
 
-    
+
     public void setCorridorPartType(int partIndex, CorridorPart.Type type)
     {
-	while (parts.size() <= partIndex)
-	{
-	    parts.add(new CorridorPart(0., CorridorPart.Type.WALL,
-		parts.size() % 2 == 0 ? CorridorPart.ReachableSide.FRONT :
-		CorridorPart.ReachableSide.BACK));
-	    partsGeography.add(new CorridorGeography(dataSet));
-	}
-	parts.elementAt(partIndex).setType(type, CorridorPart.ReachableSide.ALL);
+        while (parts.size() <= partIndex)
+        {
+            parts.add(new CorridorPart(0., CorridorPart.Type.WALL,
+                    parts.size() % 2 == 0 ? CorridorPart.ReachableSide.FRONT :
+                        CorridorPart.ReachableSide.BACK));
+            partsGeography.add(new CorridorGeography(dataSet));
+        }
+        parts.elementAt(partIndex).setType(type, CorridorPart.ReachableSide.ALL);
     }
-    
-    
+
+
     public CorridorPart partAt(int i)
     {
-	while (parts.size() <= i)
-	{
-	    parts.add(new CorridorPart(0., CorridorPart.Type.WALL,
-		parts.size() % 2 == 0 ? CorridorPart.ReachableSide.FRONT :
-		CorridorPart.ReachableSide.BACK));
-	    partsGeography.add(new CorridorGeography(dataSet));
-	}
-	return parts.elementAt(i);
+        while (parts.size() <= i)
+        {
+            parts.add(new CorridorPart(0., CorridorPart.Type.WALL,
+                    parts.size() % 2 == 0 ? CorridorPart.ReachableSide.FRONT :
+                        CorridorPart.ReachableSide.BACK));
+            partsGeography.add(new CorridorGeography(dataSet));
+        }
+        return parts.elementAt(i);
     }
-    
-    
+
+
     public CorridorGeography geographyAt(int i)
     {
-	while (parts.size() <= i)
-	{
-	    parts.add(new CorridorPart(0., CorridorPart.Type.WALL,
-		parts.size() % 2 == 0 ? CorridorPart.ReachableSide.FRONT :
-		CorridorPart.ReachableSide.BACK));
-	    partsGeography.add(new CorridorGeography(dataSet));
-	}
-	return partsGeography.elementAt(i);
+        while (parts.size() <= i)
+        {
+            parts.add(new CorridorPart(0., CorridorPart.Type.WALL,
+                    parts.size() % 2 == 0 ? CorridorPart.ReachableSide.FRONT :
+                        CorridorPart.ReachableSide.BACK));
+            partsGeography.add(new CorridorGeography(dataSet));
+        }
+        return partsGeography.elementAt(i);
     }
-    
-    
+
+
     public double width;
     public Vector<CorridorPart> parts;
@@ -64,5 +65,5 @@
     public Vector<Double> lhs;
     public Vector<Double> rhs;
-    
+
     private DataSet dataSet;
 }
