Show full URL in request mapping live hover

This commit is contained in:
nsingh
2017-10-25 16:33:09 -07:00
parent cd73747a0e
commit 462e1d71b6
2 changed files with 7 additions and 8 deletions

View File

@@ -160,9 +160,8 @@ public class RequestMappingHoverProvider implements HoverProvider {
String host = method.app.getHost();
String url = UrlUtil.createUrl(host, port, path);
builder.append("Path: ");
builder.append("[");
builder.append(path);
builder.append(url);
builder.append("]");
builder.append("(");
builder.append(url);

View File

@@ -62,7 +62,7 @@ public class RequestMappingLiveHoverTest {
harness.intialize(directory);
Editor editor = harness.newEditorFromFileUri(docUri, LanguageId.JAVA);
editor.assertHoverContains("@RequestMapping(\"/hello-world\")", "Path: [/hello-world](http://cfapps.io:1111/hello-world)\n" +
editor.assertHoverContains("@RequestMapping(\"/hello-world\")", "[http://cfapps.io:1111/hello-world](http://cfapps.io:1111/hello-world)\n" +
"\n" +
"Process ID: 22022\n" +
"\n" +
@@ -94,13 +94,13 @@ public class RequestMappingLiveHoverTest {
harness.intialize(directory);
Editor editor = harness.newEditorFromFileUri(docUri, LanguageId.JAVA);
editor.assertHoverContains("@RequestMapping(\"/hello\")", "Path: [/hello](http://cfapps.io:999/hello)\n" +
editor.assertHoverContains("@RequestMapping(\"/hello\")", "[http://cfapps.io:999/hello](http://cfapps.io:999/hello)\n" +
"\n" +
"Process ID: 76543\n" +
"\n" +
"Process Name: test-request-mapping-live-hover");
editor.assertHoverContains("@RequestMapping(\"/goodbye\")", "Path: [/goodbye](http://cfapps.io:999/goodbye)\n" +
editor.assertHoverContains("@RequestMapping(\"/goodbye\")", "[http://cfapps.io:999/goodbye](http://cfapps.io:999/goodbye)\n" +
"\n" +
"Process ID: 76543\n" +
"\n" +
@@ -179,7 +179,7 @@ public class RequestMappingLiveHoverTest {
harness.intialize(directory);
Editor editor = harness.newEditorFromFileUri(docUri, LanguageId.JAVA);
editor.assertHoverContains("@RequestMapping(\"/hello\")", "Path: [/hello](http://cfapps.io:1000/hello)\n" +
editor.assertHoverContains("@RequestMapping(\"/hello\")", "[http://cfapps.io:1000/hello](http://cfapps.io:1000/hello)\n" +
"\n" +
"Process ID: 70000\n" +
"\n" +
@@ -187,7 +187,7 @@ public class RequestMappingLiveHoverTest {
"\n" +
"---\n" +
"\n" +
"Path: [/hello](http://cfapps.io:1001/hello)\n" +
"[http://cfapps.io:1001/hello](http://cfapps.io:1001/hello)\n" +
"\n" +
"Process ID: 80000\n" +
"\n" +
@@ -195,7 +195,7 @@ public class RequestMappingLiveHoverTest {
"\n" +
"---\n" +
"\n" +
"Path: [/hello](http://cfapps.io:1002/hello)\n" +
"[http://cfapps.io:1002/hello](http://cfapps.io:1002/hello)\n" +
"\n" +
"Process ID: 90000\n" +
"\n" +