@@ -0,0 +1,1571 @@
+/*%0A * Copyright 2013-2015 must-be.org%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage consulo.dotnet.sdk;%0A%0Aimport javax.annotation.Nonnull;%0Aimport javax.annotation.Nullable;%0A%0A/**%0A * @author VISTALL%0A * @since 09.03.2015%0A */%0Apublic enum DotNetVersion%0A%7B%0A%09_2_0,%0A%09_3_5,%0A%09_4_0,%0A%09_4_5,%0A%09_4_5_1,%0A%09_4_5_2,%0A%09_4_6,%0A%09_4_6_1,%0A%09_4_6_2,%0A%09_4_7,%0A%09_4_7_1;%0A%0A%09private String myPresentableName;%0A%0A%09DotNetVersion()%0A%09%7B%0A%09%09String name = name();%0A%09%09myPresentableName = name.substring(1, name.length()).replace(%22_%22, %22.%22);%0A%09%7D%0A%0A%09@Nullable%0A%09public static DotNetVersion findVersion(@Nonnull String version, boolean startWith)%0A%09%7B%0A%09%09version = version.charAt(0) == 'v' ? version.substring(1, version.length()) : version;%0A%09%09for(DotNetVersion microsoftDotNetVersion : values())%0A%09%09%7B%0A%09%09%09String presentableName = microsoftDotNetVersion.myPresentableName;%0A%09%09%09if(startWith ? version.startsWith(presentableName) : version.equals(presentableName))%0A%09%09%09%7B%0A%09%09%09%09return microsoftDotNetVersion;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return null;%0A%09%7D%0A%0A%09@Nonnull%0A%09public String getPresentableName()%0A%09%7B%0A%09%09return myPresentableName;%0A%09%7D%0A%7D

move from ms