~ See the License for the specific language governing permissions and\r
~ limitations under the License.\r
--%>\r
+\r
<%@ include file="/include-internal.jsp"%>\r
<%@ taglib prefix="forms" tagdir="/WEB-INF/tags/forms" %>\r
<%@ taglib prefix="props" tagdir="/WEB-INF/tags/props" %>\r
BS.Util.hide($('customPathContainer'));\r
} else if(selected == "custom") {\r
var val = this.getValue();\r
- $('nugetCustomPath').value = this.isPackage(val) ? "<bs:forJs>${customValue}</bs:forJs>" : val;\r
+ val = this.isPackage(val) ? "<bs:forJs>${customValue}</bs:forJs>" : val;\r
+ $('nugetCustomPath').value = this.isPackage(val) ? "" : val;\r
this.customPathChanged();\r
BS.Util.show($('customPathContainer'));\r
} else {\r
--- /dev/null
+<%--\r
+ ~ Copyright 2000-2011 JetBrains s.r.o.\r
+ ~\r
+ ~ Licensed under the Apache License, Version 2.0 (the "License");\r
+ ~ you may not use this file except in compliance with the License.\r
+ ~ You may obtain a copy of the License at\r
+ ~\r
+ ~ http://www.apache.org/licenses/LICENSE-2.0\r
+ ~\r
+ ~ Unless required by applicable law or agreed to in writing, software\r
+ ~ distributed under the License is distributed on an "AS IS" BASIS,\r
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ ~ See the License for the specific language governing permissions and\r
+ ~ limitations under the License.\r
+ --%>\r
+\r
+<%@ include file="/include-internal.jsp"%>\r
+<%@ taglib prefix="forms" tagdir="/WEB-INF/tags/forms" %>\r
+<%@ taglib prefix="props" tagdir="/WEB-INF/tags/props" %>\r
+<%@ taglib prefix="l" tagdir="/WEB-INF/tags/layout" %>\r
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>\r
+<jsp:useBean id="tool" scope="request" type="java.lang.String"/>\r
+<jsp:useBean id="bundled" scope="request" type="java.lang.Boolean"/>\r
+\r
+<c:choose>\r
+ <c:when test="${bundled}">\r
+ <strong>NuGet (version <c:out value="${tool}"/>)</strong>\r
+ </c:when>\r
+ <c:otherwise>\r
+ <strong><c:out value="${tool}"/></strong>\r
+ </c:otherwise>\r
+</c:choose>\r
final String name = safe(request.getParameter("name"));\r
String value = parseValue(request, "value", name);\r
final Collection<ToolInfo> tools = getTools();\r
- ensureVersion(value, tools);\r
+ final ToolInfo bundledTool = ensureVersion(value, tools);\r
\r
-\r
- ModelAndView mv = new ModelAndView(myDescriptor.getPluginResourcesPath("tool/runnerSettings.jsp"));\r
- mv.getModel().put("name", name);\r
- mv.getModel().put("value", value);\r
- mv.getModel().put("customValue", safe(parseValue(request, "customValue", "nugetCustomPath")));\r
- mv.getModel().put("clazz", safe(request.getParameter("class")));\r
- mv.getModel().put("style", safe(request.getParameter("style")));\r
- mv.getModel().put("items", tools);\r
- mv.getModel().put("settingsUrl", "/admin/serverConfig.html?init=1&tab=" + ServerSettingsTab.TAB_ID);\r
- return mv;\r
+ if (!StringUtil.isEmptyOrSpaces(request.getParameter("view"))) {\r
+ ModelAndView mv = new ModelAndView(myDescriptor.getPluginResourcesPath("tool/runnerSettingsView.jsp"));\r
+ if (bundledTool != null) {\r
+ mv.getModel().put("tool", bundledTool.getVersion());\r
+ mv.getModel().put("bundled", true);\r
+ } else {\r
+ mv.getModel().put("tool", value);\r
+ mv.getModel().put("bundled", false);\r
+ }\r
+ return mv;\r
+ } else {\r
+ ModelAndView mv = new ModelAndView(myDescriptor.getPluginResourcesPath("tool/runnerSettingsEdit.jsp"));\r
+ mv.getModel().put("name", name);\r
+ mv.getModel().put("value", value);\r
+ mv.getModel().put("customValue", safe(parseValue(request, "customValue", "nugetCustomPath")));\r
+ mv.getModel().put("clazz", safe(request.getParameter("class")));\r
+ mv.getModel().put("style", safe(request.getParameter("style")));\r
+ mv.getModel().put("items", tools);\r
+ mv.getModel().put("settingsUrl", "/admin/serverConfig.html?init=1&tab=" + ServerSettingsTab.TAB_ID);\r
+ return mv;\r
+ }\r
}\r
\r
- private void ensureVersion(@NotNull final String version, @NotNull Collection<ToolInfo> actionInfos) {\r
- if (!version.startsWith("?")) return;\r
+ @Nullable\r
+ private ToolInfo ensureVersion(@NotNull final String version, @NotNull Collection<ToolInfo> actionInfos) {\r
+ if (!version.startsWith("?")) return null;\r
for (ToolInfo actionInfo : actionInfos) {\r
- if (actionInfo.getId().equals(version)) return;\r
+ if (actionInfo.getId().equals(version)) return actionInfo;\r
}\r
- actionInfos.add(new ToolInfo(version, "Not Installed: " + version.substring(1)));\r
+ final ToolInfo notInstalled = new ToolInfo(version, "Not Installed: " + version.substring(1));\r
+ actionInfos.add(notInstalled);\r
+ return notInstalled;\r
}\r
\r
@NotNull\r