#1658 - ENH: Add label to ProfileLocation and use as default query label

This commit is contained in:
rob bygrave
2019-03-27 09:37:35 +13:00
parent 54534ea7f3
commit fc032c632b
10 changed files with 65 additions and 8 deletions
@@ -15,6 +15,8 @@ class DProfileLocation implements ProfileLocation {
private String shortDescription;
private String label;
private final int lineNumber;
DProfileLocation() {
@@ -42,12 +44,19 @@ class DProfileLocation implements ProfileLocation {
public String obtain() {
// atomic assignment so happy with this
if (location == null) {
location = create();
shortDescription = shortDesc(location);
final String loc = create();
shortDescription = shortDesc(loc);
label = UtilLocation.label(shortDescription);
location = loc;
}
return location;
}
@Override
public String label() {
return label;
}
@Override
public String shortDescription() {
return shortDescription;