]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fix poor syntax in search result HMTL generation. 78/4678/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 12 Mar 2021 16:11:08 +0000 (18:11 +0200)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 12 Mar 2021 16:11:08 +0000 (18:11 +0200)
`)`was in wrong place.

gitlab #680

Change-Id: If62e3a4e146b05f26b912db0b245a1bb3cc77193

bundles/org.simantics.workbench.search/src/org/simantics/workbench/search/NameAndTypeRow.java
bundles/org.simantics.workbench.search/src/org/simantics/workbench/search/NameRow.java

index 87a47c33bc6b1e8729839ae0805b2f991a62804f..45fe313fecfe7fd3af1ad9ed560a45d9c2fb38fb 100644 (file)
@@ -53,15 +53,15 @@ public class NameAndTypeRow implements SearchResultRow {
        switch (column) {
        
                case 0:
-                       return "<a class=\"small\" href=\"resource:"+ resource.getResource() +"\"" + (resource.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( resource.getUri() )+"\">")+StringUtil.escape(resource.getName())+"</a>";
+                       return "<a class=\"small\" href=\"resource:"+ resource.getResource() +"\"" + (resource.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( resource.getUri() ))+"\">"+StringUtil.escape(resource.getName())+"</a>";
                case 1:
                        String s = "";
                        for (NamedResource type : principalTypes)
-                        s+="<a class=\"small\" href=\"resource:"+ type.getResource() +"\"" + (type.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( type.getUri() )+"\">")+StringUtil.escape(type.getName())+"</a>";
+                        s+="<a class=\"small\" href=\"resource:"+ type.getResource() +"\"" + (type.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( type.getUri() ))+"\">"+StringUtil.escape(type.getName())+"</a>";
                        return s;
                case 2:
                        if (parent != null)
-                               return "<a class=\"small\" href=\"resource:"+ parent.getResource() +"\"" + (parent.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( parent.getUri() )+"\">")+StringUtil.escape(parent.getName())+"</a>";
+                               return "<a class=\"small\" href=\"resource:"+ parent.getResource() +"\"" + (parent.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( parent.getUri() ))+"\">"+StringUtil.escape(parent.getName())+"</a>";
                        return "";
                default:
                        return "";
index 157d27aa8f4fbd950966d1bc6f499fc6c1b64147..c2fbb9d58e234f5e7fd75b02219e95ec53c30af6 100644 (file)
@@ -39,10 +39,10 @@ public class NameRow implements SearchResultRow {
     public String getContent(int column) {
        switch (column) {
                case 0:
-                       return "<a class=\"small\" href=\"resource:"+ resource.getResource() +"\"" + (resource.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( resource.getUri() )+"\">")+StringUtil.escape(resource.getName())+"</a>";
+                       return "<a class=\"small\" href=\"resource:"+ resource.getResource() +"\"" + (resource.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( resource.getUri() ))+"\">"+StringUtil.escape(resource.getName())+"</a>";
                case 1:
                        if (parent != null)
-                               return "<a class=\"small\" href=\"resource:"+ parent.getResource() +"\"" + (parent.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( parent.getUri() )+"\">")+StringUtil.escape(parent.getName())+"</a>";
+                               return "<a class=\"small\" href=\"resource:"+ parent.getResource() +"\"" + (parent.getUri() == null ? "" : " title=\""+URIStringUtils.unescape( parent.getUri() ))+"\">"+StringUtil.escape(parent.getName())+"</a>";
                        return "";
                default:
                        return "";