-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from sebplorenz/trimClassNames#85
Added formatter to trim class names in jqassistant-plugin.xml
- Loading branch information
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
core/plugin/src/main/java/com/buschmais/jqassistant/core/plugin/impl/ClassNameFormatter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.buschmais.jqassistant.core.plugin.impl; | ||
|
||
public class ClassNameFormatter { | ||
|
||
/** | ||
* Trim class names read from xml jqassistant-plugin.xml. | ||
* | ||
* @param value | ||
* @return | ||
*/ | ||
public static String parseClassName(String value) { | ||
return value.trim(); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
core/plugin/src/main/resources/META-INF/bindings/bindings.xjb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jxb:bindings xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
xmlns:jxb="http://java.sun.com/xml/ns/jaxb" version="2.1"> | ||
<jxb:bindings schemaLocation="../xsd/jqassistant-plugin-1.0.xsd"> | ||
<jxb:bindings node="//xs:complexType[@name='ModelType']//xs:element[@name='class']"> | ||
<jxb:property name="class"> | ||
<jxb:baseType> | ||
<jxb:javaType name="java.lang.String" | ||
parseMethod="com.buschmais.jqassistant.core.plugin.impl.ClassNameFormatter.parseClassName" | ||
printMethod="com.buschmais.jqassistant.core.plugin.impl.ClassNameFormatter.parseClassName" /> | ||
</jxb:baseType> | ||
</jxb:property> | ||
</jxb:bindings> | ||
<jxb:bindings node="//xs:complexType[@name='ScannerType']//xs:element[@name='class']"> | ||
<jxb:property> | ||
<jxb:baseType> | ||
<jxb:javaType name="java.lang.String" | ||
parseMethod="com.buschmais.jqassistant.core.plugin.impl.ClassNameFormatter.parseClassName" | ||
printMethod="com.buschmais.jqassistant.core.plugin.impl.ClassNameFormatter.parseClassName" /> | ||
</jxb:baseType> | ||
</jxb:property> | ||
</jxb:bindings> | ||
<jxb:bindings node="//xs:complexType[@name='ReportType']//xs:element[@name='class']"> | ||
<jxb:property> | ||
<jxb:baseType> | ||
<jxb:javaType name="java.lang.String" | ||
parseMethod="com.buschmais.jqassistant.core.plugin.impl.ClassNameFormatter.parseClassName" | ||
printMethod="com.buschmais.jqassistant.core.plugin.impl.ClassNameFormatter.parseClassName" /> | ||
</jxb:baseType> | ||
</jxb:property> | ||
</jxb:bindings> | ||
</jxb:bindings> | ||
</jxb:bindings> |