You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2014/08/27 00:44:06 UTC
[35/51] [partial] Refactored the PMD Maven build - Adjusted the
directory structure - Fixed a lot of compile problems - Fixed the maven setup
- Made PMD build with Flexmojos 7.1.0 and Apache Flex 4.13.0 - Fixed a few
UnitTests
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/html-template/index.template.html b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/html-template/index.template.html
new file mode 100644
index 0000000..2146ca8
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Adobe Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title>${title}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Initially,
+ don't display flashContent div so it won't show if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: ${bgcolor}; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section ${useBrowserHistory}>
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <!${useBrowserHistory} END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
+ var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+ <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+ var xiSwfUrlStr = "${expressInstallSwf}";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "${bgcolor}";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "${application}";
+ attributes.name = "${application}";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "${swf}.swf", "flashContent",
+ "${width}", "${height}",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/pom.xml b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/pom.xml
new file mode 100644
index 0000000..6df39c6
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/pom.xml
@@ -0,0 +1,186 @@
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>flex-pmd-flex</artifactId>
+ <groupId>org.apache.flex.pmd</groupId>
+ <version>1.3-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>flex-pmd-violations-viewer</artifactId>
+ <packaging>swf</packaging>
+
+ <name>Adobe Flex PMD Violations viewer</name>
+ <description>Adobe Flex PMD Violations viewer</description>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>flex-pmd-flex-lib</artifactId>
+ <version>${project.version}</version>
+ <type>swc</type>
+ </dependency>
+
+ <!-- Cairngorm -->
+ <dependency>
+ <groupId>com.adobe.cairngorm</groupId>
+ <artifactId>cairngorm</artifactId>
+ <version>${cairngorm.version}</version>
+ <type>swc</type>
+ </dependency>
+
+ <!-- flex sdk dependencies -->
+
+ <dependency>
+ <groupId>org.apache.flex</groupId>
+ <artifactId>framework</artifactId>
+ <version>${flex.version}</version>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>com.adobe.flash.framework</groupId>
+ <artifactId>playerglobal</artifactId>
+ <version>${flash-player.version}</version>
+ <type>swc</type>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>flexunit-theme</artifactId>
+ <version>${project.version}</version>
+ <type>swc</type>
+ <scope>theme</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.adobe.cairngorm</groupId>
+ <artifactId>event-source</artifactId>
+ <version>${event-source.version}</version>
+ <type>swc</type>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <sourceDirectory>src/main/flex</sourceDirectory>
+ <testSourceDirectory>src/test/flex</testSourceDirectory>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ </testResource>
+ </testResources>
+
+ <plugins>
+
+ <plugin>
+ <groupId>net.flexmojos.oss</groupId>
+ <artifactId>flexmojos-maven-plugin</artifactId>
+ <version>${flex-mojos-plugin.version}</version>
+ <extensions>true</extensions>
+ <configuration>
+ <targetPlayer>${flash-player.version}.0.0</targetPlayer>
+ <defaultSizeWidth>1000</defaultSizeWidth>
+ <defaultSizeHeight>700</defaultSizeHeight>
+ <useNetwork>false</useNetwork>
+ </configuration>
+ <dependencies>
+ <!-- This handles a bug in maven which causes problems with flex resources -->
+ <dependency>
+ <groupId>net.flexmojos.oss</groupId>
+ <artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
+ <version>${flex-mojos-plugin.version}</version>
+ </dependency>
+ <!-- Without this FM will use the compiler configured in its
+ master pom, which will result in version conflicts -->
+ <dependency>
+ <groupId>org.apache.flex</groupId>
+ <artifactId>compiler</artifactId>
+ <version>${flex.version}</version>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </plugin>
+
+ <plugin>
+ <groupId>net.flexmojos.oss</groupId>
+ <artifactId>flexmojos-maven-plugin</artifactId>
+ <version>${flex-mojos-plugin.version}</version>
+ <extensions>true</extensions>
+ <executions>
+ <execution>
+ <goals>
+ <goal>wrapper</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <templateURI>folder:html-template</templateURI>
+ </configuration>
+ <dependencies>
+ <!-- This handles a bug in maven which causes problems with flex resources -->
+ <dependency>
+ <groupId>net.flexmojos.oss</groupId>
+ <artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
+ <version>${flex-mojos-plugin.version}</version>
+ </dependency>
+ <!-- Without this FM will use the compiler configured in its
+ master pom, which will result in version conflicts -->
+ <dependency>
+ <groupId>org.apache.flex</groupId>
+ <artifactId>compiler</artifactId>
+ <version>${flex.version}</version>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>flexmojos-repository</id>
+ <url>http://repository.sonatype.org/content/groups/flexgroup/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>flexmojos-repository</id>
+ <url>http://repository.sonatype.org/content/groups/flexgroup/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </pluginRepository>
+ </pluginRepositories>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/Main.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/Main.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/Main.mxml
new file mode 100644
index 0000000..5cf62bc
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/Main.mxml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<mx:Application xmlns:control="com.adobe.ac.pmd.control.*"
+ xmlns:local="*"
+ xmlns:mx="http://www.adobe.com/2006/mxml"
+ xmlns:services="com.adobe.ac.pmd.services.*"
+ xmlns:view="com.adobe.ac.pmd.view.*"
+ styleName="flexUnitApplication"
+ horizontalScrollPolicy="off"
+ layout="vertical"
+ minHeight="800"
+ minWidth="1000"
+ verticalScrollPolicy="off"
+ horizontalAlign="center"
+ verticalAlign="top"
+ xmlns:source="com.adobe.ac.pmd.view.source.*">
+
+ <mx:Panel width="100%"
+ height="100%"
+ styleName="mainPanel"
+ >
+
+ <mx:HBox width="100%"
+ horizontalGap="0"
+ paddingRight="10"
+ verticalAlign="bottom"
+ >
+
+ <view:Title styleName="panelTitleStyle"
+ text="PMD Violations viewer"
+ />
+
+ <view:Title styleName="panelTitleSubStyle"
+ text="powered by Adobe Technical Services"
+ buttonMode="true"
+ click="navigateToURL( new URLRequest( 'http://www.adobe.com/consulting/' ) )"
+ mouseChildren="false"
+ useHandCursor="true"
+ />
+
+ <mx:Spacer width="100%"
+ />
+
+ <view:Title styleName="panelTitleSubStyle"
+ text="v{ Version.BUILD_NUMBER } built on { Version.BUILD_DATE } at { Version.BUILD_TIME}"
+ />
+
+ </mx:HBox>
+
+ <mx:HRule width="100%"
+ styleName="flexUnitHRule"
+ />
+
+ <mx:ViewStack id="viewStack"
+ width="100%"
+ height="100%"
+ >
+
+ <view:UploadView id="uploadView"
+ violationsLoaded="viewStack.selectedIndex = 1"
+ />
+
+ <view:ResultsView results="{ uploadView.model.violations }"
+ />
+
+ </mx:ViewStack>
+
+ </mx:Panel>
+
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/TestRunner.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/TestRunner.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/TestRunner.mxml
new file mode 100644
index 0000000..9015a16
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/TestRunner.mxml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<FlexUnitTestRunnerApplication xmlns:flexunit="flexunit.flexui.*"
+ xmlns:mx="http://www.adobe.com/2006/mxml"
+ testSuite="{ new AllTests() }"
+ xmlns="*"
+ />
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/CharacterPosition.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/CharacterPosition.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/CharacterPosition.as
new file mode 100644
index 0000000..3b6e0cd
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/CharacterPosition.as
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package com.adobe.ac.pmd.model
+{
+ public class CharacterPosition
+ {
+ private var _line : int;
+ private var _column : int;
+
+ public function CharacterPosition( line : int, column : int )
+ {
+ _line = line;
+ _column = column;
+ }
+
+ [Bindable("unused")]
+ public function get line() : int
+ {
+ return _line;
+ }
+
+ [Bindable("unused")]
+ public function get column() : int
+ {
+ return _column;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/File.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/File.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/File.as
new file mode 100644
index 0000000..c681a3c
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/File.as
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package com.adobe.ac.pmd.model
+{
+ public class File
+ {
+ private var _path : String;
+
+ public function File( path : String )
+ {
+ _path = path;
+ }
+
+ public function get path() : String
+ {
+ return _path;
+ }
+
+ public function get shortPath() : String
+ {
+ var srcIndex : int = path.indexOf( "src" );
+ var result : String = path;
+
+ if ( srcIndex != -1 )
+ {
+ var regexp : RegExp = new RegExp( "/", "g" );
+ result = path.substr( srcIndex + 4 ).replace( regexp, "." );
+ }
+ return result;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/Violation.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/Violation.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/Violation.as
new file mode 100644
index 0000000..3ca98fe
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/Violation.as
@@ -0,0 +1,82 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package com.adobe.ac.pmd.model
+{
+ public class Violation
+ {
+ private var _position : ViolationPosition;
+ private var _rule : Rule;
+ private var _violatedFile : File;
+
+ public function Violation( begin : CharacterPosition, end : CharacterPosition, violatedFilePath : String )
+ {
+ _position = new ViolationPosition( begin, end );
+ _rule = new Rule();
+ _violatedFile = new File( violatedFilePath );
+ }
+
+ [Bindable("unused")]
+ public function get rule() : Rule
+ {
+ return _rule;
+ }
+
+ [Bindable("unused")]
+ public function get position() : ViolationPosition
+ {
+ return _position;
+ }
+
+ [Bindable("unused")]
+ public function get shortPath() : String
+ {
+ return _violatedFile.shortPath;
+ }
+
+ [Bindable("unused")]
+ public function get filePath() : String
+ {
+ return _violatedFile.path;
+ }
+
+ [Bindable("unused")]
+ public function get shortRuleName() : String
+ {
+ return _rule.shortName;
+ }
+
+ [Bindable("unused")]
+ public function get beginLine() : Number
+ {
+ return _position.begin.line;
+ }
+
+ [Bindable("unused")]
+ public function get message() : String
+ {
+ return _rule.message;
+ }
+
+ [Bindable("unused")]
+ public function get priority() : ViolationPriority
+ {
+ return _rule.priority;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/ViolationPosition.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/ViolationPosition.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/ViolationPosition.as
new file mode 100644
index 0000000..c08fa8e
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/model/ViolationPosition.as
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package com.adobe.ac.pmd.model
+{
+ public class ViolationPosition
+ {
+ private var _begin : CharacterPosition;
+ private var _end : CharacterPosition;
+
+ public function ViolationPosition( begin : CharacterPosition, end : CharacterPosition )
+ {
+ _begin = begin;
+ _end = end;
+ }
+
+ [Bindable("unused")]
+ public function get begin() : CharacterPosition
+ {
+ return _begin;
+ }
+
+ [Bindable("unused")]
+ public function get end() : CharacterPosition
+ {
+ return _end;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/FilterResults.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/FilterResults.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/FilterResults.mxml
new file mode 100644
index 0000000..8037dc5
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/FilterResults.mxml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%"
+ horizontalAlign="center">
+
+ <mx:Script>
+ <![CDATA[
+ import com.adobe.ac.pmd.view.model.ResultsModel;
+ import com.adobe.ac.pmd.view.model.ResultsFilter;
+
+ [Bindable]
+ public var model : ResultsModel;
+ ]]>
+ </mx:Script>
+
+ <mx:FormItem
+ label="Show violation level"
+ >
+
+ <mx:ComboBox id="filter"
+ dataProvider="{ ResultsFilter.VIOLATION_PRIORITIES }"
+ selectedIndex="1"
+ labelField="name"
+ change="model.currentPriorityVisible = filter.selectedItem.level"
+ />
+
+ </mx:FormItem>
+
+ <mx:FormItem
+ label="Group by"
+ >
+
+ <mx:List id="groupBy"
+ allowMultipleSelection="true"
+ dataProvider="{ ResultsFilter.GROUPING_FIELDS }"
+ labelField="name"
+ allowDragSelection="true"
+ rowCount="{ ResultsFilter.GROUPING_FIELDS.length }"
+ selectedIndices="{ model.selectedGoupFieldIndices }"
+ change="model.selectedGroupFields = groupBy.selectedIndices"
+ />
+
+ </mx:FormItem>
+
+ <mx:Button
+ label="Filter"
+ click="model.filter()"
+ />
+
+</mx:HBox>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/ResultsFormatter.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/ResultsFormatter.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/ResultsFormatter.as
new file mode 100644
index 0000000..e8d6520
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/ResultsFormatter.as
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package com.adobe.ac.pmd.view
+{
+ import com.adobe.ac.pmd.model.Violation;
+
+ import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
+
+ public final class ResultsFormatter
+ {
+ public static function formatViolationsNumberOrBeginLine(
+ item : Object, // NO PMD
+ column : AdvancedDataGridColumn ) : String // NO PMD
+ {
+ var violation : Violation = item as Violation;
+ var result : String = "";
+
+ if ( violation )
+ {
+ result = violation.position.begin.line.toString();
+ }
+ return result;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/ResultsView.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/ResultsView.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/ResultsView.mxml
new file mode 100644
index 0000000..51abe8f
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/ResultsView.mxml
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<mx:VBox xmlns:model="com.adobe.ac.pmd.view.model.*"
+ xmlns:mx="http://www.adobe.com/2006/mxml"
+ xmlns:view="com.adobe.ac.pmd.view.*"
+ width="100%"
+ height="100%"
+ horizontalAlign="center"
+ verticalAlign="middle"
+ verticalScrollPolicy="off"
+ >
+
+ <mx:Script>
+ <![CDATA[
+ import com.adobe.ac.pmd.model.Violation;
+ import mx.collections.ArrayCollection;
+
+ public function set results( value : ArrayCollection ) : void
+ {
+ model.violations = value;
+ gc.refresh();
+ }
+
+ private function currentVisibilityChange() : void
+ {
+ gc.refresh();
+ }
+
+ private function groupLabelFunction( item : Object, column : AdvancedDataGridColumn ) : String // NO PMD
+ {
+ var label : String;
+
+ if ( item && item.children )
+ {
+ label = item[ gc.grouping.label ] + " (" + item.children.length + ")";
+ }
+ else
+ {
+ label = item[ column.dataField ];
+ }
+ return label;
+ }
+ ]]>
+ </mx:Script>
+
+ <mx:Resize
+ id="resize"
+ duration="200"
+ />
+
+ <model:ResultsModel id="model"
+ currentVisibilityChange="currentVisibilityChange()"
+ />
+
+ <mx:GroupingCollection id="gc"
+ source="{ model.violations }"
+ grouping="{ model.grouping }"
+ />
+
+ <view:Summary model="{ model }"
+ />
+
+ <mx:HRule width="100%"
+ styleName="flexUnitHRule"
+ />
+
+ <view:FilterResults model="{ model }"
+ />
+
+ <mx:HRule width="100%"
+ styleName="flexUnitHRule"
+ />
+
+ <mx:HBox width="100%"
+ height="100%"
+ >
+
+ <mx:AdvancedDataGrid id="dg"
+ width="100%"
+ height="100%"
+ dataProvider="{ gc }"
+ change="model.selectedViolation = dg.selectedItem as Violation"
+ groupLabelFunction="groupLabelFunction"
+ >
+
+ <mx:columns>
+
+ <mx:AdvancedDataGridColumn dataField="shortPath"
+ headerText=""
+ sortable="false"
+ />
+
+ <mx:AdvancedDataGridColumn width="100"
+ labelFunction="ResultsFormatter.formatViolationsNumberOrBeginLine"
+ dataField="beginLine"
+ headerText="Line"
+ sortable="false"
+ />
+
+ <mx:AdvancedDataGridColumn dataField="message"
+ dataTipField="message"
+ headerText="Message"
+ sortable="false"
+ />
+
+ <mx:AdvancedDataGridColumn width="100"
+ dataField="priority"
+ headerText="Priority"
+ sortable="false"
+ />
+
+ </mx:columns>
+
+ </mx:AdvancedDataGrid>
+
+ <view:SelectedViolation includeInLayout="{ model.selectedViolation != null }"
+ close="model.selectedViolation = null"
+ violation="{ model.selectedViolation }"
+ visible="{ model.selectedViolation != null }"
+ resizeEffect="{ resize }"
+ />
+
+ </mx:HBox>
+
+</mx:VBox>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/SelectedViolation.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/SelectedViolation.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/SelectedViolation.mxml
new file mode 100644
index 0000000..f5e8c2b
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/SelectedViolation.mxml
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<mx:Form xmlns:mx="http://www.adobe.com/2006/mxml"
+ height="100%"
+ paddingBottom="0"
+ paddingLeft="0"
+ paddingRight="10"
+ paddingTop="0"
+ >
+ <mx:Metadata>
+ [Event(name="close", type = "flash.events.Event")]
+ </mx:Metadata>
+
+ <mx:Script>
+ <![CDATA[
+ import com.adobe.ac.pmd.model.Violation;
+
+ public static const CLOSE : String = "close";
+
+ [Bindable]
+ public var violation : Violation;
+ ]]>
+ </mx:Script>
+
+ <mx:HBox verticalAlign="middle"
+ >
+
+ <mx:Button label=">"
+ toolTip="Close panel"
+ click="dispatchEvent( new Event( CLOSE ) )"
+ />
+
+ <mx:Label text="Selected violation"
+ fontWeight="bold"
+ />
+
+ </mx:HBox>
+
+ <mx:FormItem label="RuleName"
+ >
+
+ <mx:Label text="{ violation.rule.shortName }"
+ toolTip="{ violation.rule.name }"
+ />
+
+ </mx:FormItem>
+
+ <mx:FormItem label="RuleSet"
+ >
+
+ <mx:Label text="{ violation.rule.ruleset.name }"
+ />
+
+ </mx:FormItem>
+
+ <mx:FormItem label="Message"
+ >
+
+ <mx:Text width="300"
+ text="{ violation.rule.message }"
+ />
+
+ </mx:FormItem>
+
+ <mx:FormItem label="Priority"
+ >
+
+ <mx:Label text="{ violation.rule.priority.name }"
+ />
+
+ </mx:FormItem>
+
+ <mx:FormItem label="Position"
+ >
+
+ <mx:VBox>
+
+ <mx:Label text="{ violation.shortPath }"
+ toolTip="{ violation.filePath }"
+ />
+
+ <mx:HBox>
+
+ <mx:Label width="50"
+ text=""
+ />
+
+ <mx:Label width="50"
+ text="line"
+ />
+
+ <mx:Label width="50"
+ text="column"
+ />
+
+ </mx:HBox>
+
+ <mx:HBox>
+
+ <mx:Label width="50"
+ text="start"
+ />
+
+ <mx:Label width="50"
+ text="{ violation.position.begin.line }"
+ />
+
+ <mx:Label width="50"
+ text="{ violation.position.begin.column }"
+ />
+
+ </mx:HBox>
+
+ <mx:HBox>
+
+ <mx:Label width="50"
+ text="end"
+ />
+
+ <mx:Label width="50"
+ text="{ violation.position.end.line }"
+ />
+
+ <mx:Label width="50"
+ text="{ violation.position.end.column }"
+ />
+
+ </mx:HBox>
+
+ </mx:VBox>
+
+ </mx:FormItem>
+
+</mx:Form>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/Summary.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/Summary.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/Summary.mxml
new file mode 100644
index 0000000..c7eeefa
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/Summary.mxml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<mx:HBox xmlns:model="com.adobe.ac.pmd.model.*"
+ xmlns:mx="http://www.adobe.com/2006/mxml"
+ >
+
+ <mx:Script>
+ <![CDATA[
+ import com.adobe.ac.pmd.view.model.ResultsModel;
+
+ [Bindable]
+ public var model : ResultsModel;
+ ]]>
+ </mx:Script>
+
+<!-- <mx:HBox>-->
+
+ <mx:FormItem label="Violations #"
+ >
+
+ <mx:Label text="{ model.violationsNumber }"
+ />
+
+ </mx:FormItem>
+
+ <mx:FormItem label="Errors #"
+ >
+
+ <mx:Label text="{ model.errors }"
+ />
+
+ </mx:FormItem>
+
+ <mx:FormItem label="Warnings #"
+ >
+
+ <mx:Label text="{ model.warnings }"
+ />
+
+ </mx:FormItem>
+
+ <mx:FormItem label="Informations #"
+ >
+
+ <mx:Label text="{ model.informations }"
+ />
+
+ </mx:FormItem>
+
+<!-- </mx:Form>-->
+
+</mx:HBox>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/UploadView.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/UploadView.mxml b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/UploadView.mxml
new file mode 100644
index 0000000..0a546b0
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/UploadView.mxml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<mx:VBox xmlns:model="com.adobe.ac.pmd.view.model.*"
+ xmlns:mx="http://www.adobe.com/2006/mxml"
+ xmlns:view="com.adobe.ac.pmd.view.*"
+ width="100%"
+ minHeight="600"
+ bottom="0"
+ horizontalAlign="center"
+ top="0"
+ verticalAlign="middle"
+ creationComplete="model.tryToLoadFromParameters()"
+ >
+
+ <mx:Metadata>
+ [Event(name="violationsLoaded", type="flash.events.Event")]
+ </mx:Metadata>
+
+ <model:UploadModel id="model"
+ violationsLoaded="dispatchEvent( event.clone() )"
+ />
+
+ <mx:Button label="Upload your Pmd results"
+ click="model.load()"
+ />
+
+</mx:VBox>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ResultsFilter.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ResultsFilter.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ResultsFilter.as
new file mode 100644
index 0000000..2920f34
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ResultsFilter.as
@@ -0,0 +1,50 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package com.adobe.ac.pmd.view.model
+{
+ import com.adobe.ac.pmd.model.Violation;
+ import com.adobe.ac.pmd.model.ViolationPriority;
+
+ import mx.collections.GroupingField;
+
+ public final class ResultsFilter
+ {
+ public static const VIOLATION_PRIORITIES : Array = [
+ { name: "All", level: 0 },
+ ViolationPriority.ERROR,
+ ViolationPriority.WARNING,
+ ViolationPriority.INFO ];
+ public static const FILE_PATH_GROUPFIELD : GroupingField = new GroupingField( "shortPath" );
+ public static const RULENAME_GROUPFIELD : GroupingField = new GroupingField( "shortRuleName" );
+
+ [ArrayElementType("mx.collections.GroupingField")]
+ public static const GROUPING_FIELDS : Array = [ FILE_PATH_GROUPFIELD, RULENAME_GROUPFIELD ];
+
+ public static var currentPriorityVisible : int = 1; // NO PMD AvoidUsingPublicStaticField
+
+ public static function filterViolation( value : Object ) : Boolean // NO PMD
+ {
+ if ( currentPriorityVisible == 0 )
+ {
+ return true;
+ }
+ return ( value as Violation ).rule.priority.level == currentPriorityVisible;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ResultsModel.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ResultsModel.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ResultsModel.as
new file mode 100644
index 0000000..5bef07f
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ResultsModel.as
@@ -0,0 +1,138 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package com.adobe.ac.pmd.view.model
+{
+ import com.adobe.ac.model.IPresentationModel;
+ import com.adobe.ac.pmd.model.Violation;
+
+ import flash.events.Event;
+ import flash.events.EventDispatcher;
+
+ import mx.collections.ArrayCollection;
+ import mx.collections.Grouping;
+ import mx.collections.GroupingField;
+
+ [Event( name="currentVisibilityChange", type = "flash.events.Event" )]
+ public class ResultsModel extends EventDispatcher implements IPresentationModel
+ {
+ private static const CURRENT_VISIBILITY_CHANGE : String = "currentVisibilityChange";
+ private static const VIOLATIONS_COMPUTED : String = "violationsComputed";
+ private static const SELECTED_GROUP_FIELDS_CHANGE : String = 'selectedGroupFieldsChange';
+
+ private var _grouping : Grouping;
+ private var _violations : ViolationsModel
+
+ [Bindable]
+ public var selectedViolation : Violation;
+
+ public function ResultsModel()
+ {
+ _violations = new ViolationsModel();
+ _grouping = new Grouping();
+ selectedGroupFields = [ 1 ];
+ }
+
+ public function filter() : void
+ {
+ _violations.filter();
+ dispatchEvent( new Event( CURRENT_VISIBILITY_CHANGE ) )
+ }
+
+ public function set selectedGroupFields( value : Array ) : void
+ {
+ _grouping.fields = [];
+ for each ( var indice : Number in value )
+ {
+ _grouping.fields.push( ResultsFilter.GROUPING_FIELDS[ indice ] );
+ }
+
+ dispatchEvent( new Event( SELECTED_GROUP_FIELDS_CHANGE ) );
+ }
+
+ [Bindable('selectedGroupFieldsChange')]
+ public function get selectedGoupFieldIndices() : Array
+ {
+ var indices : Array = [];
+ var currentIndexInPossibleFields : int;
+
+ for each ( var selectedField : GroupingField in _grouping.fields )
+ {
+ currentIndexInPossibleFields = 0;
+ for each ( var possibleField : GroupingField in ResultsFilter.GROUPING_FIELDS )
+ {
+ if ( selectedField == possibleField )
+ {
+ indices.push( currentIndexInPossibleFields );
+ break;
+ }
+ currentIndexInPossibleFields++;
+ }
+ }
+ return indices;
+ }
+
+ [Bindable("unused")]
+ public function get grouping() : Grouping
+ {
+ return _grouping;
+ }
+
+ public function set currentPriorityVisible( value : int ) : void
+ {
+ ResultsFilter.currentPriorityVisible = value;
+ }
+
+ public function set violations( value : ArrayCollection ) : void
+ {
+ _violations.violations = value;
+
+ dispatchEvent( new Event( VIOLATIONS_COMPUTED ) );
+ }
+
+ [Bindable( "violationsComputed" )]
+ public function get errors() : int
+ {
+ return _violations.errors;
+ }
+
+ [Bindable( "violationsComputed" )]
+ public function get warnings() : int
+ {
+ return _violations.warnings;
+ }
+
+ [Bindable( "violationsComputed" )]
+ public function get informations() : int
+ {
+ return _violations.informations;
+ }
+
+ [Bindable( "violationsComputed" )]
+ public function get violationsNumber() : int
+ {
+ return _violations.violations.source.length;
+ }
+
+ [Bindable( "violationsComputed" )]
+ public function get violations() : ArrayCollection
+ {
+ return _violations.violations;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/UploadModel.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/UploadModel.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/UploadModel.as
new file mode 100644
index 0000000..41c17ee
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/UploadModel.as
@@ -0,0 +1,135 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package com.adobe.ac.pmd.view.model
+{
+ import com.adobe.ac.model.IPresentationModel;
+ import com.adobe.ac.pmd.model.CharacterPosition;
+ import com.adobe.ac.pmd.model.Violation;
+ import com.adobe.ac.pmd.model.ViolationPriority;
+
+ import flash.events.Event;
+ import flash.events.EventDispatcher;
+ import flash.net.FileFilter;
+ import flash.net.FileReference;
+ import flash.utils.ByteArray;
+
+ import mx.collections.ArrayCollection;
+ import mx.core.Application;
+ import mx.rpc.events.ResultEvent;
+ import mx.rpc.http.mxml.HTTPService;
+
+ [Event( name="violationsLoaded", type = "flash.events.Event" )]
+
+ public class UploadModel extends EventDispatcher implements IPresentationModel
+ {
+ public static const VIOLATIONS_LOADED : String = "violationsLoaded";
+
+ [ArrayElementType( "flash.net.FileFilter" )]
+ private static const FILTERS : Array = [ new FileFilter( "Pmd results file", "pmd.xml" ) ];
+
+ [Bindable]
+ public var violations : ArrayCollection;
+
+ private var fileReference : FileReference;
+
+ public function UploadModel()
+ {
+ super();
+ }
+
+ public function tryToLoadFromParameters() : void
+ {
+ var report : String = Application.application.parameters.report;
+
+ if ( report != "" )
+ {
+ var request : HTTPService = new HTTPService();
+
+ request.useProxy = false;
+ request.url = report;
+ request.showBusyCursor = true;
+ request.resultFormat = "xml";
+ request.addEventListener( ResultEvent.RESULT, onDonwloadResult );
+ request.send();
+ }
+ }
+
+ public function load() : void
+ {
+ fileReference = new FileReference();
+ fileReference.browse( FILTERS );
+ fileReference.addEventListener( Event.SELECT, onSelect );
+ }
+
+ public function deserializeViolations( violationsXml : XML ) : ArrayCollection
+ {
+ var newViolations : ArrayCollection = new ArrayCollection();
+
+ for each ( var fileXml : XML in violationsXml.file )
+ {
+ for each ( var violationXml : XML in fileXml.violation )
+ {
+ newViolations.addItem( deserializeViolation( violationXml, fileXml.@name ) );
+ }
+ }
+ return newViolations;
+ }
+
+ private function deserializeViolation( violationXml : XML, filePath : String ) : Violation
+ {
+ var beginPosition : CharacterPosition = new CharacterPosition(
+ violationXml.@beginline,
+ violationXml.@begincolumn );
+ var endPosition : CharacterPosition = new CharacterPosition(
+ violationXml.@endline,
+ violationXml.@endcolumn );
+ var violation : Violation = new Violation( beginPosition, endPosition, filePath );
+
+ violation.rule.name = violationXml.@rule;
+ violation.rule.ruleset.name = violationXml.@ruleset
+ violation.rule.priority = ViolationPriority.create( violationXml.@priority );
+ violation.rule.message = violationXml.toString();
+
+ return violation;
+ }
+
+ private function onDonwloadResult( e : ResultEvent ) : void
+ {
+ violations = deserializeViolations( new XML( e.result ) );
+
+ dispatchEvent( new Event( VIOLATIONS_LOADED ) )
+ }
+
+ private function onSelect( e : Event ) : void
+ {
+ fileReference.addEventListener( Event.COMPLETE, onLoadComplete );
+ fileReference.load();
+ }
+
+ private function onLoadComplete( e : Event ) : void
+ {
+ var data : ByteArray = fileReference.data;
+ var xml : XML = new XML( data.readUTFBytes( data.bytesAvailable ) );
+
+ violations = deserializeViolations( xml );
+
+ dispatchEvent( new Event( VIOLATIONS_LOADED ) )
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ViolationsModel.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ViolationsModel.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ViolationsModel.as
new file mode 100644
index 0000000..bfb459f
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/main/flex/com/adobe/ac/pmd/view/model/ViolationsModel.as
@@ -0,0 +1,84 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package com.adobe.ac.pmd.view.model
+{
+ import com.adobe.ac.pmd.model.Violation;
+
+ import mx.collections.ArrayCollection;
+
+ public class ViolationsModel
+ {
+ private var _errors : int = 0;
+ private var _warnings : int = 0;
+ private var _informations : int = 0;
+ private var _violations : ArrayCollection;
+
+ public function ViolationsModel()
+ {
+ }
+
+ public function get violations() : ArrayCollection
+ {
+ return _violations;
+ }
+
+ public function get errors() : int
+ {
+ return _errors;
+ }
+
+ public function get warnings() : int
+ {
+ return _warnings;
+ }
+
+ public function get informations() : int
+ {
+ return _informations;
+ }
+
+ public function set violations( value : ArrayCollection ) : void
+ {
+ _violations = value;
+ _violations.filterFunction = ResultsFilter.filterViolation;
+
+ for each ( var violation : Violation in _violations )
+ {
+ if ( violation.rule.priority.level == 1 )
+ {
+ _errors++;
+ }
+ else if ( violation.rule.priority.level == 3 )
+ {
+ _warnings++;
+ }
+ else if ( violation.rule.priority.level == 5 )
+ {
+ _informations++;
+ }
+ }
+ _violations.refresh();
+ }
+
+ public function filter() : void
+ {
+ _violations.refresh();
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/test/flex/AllTests.as
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/test/flex/AllTests.as b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/test/flex/AllTests.as
new file mode 100644
index 0000000..4d2e642
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flex-pmd-violations-viewer/src/test/flex/AllTests.as
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package flex - pmd - violations - viewer.src.test.flex
+{
+ import flexunit.framework.TestSuite;
+
+ public class AllTests extends TestSuite
+ {
+ public function AllTests()
+ {
+ super();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/pom.xml b/FlexPMD/flex-pmd-flex/flexunit-theme/pom.xml
new file mode 100644
index 0000000..1ffe2f4
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flexunit-theme/pom.xml
@@ -0,0 +1,91 @@
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>flex-pmd-flex</artifactId>
+ <groupId>org.apache.flex.pmd</groupId>
+ <version>1.3-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>flexunit-theme</artifactId>
+ <packaging>swc</packaging>
+
+ <name>FlexUnit theme</name>
+ <description>Adobe FlexUnit theme</description>
+
+ <dependencies>
+
+ <!-- flex sdk dependencies -->
+
+ <dependency>
+ <groupId>org.apache.flex</groupId>
+ <artifactId>framework</artifactId>
+ <version>${flex.version}</version>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>com.adobe.flash.framework</groupId>
+ <artifactId>playerglobal</artifactId>
+ <version>${flash-player.version}</version>
+ <type>swc</type>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <sourceDirectory>src/main/resources</sourceDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+
+ <plugins>
+ <plugin>
+ <groupId>net.flexmojos.oss</groupId>
+ <artifactId>flexmojos-maven-plugin</artifactId>
+ <version>${flex-mojos-plugin.version}</version>
+ <extensions>true</extensions>
+ <configuration>
+ <targetPlayer>${flash-player.version}</targetPlayer>
+ </configuration>
+ <dependencies>
+ <!-- This handles a bug in maven which causes problems with flex resources -->
+ <dependency>
+ <groupId>net.flexmojos.oss</groupId>
+ <artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
+ <version>${flex-mojos-plugin.version}</version>
+ </dependency>
+ <!-- Without this FM will use the compiler configured in its
+ master pom, which will result in version conflicts -->
+ <dependency>
+ <groupId>org.apache.flex</groupId>
+ <artifactId>compiler</artifactId>
+ <version>${flex.version}</version>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/cancelledIcon.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/cancelledIcon.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/cancelledIcon.png
new file mode 100644
index 0000000..9bca099
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/cancelledIcon.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/export.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/export.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/export.png
new file mode 100644
index 0000000..fd4bfcd
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/export.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/icon_tool_trash.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/icon_tool_trash.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/icon_tool_trash.png
new file mode 100644
index 0000000..b4b470d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/icon_tool_trash.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/icon_tool_trash2.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/icon_tool_trash2.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/icon_tool_trash2.png
new file mode 100644
index 0000000..282a037
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/icon_tool_trash2.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/todoLogo.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/todoLogo.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/todoLogo.png
new file mode 100644
index 0000000..a314b8d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/todoLogo.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/todoLogo_big.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/todoLogo_big.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/todoLogo_big.png
new file mode 100644
index 0000000..bb89f68
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/assets/todoLogo_big.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/css/default.css
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/css/default.css b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/css/default.css
new file mode 100644
index 0000000..2e79328
--- /dev/null
+++ b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/css/default.css
@@ -0,0 +1,285 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Application {
+ backgroundColor: #3872b2;
+ backgroundGradientColors: #3872b2, #0c1a3d;
+ backgroundGradientAlphas: 1, 1;
+ themeColor: #0c1a3d;
+ color: #444444;
+ fontFamily: "Myriad Pro";
+ fontSize: 12;
+ verticalScrollBarStyleName: flexUnitScrollBar;
+ horizontalScrollBarStyleName: flexUnitScrollBar;
+ modal-transparency-blur: 0;
+ modal-transparency: 0;
+}
+
+ToolTip
+{
+ fontFamily: "Myriad Pro";
+ leading: 5;
+ fontSize: 11;
+ backgroundColor: #DFEAF4;
+}
+
+ScrollBar
+{
+ downArrowDisabledSkin: Embed( source="skins/VScrollBar_downArrowDisabledSkin.png" );
+ downArrowDownSkin: Embed( source="skins/VScrollBar_downArrowDownSkin.png" );
+ downArrowOverSkin: Embed( source="skins/VScrollBar_downArrowOverSkin.png" );
+ downArrowUpSkin: Embed( source="skins/VScrollBar_downArrowUpSkin.png" );
+ thumbIcon: Embed( source="skins/VScrollBar_thumbIcon.png" );
+ trackSkin: Embed( source="skins/VScrollBar_trackSkin.png" );
+ upArrowDisabledSkin: Embed( source="skins/VScrollBar_upArrowDisabledSkin.png" );
+ upArrowDownSkin: Embed( source="skins/VScrollBar_upArrowDownSkin.png" );
+ upArrowOverSkin: Embed( source="skins/VScrollBar_upArrowOverSkin.png" );
+ upArrowUpSkin: Embed( source="skins/VScrollBar_upArrowUpSkin.png" );
+ thumbDownSkin: Embed(
+ source="skins/VScrollBar_thumbDownSkin.png",
+ scaleGridLeft="1", scaleGridTop="5",
+ scaleGridRight="8", scaleGridBottom="44" );
+ thumbOverSkin: Embed(
+ source="skins/VScrollBar_thumbOverSkin.png",
+ scaleGridLeft="1", scaleGridTop="5",
+ scaleGridRight="8", scaleGridBottom="44" );
+ thumbUpSkin: Embed(
+ source="skins/VScrollBar_thumbUpSkin.png",
+ scaleGridLeft="1", scaleGridTop="5",
+ scaleGridRight="8", scaleGridBottom="44" );
+}
+
+/* Embedded Fonts */
+ /*@font-face {
+ font-family: "Myriad Pro SemiCond";
+ src: url( "fonts/fonts.swf" );
+}*/
+/* CSS file used for component-level compilation */
+
+/* Embedded Fonts */
+/* Font for titles */
+/*@font-face {
+ font-family: "Myriad Pro SemiCond";
+ src: url("fonts/fonts.swf");
+}*/
+
+/* Font for anything else */
+/*@font-face {
+ font-family: "Myriad Pro";
+ src: url("fonts/fonts.swf");
+}*/
+
+/*@font-face {
+ font-family: "Myriad Pro";
+ font-weight: bold;
+ src: url("fonts/fonts.swf");
+}*/
+
+ScrollBar
+{
+ downArrowDisabledSkin: Embed(source="skins/VScrollBar_downArrowDisabledSkin.png");
+ downArrowDownSkin: Embed(source="skins/VScrollBar_downArrowDownSkin.png");
+ downArrowOverSkin: Embed(source="skins/VScrollBar_downArrowOverSkin.png");
+ downArrowUpSkin: Embed(source="skins/VScrollBar_downArrowUpSkin.png");
+ thumbIcon: Embed(source="skins/VScrollBar_thumbIcon.png");
+ trackSkin: Embed(source="skins/VScrollBar_trackSkin.png");
+ upArrowDisabledSkin: Embed(source="skins/VScrollBar_upArrowDisabledSkin.png");
+ upArrowDownSkin: Embed(source="skins/VScrollBar_upArrowDownSkin.png");
+ upArrowOverSkin: Embed(source="skins/VScrollBar_upArrowOverSkin.png");
+ upArrowUpSkin: Embed(source="skins/VScrollBar_upArrowUpSkin.png");
+ thumbDownSkin: Embed(
+ source="skins/VScrollBar_thumbDownSkin.png",
+ scaleGridLeft="1", scaleGridTop="5",
+ scaleGridRight="8", scaleGridBottom="44" );
+ thumbOverSkin: Embed(
+ source="skins/VScrollBar_thumbOverSkin.png",
+ scaleGridLeft="1", scaleGridTop="5",
+ scaleGridRight="8", scaleGridBottom="44" );
+ thumbUpSkin: Embed(
+ source="skins/VScrollBar_thumbUpSkin.png",
+ scaleGridLeft="1", scaleGridTop="5",
+ scaleGridRight="8", scaleGridBottom="44" );
+}
+
+Button
+{
+ horizontalGap: -1;
+ firstButtonStyleName: "firstButtonBarButton";
+ lastButtonStyleName: "lastButtonBarButton";
+}
+
+.mainPanel {
+ header-height: 0;
+ vertical-gap: 2;
+ borderSkin: Embed(
+ source="skins/Panel_borderSkin.png",
+ scaleGridLeft="12", scaleGridTop="31",
+ scaleGridRight="265", scaleGridBottom="189" );
+ padding-top: 20;
+ padding-left: 8;
+ padding-right: 8;
+}
+
+.onlineIcon {
+ background-color: #26DE26;
+ corner-radius: 7;
+ borderThickness: 0;
+ borderStyle: solid;
+}
+
+.offlineIcon {
+ background-color: #D32929;
+ corner-radius: 7;
+ borderStyle: solid;
+ borderThickness: 0;
+}
+
+HRule {
+ strokeColor: #b9b9b9;
+ strokeWidth: 2;
+ shadowColor: #FFFFFF;
+}
+
+.FormItemLabel {
+ color: #777777;
+}
+
+.FormItemValue {
+ color: #444444;
+}
+
+.panelTitleStyle {
+ fontFamily: "Myriad Pro SemiCond";
+ fontSize: 24;
+ textIndent: 20;
+}
+
+.statusPanelTitleSubStyle {
+ fontFamily: "Myriad Pro SemiCond";
+ fontSize: 16;
+ horizontal-center: right;
+ paddingLeft: 15;
+}
+
+.acPanelTitleSubStyle {
+ fontFamily: "Myriad Pro SemiCond";
+ fontSize: 16;
+ horizontal-center: right;
+ color: #C20D2B;
+}
+
+.panelTitleSubStyle {
+ fontFamily: "Myriad Pro SemiCond";
+ fontSize: 16;
+ horizontal-center: right;
+}
+
+.lowerPanelTitleSubStyle{
+ fontFamily: "Myriad Pro SemiCond";
+ fontSize: 16;
+ textIndent: 20;
+}
+
+.panelTitleLogo {
+ background-image:Embed(source="assets/todoLogo_big.png");
+ backgroundAlpha: 1.0;
+ backgroundSize: auto;
+}
+
+.firstButtonBarButton
+{
+ disabledSkin: Embed(
+ source="skins/ButtonBarFirstButton_disabledSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ downSkin: Embed(
+ source="skins/ButtonBarFirstButton_downSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ overSkin: Embed(
+ source="skins/ButtonBarFirstButton_overSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ selectedDisabledSkin: Embed(
+ source="skins/ButtonBarFirstButton_selectedDisabledSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ selectedDownSkin: Embed(
+ source="skins/ButtonBarFirstButton_downSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ selectedOverSkin: Embed(
+ source="skins/ButtonBarFirstButton_overSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ selectedUpSkin: Embed(
+ source="skins/ButtonBarFirstButton_selectedUpSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ upSkin: Embed(
+ source="skins/ButtonBarFirstButton_upSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+}
+
+.lastButtonBarButton
+{
+ disabledSkin: Embed(
+ source="skins/ButtonBarLastButton_disabledSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ downSkin: Embed(
+ source="skins/ButtonBarLastButton_downSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ overSkin: Embed(
+ source="skins/ButtonBarLastButton_overSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ selectedDisabledSkin: Embed(
+ source="skins/ButtonBarLastButton_disabledSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ selectedDownSkin: Embed(
+ source="skins/ButtonBarLastButton_downSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ selectedOverSkin: Embed(
+ source="skins/ButtonBarLastButton_overSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ selectedUpSkin: Embed(
+ source="skins/ButtonBarLastButton_selectedUpSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+ upSkin: Embed(
+ source="skins/ButtonBarLastButton_upSkin.png",
+ scaleGridLeft="6", scaleGridTop="6",
+ scaleGridRight="40", scaleGridBottom="16" );
+}
+Panel
+{
+ borderThicknessLeft: 4;
+ borderThicknessRight: 4;
+ roundedBottomCorners: true;
+ borderAlpha: 0.7;
+ paddingTop: 20;
+ paddingBottom: 20;
+ paddingLeft: 20;
+ paddingRight: 20;
+}
+
+
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_disabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_disabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_disabledSkin.png
new file mode 100644
index 0000000..09c33cb
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_disabledSkin.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_downSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_downSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_downSkin.png
new file mode 100644
index 0000000..bd8646c
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_downSkin.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_overSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_overSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_overSkin.png
new file mode 100644
index 0000000..349a753
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_overSkin.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_selectedDisabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_selectedDisabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_selectedDisabledSkin.png
new file mode 100644
index 0000000..f73df16
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_selectedDisabledSkin.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_selectedUpSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_selectedUpSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_selectedUpSkin.png
new file mode 100644
index 0000000..16c9a95
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_selectedUpSkin.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_upSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_upSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_upSkin.png
new file mode 100644
index 0000000..95dc22d
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarButton_upSkin.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_disabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_disabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_disabledSkin.png
new file mode 100644
index 0000000..4366eea
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_disabledSkin.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_downSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_downSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_downSkin.png
new file mode 100644
index 0000000..ad95d69
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_downSkin.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_overSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_overSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_overSkin.png
new file mode 100644
index 0000000..c15bf1f
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_overSkin.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e43b7a87/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_selectedDisabledSkin.png
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_selectedDisabledSkin.png b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_selectedDisabledSkin.png
new file mode 100644
index 0000000..b044701
Binary files /dev/null and b/FlexPMD/flex-pmd-flex/flexunit-theme/src/main/resources/skins/ButtonBarFirstButton_selectedDisabledSkin.png differ