forked from richfaces/richfaces
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
running dos2unix on all files in repository
- Loading branch information
Lukas Fryc
committed
Jan 22, 2013
1 parent
a657d74
commit 3935398
Showing
1,687 changed files
with
161,071 additions
and
161,071 deletions.
There are no files selected for viewing
50 changes: 25 additions & 25 deletions
50
...d/arquillian/src/main/java/org/richfaces/arquillian/page/source/IgnoreScriptsContent.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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
package org.richfaces.arquillian.page.source; | ||
|
||
import org.custommonkey.xmlunit.Difference; | ||
import org.custommonkey.xmlunit.DifferenceConstants; | ||
import org.custommonkey.xmlunit.DifferenceListener; | ||
import org.w3c.dom.Node; | ||
|
||
/** | ||
* @author akolonitsky | ||
* @since Oct 22, 2010 | ||
*/ | ||
public class IgnoreScriptsContent implements DifferenceListener { | ||
public int differenceFound(Difference difference) { | ||
if (DifferenceConstants.TEXT_VALUE_ID == difference.getId() | ||
&& !"script".equalsIgnoreCase(difference.getTestNodeDetail().getNode().getLocalName())) { | ||
|
||
return RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR; | ||
} | ||
return RETURN_ACCEPT_DIFFERENCE; | ||
} | ||
|
||
public void skippedComparison(Node node, Node node1) { | ||
|
||
} | ||
} | ||
package org.richfaces.arquillian.page.source; | ||
|
||
import org.custommonkey.xmlunit.Difference; | ||
import org.custommonkey.xmlunit.DifferenceConstants; | ||
import org.custommonkey.xmlunit.DifferenceListener; | ||
import org.w3c.dom.Node; | ||
|
||
/** | ||
* @author akolonitsky | ||
* @since Oct 22, 2010 | ||
*/ | ||
public class IgnoreScriptsContent implements DifferenceListener { | ||
public int differenceFound(Difference difference) { | ||
if (DifferenceConstants.TEXT_VALUE_ID == difference.getId() | ||
&& !"script".equalsIgnoreCase(difference.getTestNodeDetail().getNode().getLocalName())) { | ||
|
||
return RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR; | ||
} | ||
return RETURN_ACCEPT_DIFFERENCE; | ||
} | ||
|
||
public void skippedComparison(Node node, Node node1) { | ||
|
||
} | ||
} |
152 changes: 76 additions & 76 deletions
152
build/arquillian/src/main/java/org/richfaces/arquillian/page/source/SourceChecker.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 |
---|---|---|
@@ -1,76 +1,76 @@ | ||
package org.richfaces.arquillian.page.source; | ||
|
||
import static org.junit.Assert.fail; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.io.InputStreamReader; | ||
import java.io.StringReader; | ||
import java.net.URL; | ||
|
||
import org.custommonkey.xmlunit.Diff; | ||
import org.custommonkey.xmlunit.DifferenceListener; | ||
import org.custommonkey.xmlunit.XMLUnit; | ||
import org.jboss.arquillian.core.api.Instance; | ||
import org.jboss.arquillian.core.api.annotation.Inject; | ||
import org.jboss.arquillian.test.spi.TestClass; | ||
import org.openqa.selenium.By; | ||
import org.openqa.selenium.By.ById; | ||
import org.openqa.selenium.By.ByTagName; | ||
import org.xml.sax.SAXException; | ||
|
||
import com.gargoylesoftware.htmlunit.WebClient; | ||
import com.gargoylesoftware.htmlunit.html.DomElement; | ||
import com.gargoylesoftware.htmlunit.html.HtmlPage; | ||
|
||
public class SourceChecker { | ||
|
||
@Inject | ||
private Instance<TestClass> testClass; | ||
|
||
public void checkComponentSource(URL pageName, String xmlunitPage, By pageElementToTest) throws IOException, SAXException { | ||
WebClient client = new WebClient(); | ||
HtmlPage page = client.getPage(pageName); | ||
DomElement element; | ||
|
||
String locator = pageElementToTest.toString(); | ||
locator = locator.substring(locator.indexOf(':') + 1).trim(); | ||
|
||
if (pageElementToTest instanceof ById) { | ||
element = page.getElementById(locator); | ||
} else if (pageElementToTest instanceof ByTagName) { | ||
element = page.getElementsByTagName(locator).get(0); | ||
} else { | ||
throw new IllegalArgumentException("Only id and name are supported"); | ||
} | ||
|
||
String pageCode = element.asXml(); | ||
|
||
checkXmlStructure(xmlunitPage, pageCode); | ||
} | ||
|
||
protected void checkXmlStructure(String xmlunitPage, String pageCode) throws SAXException, IOException { | ||
InputStream expectedPageCode = testClass.get().getJavaClass().getResourceAsStream(xmlunitPage); | ||
|
||
XMLUnit.setNormalizeWhitespace(true); | ||
XMLUnit.setIgnoreDiffBetweenTextAndCDATA(true); | ||
XMLUnit.setIgnoreWhitespace(true); | ||
XMLUnit.setIgnoreComments(true); | ||
|
||
Diff xmlDiff = new Diff(new InputStreamReader(expectedPageCode), new StringReader(pageCode)); | ||
xmlDiff.overrideDifferenceListener(getDifferenceListener()); | ||
|
||
if (!xmlDiff.similar()) { | ||
System.out.println("=== ACTUAL PAGE CODE ==="); | ||
System.out.println(pageCode); | ||
System.out.println("======== ERROR ========="); | ||
System.out.println(xmlDiff.toString()); | ||
System.out.println("========================"); | ||
fail("XML was not similar:" + xmlDiff.toString()); | ||
} | ||
} | ||
|
||
protected DifferenceListener getDifferenceListener() { | ||
return new IgnoreScriptsContent(); | ||
} | ||
} | ||
package org.richfaces.arquillian.page.source; | ||
|
||
import static org.junit.Assert.fail; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.io.InputStreamReader; | ||
import java.io.StringReader; | ||
import java.net.URL; | ||
|
||
import org.custommonkey.xmlunit.Diff; | ||
import org.custommonkey.xmlunit.DifferenceListener; | ||
import org.custommonkey.xmlunit.XMLUnit; | ||
import org.jboss.arquillian.core.api.Instance; | ||
import org.jboss.arquillian.core.api.annotation.Inject; | ||
import org.jboss.arquillian.test.spi.TestClass; | ||
import org.openqa.selenium.By; | ||
import org.openqa.selenium.By.ById; | ||
import org.openqa.selenium.By.ByTagName; | ||
import org.xml.sax.SAXException; | ||
|
||
import com.gargoylesoftware.htmlunit.WebClient; | ||
import com.gargoylesoftware.htmlunit.html.DomElement; | ||
import com.gargoylesoftware.htmlunit.html.HtmlPage; | ||
|
||
public class SourceChecker { | ||
|
||
@Inject | ||
private Instance<TestClass> testClass; | ||
|
||
public void checkComponentSource(URL pageName, String xmlunitPage, By pageElementToTest) throws IOException, SAXException { | ||
WebClient client = new WebClient(); | ||
HtmlPage page = client.getPage(pageName); | ||
DomElement element; | ||
|
||
String locator = pageElementToTest.toString(); | ||
locator = locator.substring(locator.indexOf(':') + 1).trim(); | ||
|
||
if (pageElementToTest instanceof ById) { | ||
element = page.getElementById(locator); | ||
} else if (pageElementToTest instanceof ByTagName) { | ||
element = page.getElementsByTagName(locator).get(0); | ||
} else { | ||
throw new IllegalArgumentException("Only id and name are supported"); | ||
} | ||
|
||
String pageCode = element.asXml(); | ||
|
||
checkXmlStructure(xmlunitPage, pageCode); | ||
} | ||
|
||
protected void checkXmlStructure(String xmlunitPage, String pageCode) throws SAXException, IOException { | ||
InputStream expectedPageCode = testClass.get().getJavaClass().getResourceAsStream(xmlunitPage); | ||
|
||
XMLUnit.setNormalizeWhitespace(true); | ||
XMLUnit.setIgnoreDiffBetweenTextAndCDATA(true); | ||
XMLUnit.setIgnoreWhitespace(true); | ||
XMLUnit.setIgnoreComments(true); | ||
|
||
Diff xmlDiff = new Diff(new InputStreamReader(expectedPageCode), new StringReader(pageCode)); | ||
xmlDiff.overrideDifferenceListener(getDifferenceListener()); | ||
|
||
if (!xmlDiff.similar()) { | ||
System.out.println("=== ACTUAL PAGE CODE ==="); | ||
System.out.println(pageCode); | ||
System.out.println("======== ERROR ========="); | ||
System.out.println(xmlDiff.toString()); | ||
System.out.println("========================"); | ||
fail("XML was not similar:" + xmlDiff.toString()); | ||
} | ||
} | ||
|
||
protected DifferenceListener getDifferenceListener() { | ||
return new IgnoreScriptsContent(); | ||
} | ||
} |
18 changes: 9 additions & 9 deletions
18
checkstyle/src/main/resources/richfaces-checkstyle/global-suppressions.xml
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!DOCTYPE suppressions PUBLIC | ||
"-//Puppy Crawl//DTD Suppressions 1.1//EN" | ||
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> | ||
|
||
<suppressions> | ||
<suppress checks="JavadocStyleCheck" /> | ||
|
||
<?xml version="1.0"?> | ||
|
||
<!DOCTYPE suppressions PUBLIC | ||
"-//Puppy Crawl//DTD Suppressions 1.1//EN" | ||
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> | ||
|
||
<suppressions> | ||
<suppress checks="JavadocStyleCheck" /> | ||
|
||
</suppressions> |
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 |
---|---|---|
@@ -1,29 +1,29 @@ | ||
<assembly> | ||
<id>sources</id> | ||
<formats> | ||
<format>dir</format> | ||
</formats> | ||
|
||
<moduleSets> | ||
<moduleSet> | ||
<includeSubModules>true</includeSubModules> | ||
<includes> | ||
<include>org.richfaces.ui.*:*</include> | ||
</includes> | ||
|
||
<sources> | ||
<outputDirectoryMapping>/</outputDirectoryMapping> | ||
<excludeSubModuleDirectories>true</excludeSubModuleDirectories> | ||
<fileSets> | ||
<fileSet> | ||
<directory>src/main/resources/META-INF/resources</directory> | ||
<outputDirectory>/</outputDirectory> | ||
<includes> | ||
<include>*.js</include> | ||
</includes> | ||
</fileSet> | ||
</fileSets> | ||
</sources> | ||
</moduleSet> | ||
</moduleSets> | ||
</assembly> | ||
<assembly> | ||
<id>sources</id> | ||
<formats> | ||
<format>dir</format> | ||
</formats> | ||
|
||
<moduleSets> | ||
<moduleSet> | ||
<includeSubModules>true</includeSubModules> | ||
<includes> | ||
<include>org.richfaces.ui.*:*</include> | ||
</includes> | ||
|
||
<sources> | ||
<outputDirectoryMapping>/</outputDirectoryMapping> | ||
<excludeSubModuleDirectories>true</excludeSubModuleDirectories> | ||
<fileSets> | ||
<fileSet> | ||
<directory>src/main/resources/META-INF/resources</directory> | ||
<outputDirectory>/</outputDirectory> | ||
<includes> | ||
<include>*.js</include> | ||
</includes> | ||
</fileSet> | ||
</fileSets> | ||
</sources> | ||
</moduleSet> | ||
</moduleSets> | ||
</assembly> |
40 changes: 20 additions & 20 deletions
40
components/dist/richfaces-components-ui/src/main/properties/properties.xml
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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<properties> | ||
<window-title>VDL Documentation</window-title> | ||
<doc-title>Tag Library Documentation Generator - Generated Documentation</doc-title> | ||
|
||
<taglibs> | ||
<taglib short-name="a4j"> | ||
<display-name>Ajax4JSF</display-name> | ||
<doc-title>Ajax4JSF VDL Documentation</doc-title> | ||
<path>../../../target/taglibs/META-INF/a4j.taglib.xml</path> | ||
<description>Represents core Ajax functionality, and page wide Ajax controls and utility components.</description> | ||
</taglib> | ||
<taglib short-name="rich"> | ||
<display-name>RichFaces</display-name> | ||
<doc-title>RichFaces VDL Documentation</doc-title> | ||
<path>../../../target/taglibs/META-INF/rich.taglib.xml</path> | ||
<description>Represents self-contained and advanced UI components with out-of-the-box Ajax functionality. | ||
</description> | ||
</taglib> | ||
</taglibs> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<properties> | ||
<window-title>VDL Documentation</window-title> | ||
<doc-title>Tag Library Documentation Generator - Generated Documentation</doc-title> | ||
|
||
<taglibs> | ||
<taglib short-name="a4j"> | ||
<display-name>Ajax4JSF</display-name> | ||
<doc-title>Ajax4JSF VDL Documentation</doc-title> | ||
<path>../../../target/taglibs/META-INF/a4j.taglib.xml</path> | ||
<description>Represents core Ajax functionality, and page wide Ajax controls and utility components.</description> | ||
</taglib> | ||
<taglib short-name="rich"> | ||
<display-name>RichFaces</display-name> | ||
<doc-title>RichFaces VDL Documentation</doc-title> | ||
<path>../../../target/taglibs/META-INF/rich.taglib.xml</path> | ||
<description>Represents self-contained and advanced UI components with out-of-the-box Ajax functionality. | ||
</description> | ||
</taglib> | ||
</taglibs> | ||
</properties> |
Oops, something went wrong.