/*
 * Copyright (c) 2017 Robert 'Bobby' Zenz
 * 
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 */

package org.bonsaimind.arbitrarylines.lines;

import org.eclipse.swt.SWT;

public enum LineStyle {
	SOLID(SWT.LINE_SOLID), DASH(SWT.LINE_DASH), DOT(SWT.LINE_DOT), DASHDOT(SWT.LINE_DASHDOT), DASHDOTDOT(SWT.LINE_DASHDOTDOT);
	
	private static final String[] styleStrings = new String[DASHDOTDOT.ordinal() + 1];
	private final int swtStyle;
	
	static {
		for (LineStyle type : LineStyle.values()) {
			styleStrings[type.ordinal()] = type.toString();
		}
	}
	
	private LineStyle(int swtEquivalent) {
		swtStyle = swtEquivalent;
	}
	
	public static final String[] getStyleStrings() {
		return styleStrings;
	}
	
	public int getSwtStyle() {
		return swtStyle;
	}
}

@@ -393,21 +393,20 @@
 tyle %7B%0A%09
-SOLID
+DASH
 (SWT.LIN
@@ -411,20 +411,22 @@
 INE_
-SOLID
+DASH
 ), DASH
+DOT
 (SWT
@@ -435,19 +435,29 @@
 INE_DASH
+DOT
 ), 
+DASHDOT
 DOT(SWT.
@@ -461,26 +461,29 @@
 WT.LINE_
+DASHDOT
 DOT), 
-DASH
 DOT(SWT.
@@ -491,48 +491,34 @@
 INE_
-DASH
 DOT), 
-DASHDOTDOT(SWT.LINE_DASHDOTDOT
+SOLID(SWT.LINE_SOLID
 );%0A%09
@@ -579,179 +579,136 @@
 ing%5B
-DASHDOTDOT.ordinal() + 1%5D;%0A%09private final int swtStyle;%0A%09%0A%09static %7B%0A%09%09for (LineStyle type : LineStyle.values()) %7B%0A%09%09%09styleStrings%5Btype.ordinal()%5D = type.toString();%0A%09%09%7D%0A%09%7D
+%5D %7B SOLID.toString(), DASH.toString(), DOT.toString(), DASHDOT.toString(), DASHDOTDOT.toString() %7D;%0A%09private final int swtStyle;
 %0A%09%0A%09

Modify so that sort order of literals doesn't matter.