Commits

Dmytro Kovalchuk committed a416d25

Patches applied

Comments (0)

Files changed (8)

applicationStartup

-# HG changeset patch
-# Parent 26edeb345aa3c0b8ee4eb4af8bd01ca87502b184
-Application startup changed
-
-diff -r 26edeb345aa3 -r ac00eb227a43 cross-stitch-app/src/main/java/net/anatolich/cstitch/Application.java
---- a/cross-stitch-app/src/main/java/net/anatolich/cstitch/Application.java	Tue Apr 10 18:32:52 2012 +0300
-+++ b/cross-stitch-app/src/main/java/net/anatolich/cstitch/Application.java	Wed Apr 11 00:03:24 2012 +0300
-@@ -18,8 +18,6 @@
- import com.google.inject.Guice;
- import com.google.inject.Injector;
- import javax.swing.SwingUtilities;
--import net.anatolich.cstitch.palette.impl.PaletteServiceConfiguration;
--import net.anatolich.cstitch.palette.impl.PalettesConfiguration;
- import net.anatolich.cstitch.ui.editor.tools.service.ToolsModule;
- 
- /**
-@@ -30,7 +28,11 @@
- public class Application {
- 
-     public static void main(String[] args) {
--        
-+        Application application = new Application();
-+        application.start();
-+    }
-+    
-+    public void start(){
-         SwingUtilities.invokeLater(new Runnable() {
- 
-             @Override

fileServiceImpl

-# HG changeset patch
-# Parent f19f7aef769868c8681ef192fd0ce7da853f79e7
-Refactoring of file service implementation
-
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/FileFormat.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/FileFormat.java
---- a/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/FileFormat.java
-+++ b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/FileFormat.java
-@@ -24,7 +24,7 @@
-  */
- public interface FileFormat {
-     
--    CanvasReader getFileReader();
-+    FileReader getFileReader();
-     
--    CanvasWriter getFileWriter();
-+    FileWriter getFileWriter();
- }
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/CanvasReader.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/FileReader.java
-rename from cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/CanvasReader.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/FileReader.java
---- a/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/CanvasReader.java
-+++ b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/FileReader.java
-@@ -30,7 +30,7 @@
-  * @since 1.0
-  * @version 1.0
-  */
--public interface CanvasReader {
-+public interface FileReader {
- 
-     /**
-      * Reads schema file from provided input stream.
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/CanvasWriter.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/FileWriter.java
-rename from cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/CanvasWriter.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/FileWriter.java
---- a/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/CanvasWriter.java
-+++ b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/FileWriter.java
-@@ -26,7 +26,7 @@
-  * @since 1.0
-  * @version 1.0
-  */
--public interface CanvasWriter {
-+public interface FileWriter {
- 
-     void write(Canvas canvas, OutputStream out) throws IOException;
-     
-diff --git a/cross-stitch-app/pom.xml b/cross-stitch-app/pom.xml
---- a/cross-stitch-app/pom.xml
-+++ b/cross-stitch-app/pom.xml
-@@ -21,7 +21,6 @@
-     <dependency>
-       <groupId>com.google.inject</groupId>
-       <artifactId>guice</artifactId>
--      <version>3.0</version>
-     </dependency>
-     <dependency>
-       <groupId>${project.groupId}</groupId>
-@@ -29,8 +28,8 @@
-       <version>${project.version}</version>
-     </dependency>
-     <dependency>
--      <groupId>${project.groupId}</groupId>
--      <artifactId>cross-stitch-fileservice-impl</artifactId>
-+      <groupId>net.anatolich.cstitch.impl</groupId>
-+      <artifactId>fileservice-impl</artifactId>
-       <version>${project.version}</version>
-     </dependency>
-   </dependencies>
-diff --git a/cross-stitch-fileservice-impl/pom.xml b/cross-stitch-fileservice-impl/pom.xml
---- a/cross-stitch-fileservice-impl/pom.xml
-+++ b/cross-stitch-fileservice-impl/pom.xml
-@@ -8,8 +8,10 @@
-         <version>1.0-SNAPSHOT</version>
-     </parent>
-     
--    <artifactId>cross-stitch-fileservice-impl</artifactId>
--    <name>cross-stitch-fileservice-impl</name>
-+    <groupId>net.anatolich.cstitch.impl</groupId>
-+    <artifactId>fileservice-impl</artifactId>
-+    <name>fileservice-impl</name>
-+    <description>Basic implementation of file service</description>
-   
-     <dependencies>
-         <dependency>
-@@ -28,4 +30,5 @@
-             <scope>test</scope>
-         </dependency>
-     </dependencies>
-+    
- </project>
-diff --git a/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultCanvasReader.java b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/DefaultCanvasReader.java
-rename from cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultCanvasReader.java
-rename to cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/DefaultCanvasReader.java
---- a/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultCanvasReader.java
-+++ b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/DefaultCanvasReader.java
-@@ -13,9 +13,9 @@
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
--package net.anatolich.cstitch.schema.file.format.impl;
-+package net.anatolich.cstitch.schema.file.impl;
- 
--import net.anatolich.cstitch.schema.file.format.api.CanvasReader;
-+import net.anatolich.cstitch.schema.file.format.api.FileReader;
- import com.google.inject.Inject;
- import java.awt.Color;
- import java.io.DataInputStream;
-@@ -34,7 +34,7 @@
-  * @since 1.0
-  * @version 1.0
-  */
--public final class DefaultCanvasReader implements CanvasReader {
-+final class DefaultCanvasReader implements FileReader {
- 
-     private PaletteService paletteService;
- 
-diff --git a/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultCanvasWriter.java b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/DefaultCanvasWriter.java
-rename from cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultCanvasWriter.java
-rename to cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/DefaultCanvasWriter.java
---- a/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultCanvasWriter.java
-+++ b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/DefaultCanvasWriter.java
-@@ -13,9 +13,9 @@
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
--package net.anatolich.cstitch.schema.file.format.impl;
-+package net.anatolich.cstitch.schema.file.impl;
- 
--import net.anatolich.cstitch.schema.file.format.api.CanvasWriter;
-+import net.anatolich.cstitch.schema.file.format.api.FileWriter;
- import java.io.DataOutputStream;
- import java.io.IOException;
- import java.io.OutputStream;
-@@ -32,7 +32,7 @@
-  * @since 1.0
-  * @version 1.0
-  */
--public final class DefaultCanvasWriter implements CanvasWriter {
-+final class DefaultCanvasWriter implements FileWriter {
- 
-     @Override
-     public void write(Canvas canvas, OutputStream out) throws IOException {
-diff --git a/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultFileFormat.java b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/DefaultFileFormat.java
-rename from cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultFileFormat.java
-rename to cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/DefaultFileFormat.java
---- a/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultFileFormat.java
-+++ b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/DefaultFileFormat.java
-@@ -16,13 +16,13 @@
- 
- 
- 
--package net.anatolich.cstitch.schema.file.format.impl;
-+package net.anatolich.cstitch.schema.file.impl;
- 
- import com.google.inject.Inject;
- 
- import net.anatolich.cstitch.palette.api.PaletteService;
--import net.anatolich.cstitch.schema.file.format.api.CanvasReader;
--import net.anatolich.cstitch.schema.file.format.api.CanvasWriter;
-+import net.anatolich.cstitch.schema.file.format.api.FileReader;
-+import net.anatolich.cstitch.schema.file.format.api.FileWriter;
- import net.anatolich.cstitch.schema.file.format.api.FileFormat;
- 
- /**
-@@ -32,9 +32,9 @@
-  * @since 1.0
-  * @version 1.0
-  */
--public class DefaultFileFormat implements FileFormat {
--    private final CanvasReader canvasReader;
--    private final CanvasWriter canvasWriter;
-+class DefaultFileFormat implements FileFormat {
-+    private final FileReader canvasReader;
-+    private final FileWriter canvasWriter;
- 
-     /**
-      * Creates format factory for default file format.
-@@ -48,12 +48,12 @@
-     }
- 
-     @Override
--    public CanvasReader getFileReader() {
-+    public FileReader getFileReader() {
-         return canvasReader;
-     }
- 
-     @Override
--    public CanvasWriter getFileWriter() {
-+    public FileWriter getFileWriter() {
-         return canvasWriter;
-     }
- }
-diff --git a/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/FileFormatConfiguration.java b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/FileFormatConfiguration.java
-rename from cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/FileFormatConfiguration.java
-rename to cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/FileFormatConfiguration.java
---- a/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/FileFormatConfiguration.java
-+++ b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/FileFormatConfiguration.java
-@@ -13,7 +13,7 @@
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
--package net.anatolich.cstitch.schema.file.format.impl;
-+package net.anatolich.cstitch.schema.file.impl;
- 
- import com.google.inject.AbstractModule;
- import net.anatolich.cstitch.schema.file.format.api.FileFormat;
-@@ -22,7 +22,7 @@
-  *
-  * @author anatolich
-  */
--public class FileFormatConfiguration extends AbstractModule {
-+class FileFormatConfiguration extends AbstractModule {
- 
-     @Override
-     protected void configure() {
-diff --git a/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceConfiguration.java b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceConfiguration.java
---- a/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceConfiguration.java
-+++ b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceConfiguration.java
-@@ -21,12 +21,9 @@
- import com.google.inject.AbstractModule;
- import com.google.inject.Singleton;
- import com.google.inject.name.Names;
--
-+import java.util.prefs.Preferences;
- import net.anatolich.cstitch.schema.file.api.FileService;
- 
--import java.util.prefs.Preferences;
--import net.anatolich.cstitch.schema.file.format.impl.FileFormatConfiguration;
--
- /**
-  *
-  * @author anatolich
-diff --git a/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceImpl.java b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceImpl.java
---- a/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceImpl.java
-+++ b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceImpl.java
-@@ -22,8 +22,8 @@
- 
- import net.anatolich.cstitch.schema.Canvas;
- import net.anatolich.cstitch.schema.file.api.FileService;
--import net.anatolich.cstitch.schema.file.format.api.CanvasReader;
--import net.anatolich.cstitch.schema.file.format.api.CanvasWriter;
-+import net.anatolich.cstitch.schema.file.format.api.FileReader;
-+import net.anatolich.cstitch.schema.file.format.api.FileWriter;
- import net.anatolich.cstitch.schema.file.format.api.FileFormat;
- 
- import java.beans.PropertyChangeListener;
-@@ -44,12 +44,12 @@
-  * @since 1.0
-  * @version 1.0
-  */
--public final class FileServiceImpl implements FileService {
-+final class FileServiceImpl implements FileService {
-     private static final FileFilter SCHEMA_FILENAME_FILTER = new FileNameExtensionFilter("Schema files", "schema");
-     private final PropertyChangeSupport propertyChangeSupport;
-     private final RecentFileList recentFilesList;
--    private final CanvasReader schemaFileReader;
--    private final CanvasWriter schemaFileWriter;
-+    private final FileReader schemaFileReader;
-+    private final FileWriter schemaFileWriter;
-     private File currentFile;
- 
-     /**
-diff --git a/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/RecentFileList.java b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/RecentFileList.java
---- a/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/RecentFileList.java
-+++ b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/RecentFileList.java
-@@ -22,7 +22,7 @@
-  *
-  * @author anatolich
-  */
--public interface RecentFileList {
-+interface RecentFileList {
-     int FILES_LIMIT = 5;
- 
-     List<File> getFiles();
-diff --git a/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/RecentFilesListImpl.java b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/RecentFilesListImpl.java
---- a/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/RecentFilesListImpl.java
-+++ b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/RecentFilesListImpl.java
-@@ -30,7 +30,7 @@
-  * @since 1.0
-  * @version 1.0
-  */
--public final class RecentFilesListImpl implements RecentFileList {
-+final class RecentFilesListImpl implements RecentFileList {
-     private final SortedMap<Long, File> sortedFiles;
-     private final Map<File, Long> trackedFiles;
-     private Preferences preferences;
-diff --git a/cross-stitch-fileservice-impl/src/test/java/net/anatolich/cstitch/schema/file/impl/FileServiceImplTest.java b/cross-stitch-fileservice-impl/src/test/java/net/anatolich/cstitch/schema/file/impl/FileServiceImplTest.java
---- a/cross-stitch-fileservice-impl/src/test/java/net/anatolich/cstitch/schema/file/impl/FileServiceImplTest.java
-+++ b/cross-stitch-fileservice-impl/src/test/java/net/anatolich/cstitch/schema/file/impl/FileServiceImplTest.java
-@@ -18,8 +18,8 @@
- import java.io.*;
- import net.anatolich.cstitch.schema.Canvas;
- import net.anatolich.cstitch.schema.DefaultCanvas;
--import net.anatolich.cstitch.schema.file.format.api.CanvasReader;
--import net.anatolich.cstitch.schema.file.format.api.CanvasWriter;
-+import net.anatolich.cstitch.schema.file.format.api.FileReader;
-+import net.anatolich.cstitch.schema.file.format.api.FileWriter;
- import net.anatolich.cstitch.schema.file.format.api.FileFormat;
- import static org.easymock.EasyMock.*;
- import org.junit.After;
-@@ -37,16 +37,16 @@
-     private DefaultCanvas canvas;
-     private FileServiceImpl ioService;
-     private FileFormat fileFormatMock;
--    private CanvasReader readerMock;
--    private CanvasWriter writerMock;
-+    private FileReader readerMock;
-+    private FileWriter writerMock;
-     private File schemaFile;
-     private RecentFileList recentFilesListMock;
- 
-     @Before
-     public void setUp() throws Exception {
-         schemaFile = File.createTempFile("file1", "schema");
--        readerMock = createStrictMock(CanvasReader.class);
--        writerMock = createStrictMock(CanvasWriter.class);
-+        readerMock = createStrictMock(FileReader.class);
-+        writerMock = createStrictMock(FileWriter.class);
-         
-         fileFormatMock = createMock(FileFormat.class);
-         

modularity

-# HG changeset patch
-# Parent 6431875a40d3721fb7bb7bad0488d26874a7e148
-Introducing modularity
-
-diff --git a/.hgignore b/.hgignore
---- a/.hgignore
-+++ b/.hgignore
-@@ -3,4 +3,4 @@
- \.chg\..*$
- \.rej$
- \.conflict\~$
--^target/
-+target/
-diff --git a/README b/cross-stitch-api/README
-rename from README
-rename to cross-stitch-api/README
-diff --git a/pom.xml b/cross-stitch-api/pom.xml
-copy from pom.xml
-copy to cross-stitch-api/pom.xml
---- a/pom.xml
-+++ b/cross-stitch-api/pom.xml
-@@ -2,131 +2,57 @@
- <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/xsd/maven-4.0.0.xsd">
-     <modelVersion>4.0.0</modelVersion>
--
--    <groupId>net.anatolich.cstitch</groupId>
--    <artifactId>cross-stitch</artifactId>
--    <version>1.0-SNAPSHOT</version>
-+    <parent>
-+        <relativePath>../pom.xml</relativePath>
-+        <groupId>net.anatolich.cstitch</groupId>
-+        <artifactId>cross-stitch</artifactId>
-+        <version>1.0-SNAPSHOT</version>
-+    </parent>
-+    
-+    <artifactId>cross-stitch-api</artifactId>
-     <packaging>jar</packaging>
- 
--    <name>cross-stitch</name>
--    <url>https://bitbucket.org/dimasmith/cross-stitch/overview</url>
--  
--    <scm>
--        <connection>scm:hg:https://bitbucket.org/dimasmith/cross-stitch/</connection>
--        <developerConnection>scm:hg:https://bitbucket.org/dimasmith/cross-stitch/</developerConnection>
--        <url>https://bitbucket.org/dimasmith/cross-stitch/</url>
--    </scm>
--    
--    <licenses>
--        <license>
--            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
--            <name>Apache 2.0 License</name>
--        </license>
--    </licenses>
--    
--    <build>
--        <plugins>
--            <plugin>
--                <groupId>org.apache.maven.plugins</groupId>
--                <artifactId>maven-compiler-plugin</artifactId>
--                <version>2.3.2</version>
--                <configuration>
--                    <source>1.7</source>
--                    <target>1.7</target>
--                    <showDeprecation>true</showDeprecation>
--                </configuration>
--            </plugin>
--            <plugin>
--                <groupId>org.codehaus.mojo</groupId>
--                <artifactId>cobertura-maven-plugin</artifactId>
--                <version>2.5.1</version>
--            </plugin>            
--        </plugins>
--    </build>
--    
--    <profiles>
--        <profile>
--            <id>with-integration-tests</id>
--            <build>
--                <plugins>
--                    <plugin>
--                        <groupId>org.apache.maven.plugins</groupId>
--                        <artifactId>maven-failsafe-plugin</artifactId>
--                        <version>2.11</version>
--                        <executions>
--                            <execution>
--                                <goals>
--                                    <goal>integration-test</goal>
--                                    <goal>verify</goal>
--                                </goals>
--                            </execution>
--                        </executions>
--                    </plugin>
--                </plugins>
--            </build>
--        </profile>
--    </profiles>
--    
--    <properties>
--        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
--    </properties>
--
-+    <name>cross-stitch-api</name>
-     <dependencies>
-         <dependency>
-             <groupId>junit</groupId>
-             <artifactId>junit</artifactId>
--            <version>4.10</version>
--            <scope>test</scope>
-         </dependency>
-         <dependency>
-             <groupId>ch.qos.logback</groupId>
-             <artifactId>logback-classic</artifactId>
--            <version>1.0.0</version>
-         </dependency>
-         <dependency>
-+            <groupId>org.slf4j</groupId>
-             <artifactId>slf4j-api</artifactId>
--            <groupId>org.slf4j</groupId>
--            <type>jar</type>
--            <version>1.6.4</version>
-         </dependency>
-         <dependency>
-             <groupId>com.google.inject</groupId>
-             <artifactId>guice</artifactId>
--            <version>3.0</version>
-         </dependency>
-         <dependency>
-             <groupId>com.google.guava</groupId>
-             <artifactId>guava</artifactId>
--            <version>11.0.1</version>
-         </dependency>
-         <dependency>
-             <groupId>org.easytesting</groupId>
-             <artifactId>fest-swing</artifactId>
--            <version>1.2.1</version>
--            <scope>test</scope>
-         </dependency>
-         <dependency>
-             <groupId>org.easytesting</groupId>
-             <artifactId>fest-reflect</artifactId>
--            <version>1.2</version>
--            <scope>test</scope>
-         </dependency>
-         <dependency>
-             <groupId>com.google.inject.extensions</groupId>
-             <artifactId>guice-multibindings</artifactId>
--            <version>3.0</version>
-         </dependency>
-         <dependency>
-             <groupId>org.easymock</groupId>
-             <artifactId>easymock</artifactId>
--            <version>3.1</version>
--            <scope>test</scope>
-         </dependency>
-         <dependency>
-             <groupId>org.easymock</groupId>
-             <artifactId>easymockclassextension</artifactId>
--            <version>3.1</version>
--            <scope>test</scope>
-         </dependency>
-     </dependencies>
- </project>
-diff --git a/src/main/java/net/anatolich/cstitch/palette/api/Palette.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/Palette.java
-rename from src/main/java/net/anatolich/cstitch/palette/api/Palette.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/Palette.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/api/PaletteColor.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/PaletteColor.java
-rename from src/main/java/net/anatolich/cstitch/palette/api/PaletteColor.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/PaletteColor.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/api/PaletteService.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/PaletteService.java
-rename from src/main/java/net/anatolich/cstitch/palette/api/PaletteService.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/PaletteService.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/api/package-info.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/package-info.java
-rename from src/main/java/net/anatolich/cstitch/palette/api/package-info.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/package-info.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/file/AbstractFilePalette.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/AbstractFilePalette.java
-rename from src/main/java/net/anatolich/cstitch/palette/file/AbstractFilePalette.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/AbstractFilePalette.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/file/AbstractPaletteFileParser.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/AbstractPaletteFileParser.java
-rename from src/main/java/net/anatolich/cstitch/palette/file/AbstractPaletteFileParser.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/AbstractPaletteFileParser.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParser.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParser.java
-rename from src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParser.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParser.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParserException.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParserException.java
-rename from src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParserException.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParserException.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/file/PaletteTextFileParser.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/PaletteTextFileParser.java
-rename from src/main/java/net/anatolich/cstitch/palette/file/PaletteTextFileParser.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/PaletteTextFileParser.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/file/package-info.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/package-info.java
-rename from src/main/java/net/anatolich/cstitch/palette/file/package-info.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/package-info.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/impl/AnchorPalette.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/AnchorPalette.java
-rename from src/main/java/net/anatolich/cstitch/palette/impl/AnchorPalette.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/AnchorPalette.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/impl/DmcPalette.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/DmcPalette.java
-rename from src/main/java/net/anatolich/cstitch/palette/impl/DmcPalette.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/DmcPalette.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/impl/GammaPalette.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/GammaPalette.java
-rename from src/main/java/net/anatolich/cstitch/palette/impl/GammaPalette.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/GammaPalette.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/impl/MadeiraPalette.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/MadeiraPalette.java
-rename from src/main/java/net/anatolich/cstitch/palette/impl/MadeiraPalette.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/MadeiraPalette.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/impl/PaletteServiceConfiguration.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/PaletteServiceConfiguration.java
-rename from src/main/java/net/anatolich/cstitch/palette/impl/PaletteServiceConfiguration.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/PaletteServiceConfiguration.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/impl/Palettes.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/Palettes.java
-rename from src/main/java/net/anatolich/cstitch/palette/impl/Palettes.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/Palettes.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/impl/PalettesConfiguration.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/PalettesConfiguration.java
-rename from src/main/java/net/anatolich/cstitch/palette/impl/PalettesConfiguration.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/PalettesConfiguration.java
-diff --git a/src/main/java/net/anatolich/cstitch/palette/impl/package-info.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/package-info.java
-rename from src/main/java/net/anatolich/cstitch/palette/impl/package-info.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/package-info.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/Canvas.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/Canvas.java
-rename from src/main/java/net/anatolich/cstitch/schema/Canvas.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/Canvas.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/CanvasChangeListener.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/CanvasChangeListener.java
-rename from src/main/java/net/anatolich/cstitch/schema/CanvasChangeListener.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/CanvasChangeListener.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/CanvasEvent.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/CanvasEvent.java
-rename from src/main/java/net/anatolich/cstitch/schema/CanvasEvent.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/CanvasEvent.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/Coord.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/Coord.java
-rename from src/main/java/net/anatolich/cstitch/schema/Coord.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/Coord.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/DefaultCanvas.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/DefaultCanvas.java
-rename from src/main/java/net/anatolich/cstitch/schema/DefaultCanvas.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/DefaultCanvas.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/DefaultLegend.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/DefaultLegend.java
-rename from src/main/java/net/anatolich/cstitch/schema/DefaultLegend.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/DefaultLegend.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/Legend.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/Legend.java
-rename from src/main/java/net/anatolich/cstitch/schema/Legend.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/Legend.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/LegendChangeListener.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/LegendChangeListener.java
-rename from src/main/java/net/anatolich/cstitch/schema/LegendChangeListener.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/LegendChangeListener.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/file/api/FileService.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/api/FileService.java
-rename from src/main/java/net/anatolich/cstitch/schema/file/api/FileService.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/api/FileService.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/file/api/package-info.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/api/package-info.java
-rename from src/main/java/net/anatolich/cstitch/schema/file/api/package-info.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/api/package-info.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/file/format/api/BadFileFormatException.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/BadFileFormatException.java
-rename from src/main/java/net/anatolich/cstitch/schema/file/format/api/BadFileFormatException.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/BadFileFormatException.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/file/format/api/CanvasReader.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/CanvasReader.java
-rename from src/main/java/net/anatolich/cstitch/schema/file/format/api/CanvasReader.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/CanvasReader.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/file/format/api/CanvasWriter.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/CanvasWriter.java
-rename from src/main/java/net/anatolich/cstitch/schema/file/format/api/CanvasWriter.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/CanvasWriter.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/file/format/api/FileFormat.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/FileFormat.java
-rename from src/main/java/net/anatolich/cstitch/schema/file/format/api/FileFormat.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/FileFormat.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/file/format/api/package-info.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/package-info.java
-rename from src/main/java/net/anatolich/cstitch/schema/file/format/api/package-info.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/file/format/api/package-info.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/package-info.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/package-info.java
-rename from src/main/java/net/anatolich/cstitch/schema/package-info.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/schema/package-info.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/dialogs/CreateSchemaDialog.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/dialogs/CreateSchemaDialog.java
-rename from src/main/java/net/anatolich/cstitch/ui/dialogs/CreateSchemaDialog.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/dialogs/CreateSchemaDialog.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/dialogs/PaletteColorPickerPanel.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/dialogs/PaletteColorPickerPanel.java
-rename from src/main/java/net/anatolich/cstitch/ui/dialogs/PaletteColorPickerPanel.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/dialogs/PaletteColorPickerPanel.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/editor/Grid.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/Grid.java
-rename from src/main/java/net/anatolich/cstitch/ui/editor/Grid.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/Grid.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/editor/JSchemaEditor.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/JSchemaEditor.java
-rename from src/main/java/net/anatolich/cstitch/ui/editor/JSchemaEditor.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/JSchemaEditor.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/editor/legend/JLegendPanel.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/legend/JLegendPanel.java
-rename from src/main/java/net/anatolich/cstitch/ui/editor/legend/JLegendPanel.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/legend/JLegendPanel.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/editor/legend/JLegendPanelBeanInfo.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/legend/JLegendPanelBeanInfo.java
-rename from src/main/java/net/anatolich/cstitch/ui/editor/legend/JLegendPanelBeanInfo.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/legend/JLegendPanelBeanInfo.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/editor/package-info.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/package-info.java
-rename from src/main/java/net/anatolich/cstitch/ui/editor/package-info.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/package-info.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/editor/tools/AbstractTool.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/AbstractTool.java
-rename from src/main/java/net/anatolich/cstitch/ui/editor/tools/AbstractTool.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/AbstractTool.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/editor/tools/PaintTool.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/PaintTool.java
-rename from src/main/java/net/anatolich/cstitch/ui/editor/tools/PaintTool.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/PaintTool.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/editor/tools/Tool.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/Tool.java
-rename from src/main/java/net/anatolich/cstitch/ui/editor/tools/Tool.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/Tool.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/editor/tools/ZoomTool.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/ZoomTool.java
-rename from src/main/java/net/anatolich/cstitch/ui/editor/tools/ZoomTool.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/ZoomTool.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/editor/tools/package-info.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/package-info.java
-rename from src/main/java/net/anatolich/cstitch/ui/editor/tools/package-info.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/package-info.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/editor/tools/service/Tools.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/service/Tools.java
-rename from src/main/java/net/anatolich/cstitch/ui/editor/tools/service/Tools.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/service/Tools.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/editor/tools/service/ToolsModule.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/service/ToolsModule.java
-rename from src/main/java/net/anatolich/cstitch/ui/editor/tools/service/ToolsModule.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/service/ToolsModule.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/editor/tools/service/ToolsProvider.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/service/ToolsProvider.java
-rename from src/main/java/net/anatolich/cstitch/ui/editor/tools/service/ToolsProvider.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/service/ToolsProvider.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/editor/tools/service/ToolsService.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/service/ToolsService.java
-rename from src/main/java/net/anatolich/cstitch/ui/editor/tools/service/ToolsService.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/editor/tools/service/ToolsService.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/validation/JValidationOverlay.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/validation/JValidationOverlay.java
-rename from src/main/java/net/anatolich/cstitch/ui/validation/JValidationOverlay.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/validation/JValidationOverlay.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/validation/UIValidator.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/validation/UIValidator.java
-rename from src/main/java/net/anatolich/cstitch/ui/validation/UIValidator.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/validation/UIValidator.java
-diff --git a/src/main/java/net/anatolich/cstitch/ui/validation/package-info.java b/cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/validation/package-info.java
-rename from src/main/java/net/anatolich/cstitch/ui/validation/package-info.java
-rename to cross-stitch-api/src/main/java/net/anatolich/cstitch/ui/validation/package-info.java
-diff --git a/src/main/resources/net/anatolich/cstitch/palette/impl/AnchorPalette b/cross-stitch-api/src/main/resources/net/anatolich/cstitch/palette/impl/AnchorPalette
-rename from src/main/resources/net/anatolich/cstitch/palette/impl/AnchorPalette
-rename to cross-stitch-api/src/main/resources/net/anatolich/cstitch/palette/impl/AnchorPalette
-diff --git a/src/main/resources/net/anatolich/cstitch/palette/impl/DmcPalette b/cross-stitch-api/src/main/resources/net/anatolich/cstitch/palette/impl/DmcPalette
-rename from src/main/resources/net/anatolich/cstitch/palette/impl/DmcPalette
-rename to cross-stitch-api/src/main/resources/net/anatolich/cstitch/palette/impl/DmcPalette
-diff --git a/src/main/resources/net/anatolich/cstitch/palette/impl/GammaPalette b/cross-stitch-api/src/main/resources/net/anatolich/cstitch/palette/impl/GammaPalette
-rename from src/main/resources/net/anatolich/cstitch/palette/impl/GammaPalette
-rename to cross-stitch-api/src/main/resources/net/anatolich/cstitch/palette/impl/GammaPalette
-diff --git a/src/main/resources/net/anatolich/cstitch/palette/impl/MadeiraPalette b/cross-stitch-api/src/main/resources/net/anatolich/cstitch/palette/impl/MadeiraPalette
-rename from src/main/resources/net/anatolich/cstitch/palette/impl/MadeiraPalette
-rename to cross-stitch-api/src/main/resources/net/anatolich/cstitch/palette/impl/MadeiraPalette
-diff --git a/src/main/resources/net/anatolich/cstitch/ui/editor/tools/paint.png b/cross-stitch-api/src/main/resources/net/anatolich/cstitch/ui/editor/tools/paint.png
-rename from src/main/resources/net/anatolich/cstitch/ui/editor/tools/paint.png
-rename to cross-stitch-api/src/main/resources/net/anatolich/cstitch/ui/editor/tools/paint.png
-diff --git a/src/main/resources/net/anatolich/cstitch/ui/editor/tools/zoom.png b/cross-stitch-api/src/main/resources/net/anatolich/cstitch/ui/editor/tools/zoom.png
-rename from src/main/resources/net/anatolich/cstitch/ui/editor/tools/zoom.png
-rename to cross-stitch-api/src/main/resources/net/anatolich/cstitch/ui/editor/tools/zoom.png
-diff --git a/src/main/resources/net/anatolich/cstitch/ui/validation/warning_16.png b/cross-stitch-api/src/main/resources/net/anatolich/cstitch/ui/validation/warning_16.png
-rename from src/main/resources/net/anatolich/cstitch/ui/validation/warning_16.png
-rename to cross-stitch-api/src/main/resources/net/anatolich/cstitch/ui/validation/warning_16.png
-diff --git a/src/test/java/net/anatolich/cstitch/palette/file/PaletteTextFileParserTest.java b/cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/file/PaletteTextFileParserTest.java
-rename from src/test/java/net/anatolich/cstitch/palette/file/PaletteTextFileParserTest.java
-rename to cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/file/PaletteTextFileParserTest.java
-diff --git a/src/test/java/net/anatolich/cstitch/palette/impl/AnchorPaletteTest.java b/cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/AnchorPaletteTest.java
-rename from src/test/java/net/anatolich/cstitch/palette/impl/AnchorPaletteTest.java
-rename to cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/AnchorPaletteTest.java
-diff --git a/src/test/java/net/anatolich/cstitch/palette/impl/DmcPaletteTest.java b/cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/DmcPaletteTest.java
-rename from src/test/java/net/anatolich/cstitch/palette/impl/DmcPaletteTest.java
-rename to cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/DmcPaletteTest.java
-diff --git a/src/test/java/net/anatolich/cstitch/palette/impl/GammaPaletteTest.java b/cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/GammaPaletteTest.java
-rename from src/test/java/net/anatolich/cstitch/palette/impl/GammaPaletteTest.java
-rename to cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/GammaPaletteTest.java
-diff --git a/src/test/java/net/anatolich/cstitch/palette/impl/MadeiraPaletteTest.java b/cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/MadeiraPaletteTest.java
-rename from src/test/java/net/anatolich/cstitch/palette/impl/MadeiraPaletteTest.java
-rename to cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/MadeiraPaletteTest.java
-diff --git a/src/test/java/net/anatolich/cstitch/palette/impl/PaletteTest.java b/cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/PaletteTest.java
-rename from src/test/java/net/anatolich/cstitch/palette/impl/PaletteTest.java
-rename to cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/PaletteTest.java
-diff --git a/src/test/java/net/anatolich/cstitch/schema/DefaultCanvasTest.java b/cross-stitch-api/src/test/java/net/anatolich/cstitch/schema/DefaultCanvasTest.java
-rename from src/test/java/net/anatolich/cstitch/schema/DefaultCanvasTest.java
-rename to cross-stitch-api/src/test/java/net/anatolich/cstitch/schema/DefaultCanvasTest.java
-diff --git a/src/test/java/net/anatolich/cstitch/ui/validation/UIValidatorTest.java b/cross-stitch-api/src/test/java/net/anatolich/cstitch/ui/validation/UIValidatorTest.java
-rename from src/test/java/net/anatolich/cstitch/ui/validation/UIValidatorTest.java
-rename to cross-stitch-api/src/test/java/net/anatolich/cstitch/ui/validation/UIValidatorTest.java
-diff --git a/cross-stitch-app/pom.xml b/cross-stitch-app/pom.xml
-new file mode 100644
---- /dev/null
-+++ b/cross-stitch-app/pom.xml
-@@ -0,0 +1,37 @@
-+<?xml version="1.0"?>
-+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-+  <modelVersion>4.0.0</modelVersion>
-+  <parent>
-+    <groupId>net.anatolich.cstitch</groupId>
-+    <artifactId>cross-stitch</artifactId>
-+    <version>1.0-SNAPSHOT</version>
-+  </parent>
-+  
-+  <artifactId>cross-stitch-app</artifactId>
-+  <version>1.0-SNAPSHOT</version>
-+  <name>cross-stitch-app</name>
-+  
-+  <dependencies>
-+    <dependency>
-+      <groupId>junit</groupId>
-+      <artifactId>junit</artifactId>
-+      <scope>test</scope>
-+    </dependency>
-+    <dependency>
-+      <groupId>com.google.inject</groupId>
-+      <artifactId>guice</artifactId>
-+      <version>3.0</version>
-+    </dependency>
-+    <dependency>
-+      <groupId>${project.groupId}</groupId>
-+      <artifactId>cross-stitch-api</artifactId>
-+      <version>${project.version}</version>
-+    </dependency>
-+    <dependency>
-+      <groupId>${project.groupId}</groupId>
-+      <artifactId>cross-stitch-fileservice-impl</artifactId>
-+      <version>${project.version}</version>
-+    </dependency>
-+  </dependencies>
-+</project>
-diff --git a/src/main/java/net/anatolich/cstitch/Application.java b/cross-stitch-app/src/main/java/net/anatolich/cstitch/Application.java
-rename from src/main/java/net/anatolich/cstitch/Application.java
-rename to cross-stitch-app/src/main/java/net/anatolich/cstitch/Application.java
---- a/src/main/java/net/anatolich/cstitch/Application.java
-+++ b/cross-stitch-app/src/main/java/net/anatolich/cstitch/Application.java
-@@ -18,10 +18,8 @@
- import com.google.inject.Guice;
- import com.google.inject.Injector;
- import javax.swing.SwingUtilities;
-+import net.anatolich.cstitch.palette.impl.PaletteServiceConfiguration;
- import net.anatolich.cstitch.palette.impl.PalettesConfiguration;
--import net.anatolich.cstitch.palette.impl.PaletteServiceConfiguration;
--import net.anatolich.cstitch.schema.file.format.impl.FileFormatConfiguration;
--import net.anatolich.cstitch.schema.file.impl.FileServiceConfiguration;
- import net.anatolich.cstitch.ui.editor.tools.service.ToolsModule;
- 
- /**
-@@ -32,20 +30,18 @@
- public class Application {
- 
-     public static void main(String[] args) {
--
-+        
-         SwingUtilities.invokeLater(new Runnable() {
- 
-             @Override
-             public void run() {
-                 final Injector injector = Guice.createInjector(
--                        new DIConfiguration(),
-+                        new UIConfiguration(),
-                         new ToolsModule(),
-                         new PaletteServiceConfiguration(),
-                         new PalettesConfiguration(), 
--                        new FileServiceConfiguration(),
--                        new FileFormatConfiguration());
--                Lookup.init(injector);
--                MainWindow mainWindow = Lookup.getInstance().lookup(MainWindow.class);
-+                        new ServiceConfiguration());
-+                MainWindow mainWindow = injector.getInstance(MainWindow.class);
-                 mainWindow.initialize();
-             }
-         });
-diff --git a/src/main/java/net/anatolich/cstitch/MainWindow.java b/cross-stitch-app/src/main/java/net/anatolich/cstitch/MainWindow.java
-rename from src/main/java/net/anatolich/cstitch/MainWindow.java
-rename to cross-stitch-app/src/main/java/net/anatolich/cstitch/MainWindow.java
---- a/src/main/java/net/anatolich/cstitch/MainWindow.java
-+++ b/cross-stitch-app/src/main/java/net/anatolich/cstitch/MainWindow.java
-@@ -125,12 +125,10 @@
-         toolbar = new JToolBar("editorToolbar", JToolBar.VERTICAL);        
-         add(toolbar, BorderLayout.WEST);
- 
--        ToolsService toolManager = Lookup.getInstance().lookup(ToolsService.class);
--
-         ButtonGroup toolsMenuGroup = new ButtonGroup();
-         ButtonGroup toolsToolbarGroup = new ButtonGroup();
- 
--        for (Tool tool : toolManager.getTools()) {
-+        for (Tool tool : toolsService.getTools()) {
-             final AbstractAction toolAction = tool.createToolAction(schemaEditor);
-             final JRadioButtonMenuItem toolMenuItem = new JRadioButtonMenuItem(toolAction);
-             menuTools.add(toolMenuItem);
-diff --git a/cross-stitch-app/src/main/java/net/anatolich/cstitch/ServiceConfiguration.java b/cross-stitch-app/src/main/java/net/anatolich/cstitch/ServiceConfiguration.java
-new file mode 100644
---- /dev/null
-+++ b/cross-stitch-app/src/main/java/net/anatolich/cstitch/ServiceConfiguration.java
-@@ -0,0 +1,44 @@
-+/*
-+ * Copyright 2012 dmytro.
-+ *
-+ * Licensed 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 net.anatolich.cstitch;
-+
-+import com.google.inject.AbstractModule;
-+import com.google.inject.Module;
-+import java.util.Iterator;
-+import java.util.ServiceLoader;
-+
-+/**
-+ * Loads modules registered by java extension registration mechanism. 
-+ * Uses {@link ServiceLoader} internally.
-+ * 
-+ * @author dmytro
-+ * @since 1.0
-+ * @version 1.0
-+ */
-+public class ServiceConfiguration extends AbstractModule {
-+
-+    @Override
-+    protected void configure() {
-+        ServiceLoader<Module> serviceModulesLoader = ServiceLoader.load(Module.class);
-+        Iterator<Module> servicesIterator = serviceModulesLoader.iterator();
-+        while (servicesIterator.hasNext()) {
-+            Module module = servicesIterator.next();
-+            install(module);
-+            
-+        }
-+    }
-+    
-+}
-diff --git a/src/main/java/net/anatolich/cstitch/DIConfiguration.java b/cross-stitch-app/src/main/java/net/anatolich/cstitch/UIConfiguration.java
-rename from src/main/java/net/anatolich/cstitch/DIConfiguration.java
-rename to cross-stitch-app/src/main/java/net/anatolich/cstitch/UIConfiguration.java
---- a/src/main/java/net/anatolich/cstitch/DIConfiguration.java
-+++ b/cross-stitch-app/src/main/java/net/anatolich/cstitch/UIConfiguration.java
-@@ -21,7 +21,7 @@
-  *
-  * @author anatolich
-  */
--public class DIConfiguration extends AbstractModule {
-+public class UIConfiguration extends AbstractModule {
- 
-     @Override
-     protected void configure() {
-diff --git a/cross-stitch-fileservice-impl/pom.xml b/cross-stitch-fileservice-impl/pom.xml
-new file mode 100644
---- /dev/null
-+++ b/cross-stitch-fileservice-impl/pom.xml
-@@ -0,0 +1,31 @@
-+<?xml version="1.0"?>
-+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-+    <modelVersion>4.0.0</modelVersion>
-+    <parent>
-+        <groupId>net.anatolich.cstitch</groupId>
-+        <artifactId>cross-stitch</artifactId>
-+        <version>1.0-SNAPSHOT</version>
-+    </parent>
-+    
-+    <artifactId>cross-stitch-fileservice-impl</artifactId>
-+    <name>cross-stitch-fileservice-impl</name>
-+  
-+    <dependencies>
-+        <dependency>
-+            <groupId>junit</groupId>
-+            <artifactId>junit</artifactId>
-+            <scope>test</scope>
-+        </dependency>
-+        <dependency>
-+            <groupId>net.anatolich.cstitch</groupId>
-+            <artifactId>cross-stitch-api</artifactId>
-+            <version>1.0-SNAPSHOT</version>
-+        </dependency>
-+        <dependency>
-+            <groupId>org.easymock</groupId>
-+            <artifactId>easymock</artifactId>
-+            <scope>test</scope>
-+        </dependency>
-+    </dependencies>
-+</project>
-diff --git a/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultCanvasReader.java b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultCanvasReader.java
-rename from src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultCanvasReader.java
-rename to cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultCanvasReader.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultCanvasWriter.java b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultCanvasWriter.java
-rename from src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultCanvasWriter.java
-rename to cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultCanvasWriter.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultFileFormat.java b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultFileFormat.java
-rename from src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultFileFormat.java
-rename to cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/DefaultFileFormat.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/file/format/impl/FileFormatConfiguration.java b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/FileFormatConfiguration.java
-rename from src/main/java/net/anatolich/cstitch/schema/file/format/impl/FileFormatConfiguration.java
-rename to cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/format/impl/FileFormatConfiguration.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceConfiguration.java b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceConfiguration.java
-rename from src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceConfiguration.java
-rename to cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceConfiguration.java
---- a/src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceConfiguration.java
-+++ b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceConfiguration.java
-@@ -25,6 +25,7 @@
- import net.anatolich.cstitch.schema.file.api.FileService;
- 
- import java.util.prefs.Preferences;
-+import net.anatolich.cstitch.schema.file.format.impl.FileFormatConfiguration;
- 
- /**
-  *
-@@ -34,6 +35,8 @@
- 
-     @Override
-     protected void configure() {
-+        install(new FileFormatConfiguration());
-+        
-         bind(FileService.class).to(FileServiceImpl.class).in(Singleton.class);
- 
-         bind(RecentFileList.class).to(RecentFilesListImpl.class);
-diff --git a/src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceImpl.java b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceImpl.java
-rename from src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceImpl.java
-rename to cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/FileServiceImpl.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/file/impl/RecentFileList.java b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/RecentFileList.java
-rename from src/main/java/net/anatolich/cstitch/schema/file/impl/RecentFileList.java
-rename to cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/RecentFileList.java
-diff --git a/src/main/java/net/anatolich/cstitch/schema/file/impl/RecentFilesListImpl.java b/cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/RecentFilesListImpl.java
-rename from src/main/java/net/anatolich/cstitch/schema/file/impl/RecentFilesListImpl.java
-rename to cross-stitch-fileservice-impl/src/main/java/net/anatolich/cstitch/schema/file/impl/RecentFilesListImpl.java
-diff --git a/cross-stitch-fileservice-impl/src/main/resources/META-INF/services/com.google.inject.Module b/cross-stitch-fileservice-impl/src/main/resources/META-INF/services/com.google.inject.Module
-new file mode 100644
---- /dev/null
-+++ b/cross-stitch-fileservice-impl/src/main/resources/META-INF/services/com.google.inject.Module
-@@ -0,0 +1,1 @@
-+net.anatolich.cstitch.schema.file.impl.FileServiceConfiguration
-\ No newline at end of file
-diff --git a/src/test/java/net/anatolich/cstitch/schema/file/impl/FileServiceImplTest.java b/cross-stitch-fileservice-impl/src/test/java/net/anatolich/cstitch/schema/file/impl/FileServiceImplTest.java
-rename from src/test/java/net/anatolich/cstitch/schema/file/impl/FileServiceImplTest.java
-rename to cross-stitch-fileservice-impl/src/test/java/net/anatolich/cstitch/schema/file/impl/FileServiceImplTest.java
---- a/src/test/java/net/anatolich/cstitch/schema/file/impl/FileServiceImplTest.java
-+++ b/cross-stitch-fileservice-impl/src/test/java/net/anatolich/cstitch/schema/file/impl/FileServiceImplTest.java
-@@ -15,20 +15,16 @@
-  */
- package net.anatolich.cstitch.schema.file.impl;
- 
--import net.anatolich.cstitch.schema.file.impl.RecentFileList;
--import net.anatolich.cstitch.schema.file.impl.FileServiceImpl;
-+import java.io.*;
-+import net.anatolich.cstitch.schema.Canvas;
-+import net.anatolich.cstitch.schema.DefaultCanvas;
- import net.anatolich.cstitch.schema.file.format.api.CanvasReader;
- import net.anatolich.cstitch.schema.file.format.api.CanvasWriter;
--import java.io.*;
--import java.util.List;
--import java.util.prefs.Preferences;
--import net.anatolich.cstitch.schema.Canvas;
--import net.anatolich.cstitch.schema.DefaultCanvas;
- import net.anatolich.cstitch.schema.file.format.api.FileFormat;
--import org.easymock.EasyMock;
- import static org.easymock.EasyMock.*;
- import org.junit.After;
--import static org.junit.Assert.*;
-+import static org.junit.Assert.assertNull;
-+import static org.junit.Assert.fail;
- import org.junit.Before;
- import org.junit.Test;
- 
-diff --git a/src/test/java/net/anatolich/cstitch/schema/file/impl/RecentFilesListImplTest.java b/cross-stitch-fileservice-impl/src/test/java/net/anatolich/cstitch/schema/file/impl/RecentFilesListImplTest.java
-rename from src/test/java/net/anatolich/cstitch/schema/file/impl/RecentFilesListImplTest.java
-rename to cross-stitch-fileservice-impl/src/test/java/net/anatolich/cstitch/schema/file/impl/RecentFilesListImplTest.java
-diff --git a/pom.xml b/pom.xml
---- a/pom.xml
-+++ b/pom.xml
-@@ -1,12 +1,11 @@
--
--<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/xsd/maven-4.0.0.xsd">
-+<?xml version="1.0" encoding="UTF-8"?>
-+<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/xsd/maven-4.0.0.xsd">
-     <modelVersion>4.0.0</modelVersion>
- 
-     <groupId>net.anatolich.cstitch</groupId>
-     <artifactId>cross-stitch</artifactId>
-     <version>1.0-SNAPSHOT</version>
--    <packaging>jar</packaging>
-+    <packaging>pom</packaging>
- 
-     <name>cross-stitch</name>
-     <url>https://bitbucket.org/dimasmith/cross-stitch/overview</url>
-@@ -71,62 +70,70 @@
-         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-     </properties>
- 
--    <dependencies>
--        <dependency>
--            <groupId>junit</groupId>
--            <artifactId>junit</artifactId>
--            <version>4.10</version>
--            <scope>test</scope>
--        </dependency>
--        <dependency>
--            <groupId>ch.qos.logback</groupId>
--            <artifactId>logback-classic</artifactId>
--            <version>1.0.0</version>
--        </dependency>
--        <dependency>
--            <artifactId>slf4j-api</artifactId>
--            <groupId>org.slf4j</groupId>
--            <type>jar</type>
--            <version>1.6.4</version>
--        </dependency>
--        <dependency>
--            <groupId>com.google.inject</groupId>
--            <artifactId>guice</artifactId>
--            <version>3.0</version>
--        </dependency>
--        <dependency>
--            <groupId>com.google.guava</groupId>
--            <artifactId>guava</artifactId>
--            <version>11.0.1</version>
--        </dependency>
--        <dependency>
--            <groupId>org.easytesting</groupId>
--            <artifactId>fest-swing</artifactId>
--            <version>1.2.1</version>
--            <scope>test</scope>
--        </dependency>
--        <dependency>
--            <groupId>org.easytesting</groupId>
--            <artifactId>fest-reflect</artifactId>
--            <version>1.2</version>
--            <scope>test</scope>
--        </dependency>
--        <dependency>
--            <groupId>com.google.inject.extensions</groupId>
--            <artifactId>guice-multibindings</artifactId>
--            <version>3.0</version>
--        </dependency>
--        <dependency>
--            <groupId>org.easymock</groupId>
--            <artifactId>easymock</artifactId>
--            <version>3.1</version>
--            <scope>test</scope>
--        </dependency>
--        <dependency>
--            <groupId>org.easymock</groupId>
--            <artifactId>easymockclassextension</artifactId>
--            <version>3.1</version>
--            <scope>test</scope>
--        </dependency>
--    </dependencies>
--</project>
-+    <dependencyManagement>
-+        <dependencies>
-+            <dependency>
-+                <groupId>junit</groupId>
-+                <artifactId>junit</artifactId>
-+                <version>4.10</version>
-+                <scope>test</scope>
-+            </dependency>
-+            <dependency>
-+                <groupId>ch.qos.logback</groupId>
-+                <artifactId>logback-classic</artifactId>
-+                <version>1.0.0</version>
-+            </dependency>
-+            <dependency>
-+                <artifactId>slf4j-api</artifactId>
-+                <groupId>org.slf4j</groupId>
-+                <type>jar</type>
-+                <version>1.6.4</version>
-+            </dependency>
-+            <dependency>
-+                <groupId>com.google.inject</groupId>
-+                <artifactId>guice</artifactId>
-+                <version>3.0</version>
-+            </dependency>
-+            <dependency>
-+                <groupId>com.google.guava</groupId>
-+                <artifactId>guava</artifactId>
-+                <version>11.0.1</version>
-+            </dependency>
-+            <dependency>
-+                <groupId>org.easytesting</groupId>
-+                <artifactId>fest-swing</artifactId>
-+                <version>1.2.1</version>
-+                <scope>test</scope>
-+            </dependency>
-+            <dependency>
-+                <groupId>org.easytesting</groupId>
-+                <artifactId>fest-reflect</artifactId>
-+                <version>1.2</version>
-+                <scope>test</scope>
-+            </dependency>
-+            <dependency>
-+                <groupId>com.google.inject.extensions</groupId>
-+                <artifactId>guice-multibindings</artifactId>
-+                <version>3.0</version>
-+            </dependency>
-+            <dependency>
-+                <groupId>org.easymock</groupId>
-+                <artifactId>easymock</artifactId>
-+                <version>3.1</version>
-+                <scope>test</scope>
-+            </dependency>
-+            <dependency>
-+                <groupId>org.easymock</groupId>
-+                <artifactId>easymockclassextension</artifactId>
-+                <version>3.1</version>
-+                <scope>test</scope>
-+            </dependency>
-+        </dependencies>
-+    </dependencyManagement>
-+    
-+    <modules>
-+        <module>cross-stitch-api</module>
-+        <module>cross-stitch-fileservice-impl</module>
-+    <module>cross-stitch-app</module>
-+  </modules>
-+</project>
-\ No newline at end of file
-diff --git a/src/main/java/net/anatolich/cstitch/Lookup.java b/src/main/java/net/anatolich/cstitch/Lookup.java
-deleted file mode 100644
---- a/src/main/java/net/anatolich/cstitch/Lookup.java
-+++ /dev/null
-@@ -1,52 +0,0 @@
--/*
-- * Copyright 2012 anatolich.
-- *
-- * Licensed 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 net.anatolich.cstitch;
--
--import com.google.inject.Injector;
--
--/**
-- * Application-wide component registry.
-- * 
-- * @author anatolich
-- */
--public class Lookup {
--
--    private static Injector injector;
--    
--    private Lookup() {
--    }
--    
--    static void init(Injector itor){
--        injector = itor;
--        instance = new Lookup();
--    }
--    
--    private static Lookup instance;
--
--    public static Lookup getInstance() {
--        return instance;
--    }
--    
--    public <T> T lookup(Class<T> clazz){
--        return injector.getInstance(clazz);
--    }
--    
--    public void injectMembers(Object instance){
--        injector.injectMembers(instance);
--    }
--    
--    
--}

paletteApi

-# HG changeset patch
-# Parent 8e7981be17ae6ad1afa0706f47aca8fa227b5791
-Refactoring palette API
-
-diff -r 8e7981be17ae -r f59ad7eb82f3 cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/PaletteColor.java
---- a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/PaletteColor.java	Tue Apr 10 16:28:15 2012 +0300
-+++ b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/PaletteColor.java	Tue Apr 10 17:10:57 2012 +0300
-@@ -16,6 +16,13 @@
- package net.anatolich.cstitch.palette.api;
- 
- import java.awt.Color;
-+import java.awt.PaintContext;
-+import java.awt.Rectangle;
-+import java.awt.RenderingHints;
-+import java.awt.color.ColorSpace;
-+import java.awt.geom.AffineTransform;
-+import java.awt.geom.Rectangle2D;
-+import java.awt.image.ColorModel;
- import java.util.Collections;
- import java.util.List;
- 
-@@ -26,11 +33,11 @@
-  * @since 1.0
-  * @version 1.0
-  */
--public class PaletteColor extends Color {
-+public final class PaletteColor extends Color {
- 
--    private String name;
--    private Color color;
--    private Palette palette;
-+    private final String name;
-+    private final Color color;
-+    private final Palette palette;
- 
-     public static class Builder {
- 
-@@ -46,7 +53,7 @@
-         }
- 
-         public Builder setColor(Color color) {
--            if ( color == null ) {
-+            if (color == null) {
-                 throw new NullPointerException("color parameter cannot be null");
-             }
-             this.color = color;
-@@ -54,7 +61,7 @@
-         }
- 
-         public Builder setName(String name) {
--            if ( name == null ) {
-+            if (name == null) {
-                 throw new NullPointerException("Name cannot be null");
-             }
-             this.name = name;
-@@ -62,7 +69,7 @@
-         }
- 
-         public Builder setPalette(Palette palette) {
--            if ( palette == null ) {
-+            if (palette == null) {
-                 throw new NullPointerException("palette cannot be null");
-             }
-             this.palette = palette;
-@@ -70,7 +77,6 @@
-         }
-     }
- 
--    // TODO - introduce something better than null as palette.
-     /**
-      * Constructs ...
-      *
-@@ -79,12 +85,13 @@
-      * @param color
-      */
-     public PaletteColor(String name, Color color) {
--        super(color.getRed(), color.getGreen(), color.getBlue());
--        if ( name == null ) {
-+        super(color.getRGB());
-+        if (name == null) {
-             throw new NullPointerException("Color name cannot be null");
-         }
-         this.name = name;
-         this.color = color;
-+        this.palette = new OneColorPalette();
-     }
- 
-     /**
-@@ -96,12 +103,18 @@
-      * @param palette
-      */
-     public PaletteColor(String name, Color color, Palette palette) {
--        this(name, color);
--        if ( palette == null ) {
--            this.palette = new OneColorPalette();
--        } else {
--            this.palette = palette;
-+        super(color.getRGB());
-+        if (name == null) {
-+            throw new NullPointerException("Color name cannot be null");
-         }
-+
-+        if (palette == null) {
-+            throw new NullPointerException("Palette cannot be null");
-+        }
-+
-+        this.color = color;
-+        this.name = name;
-+        this.palette = palette;
-     }
- 
-     private PaletteColor(Builder builder) {
-@@ -110,30 +123,30 @@
- 
-     @Override
-     public boolean equals(Object obj) {
--        if ( obj == null ) {
-+        if (obj == null) {
-             return false;
-         }
- 
--        if ( obj.getClass() == Color.class ) {
-+        if (obj.getClass() == Color.class) {
-             return color.equals(obj);
-         }
- 
--        if ( getClass() != obj.getClass() ) {
-+        if (getClass() != obj.getClass()) {
-             return false;
-         }
- 
-         final PaletteColor other = (PaletteColor) obj;
- 
--        if ( (this.name == null) ? (other.name != null)
--                : !this.name.equals(other.name) ) {
-+        if ((this.name == null) ? (other.name != null)
-+                : !this.name.equals(other.name)) {
-             return false;
-         }
- 
--        if ( (this.color != other.color) && ((this.color == null) || !this.color.equals(other.color)) ) {
-+        if ((this.color != other.color) && ((this.color == null) || !this.color.equals(other.color))) {
-             return false;
-         }
- 
--        if ( (this.palette != other.palette) && ((this.palette == null) || !this.palette.equals(other.palette)) ) {
-+        if ((this.palette != other.palette) && ((this.palette == null) || !this.palette.equals(other.palette))) {
-             return false;
-         }
- 
-@@ -197,5 +210,22 @@
-         public String getName() {
-             return paletteName;
-         }
-+
-+        @Override
-+        public boolean equals(Object obj) {
-+            if (obj == null) {
-+                return false;
-+            }
-+            if (getClass() != obj.getClass()) {
-+                return false;
-+            }            
-+            return true;
-+        }
-+
-+        @Override
-+        public int hashCode() {
-+            int hash = 7;
-+            return hash;
-+        }        
-     }
- }

paletteApiImprove

-# HG changeset patch
-# Parent 3ab8a1a57ace0bc004b6a0a678d9c4dc5e220aad
-Improving palette API after modularization
-
-diff -r 3ab8a1a57ace cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/Palette.java
---- a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/Palette.java	Tue Apr 10 17:53:37 2012 +0300
-+++ b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/Palette.java	Tue Apr 10 18:32:52 2012 +0300
-@@ -18,7 +18,7 @@
- import java.util.List;
- 
- /**
-- * Sewing threads color palette.
-+ * Palette containing set of named colors. Palettes are often related to 
-  *
-  * @author anatolich
-  * @since 1.0
-diff -r 3ab8a1a57ace cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/PaletteColor.java
---- a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/PaletteColor.java	Tue Apr 10 17:53:37 2012 +0300
-+++ b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/PaletteColor.java	Tue Apr 10 18:32:52 2012 +0300
-@@ -16,13 +16,6 @@
- package net.anatolich.cstitch.palette.api;
- 
- import java.awt.Color;
--import java.awt.PaintContext;
--import java.awt.Rectangle;
--import java.awt.RenderingHints;
--import java.awt.color.ColorSpace;
--import java.awt.geom.AffineTransform;
--import java.awt.geom.Rectangle2D;
--import java.awt.image.ColorModel;
- import java.util.Collections;
- import java.util.List;
- 
-@@ -39,6 +32,29 @@
-     private final Color color;
-     private final Palette palette;
- 
-+    /**
-+     * <p>Builds instance of PaletteColor in sequential manner. In case you don't
-+     * have all necessary attributes for PaletteColor instance creation at a
-+     * single moment of time you can use builder to defer creation of color.
-+     * Here is example of palette builder usage:</p>
-+     * <pre>
-+     * {@code 
-+     * PaletteColor.Builder builder = new PaletteColor.Builder();
-+     * builder.setColor(color).setName(name);
-+     * // Some code to retrieve template
-+     * builder.setPalette(palette);
-+     *
-+     * // Creating instance of PaletteColor
-+     * PaletteColor paletteColor = builder.build();
-+     * }
-+     * </pre>
-+     * <p>All setters are returnig Builder instance so setters invocation
-+     * can be chained. When all parameters are set you need to invoke {@link #build()
-+     * } method to rertieve configured instance. You can also create several
-+     * instances with similar settings (like some different colors of the same
-+     * palette) by just setting values that changed and calling
-+     * {@link #build()}.</p>
-+     */
-     public static class Builder {
- 
-         private String name;
-@@ -48,6 +64,13 @@
-         public Builder() {
-         }
- 
-+        /**
-+         * Creates instance of palette color using provided properties.
-+         *
-+         * @return new PaletteColor instance configured by data provided by 
-+         * setters.
-+         * @throws NullPointerException when either color or name was not specified.
-+         */
-         public PaletteColor build() {
-             return new PaletteColor(this);
-         }
-@@ -78,11 +101,14 @@
-     }
- 
-     /**
--     * Constructs ...
-+     * Creates palette color included into singe color palette. This should be
-+     * used only for special cases such as background colors or colors of
-+     * unknown palette. When comparing colors of single color palette then only
-+     * color and color name checked for equality.
-      *
--     *
--     * @param name
--     * @param color
-+     * @param name name of color in palette.
-+     * @param color color.
-+     * @throws NullPointerException when any parameter is null.
-      */
-     public PaletteColor(String name, Color color) {
-         super(color.getRGB());
-@@ -95,26 +121,28 @@
-     }
- 
-     /**
--     * Constructs ...
-+     * Creates named palette color included into provided palette. It's generally
-+     * not possible to change palette after palette color construction. If you
-+     * need to specify palette later look into {@link Builder} approach.
-      *
--     *
--     * @param name
--     * @param color
--     * @param palette
-+     * @param name name of color in palette.
-+     * @param color color.
-+     * @param palette palette that holds a color. If set to null then color is
-+     * wrapped into special single color palette.
-+     * @throws NullPointerException color of name is null.
-      */
-     public PaletteColor(String name, Color color, Palette palette) {
-         super(color.getRGB());
-         if (name == null) {
-             throw new NullPointerException("Color name cannot be null");
-         }
--
--        if (palette == null) {
--            throw new NullPointerException("Palette cannot be null");
--        }
--
-         this.color = color;
-         this.name = name;
--        this.palette = palette;
-+        if (palette == null) {
-+            this.palette = new OneColorPalette();
-+        } else {
-+            this.palette = palette;
-+        }
-     }
- 
-     private PaletteColor(Builder builder) {
-@@ -218,7 +246,7 @@
-             }
-             if (getClass() != obj.getClass()) {
-                 return false;
--            }            
-+            }
-             return true;
-         }
- 
-@@ -226,6 +254,6 @@
-         public int hashCode() {
-             int hash = 7;
-             return hash;
--        }        
-+        }
-     }
- }
-diff -r 3ab8a1a57ace cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/PaletteService.java
---- a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/PaletteService.java	Tue Apr 10 17:53:37 2012 +0300
-+++ b/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/api/PaletteService.java	Tue Apr 10 18:32:52 2012 +0300
-@@ -16,10 +16,9 @@
- package net.anatolich.cstitch.palette.api;
- 
- import java.util.List;
--import net.anatolich.cstitch.palette.api.Palette;
- 
- /**
-- *
-+ * Manages list of palettes available in system.
-  * @author anatolich
-  */
- public interface PaletteService {

paletteImpl

-# HG changeset patch
-# Parent c380765f986127f4fe6657ae37577f1df56479eb
-Palette service implementation module
-
-diff --git a/cross-stitch-app/pom.xml b/cross-stitch-app/pom.xml
---- a/cross-stitch-app/pom.xml
-+++ b/cross-stitch-app/pom.xml
-@@ -32,5 +32,10 @@
-       <artifactId>fileservice-impl</artifactId>
-       <version>${project.version}</version>
-     </dependency>
-+    <dependency>
-+      <groupId>net.anatolich.cstitch.impl</groupId>
-+      <artifactId>palettes-impl</artifactId>
-+      <version>${project.version}</version>
-+    </dependency>
-   </dependencies>
- </project>
-diff --git a/cross-stitch-app/src/main/java/net/anatolich/cstitch/Application.java b/cross-stitch-app/src/main/java/net/anatolich/cstitch/Application.java
---- a/cross-stitch-app/src/main/java/net/anatolich/cstitch/Application.java
-+++ b/cross-stitch-app/src/main/java/net/anatolich/cstitch/Application.java
-@@ -38,8 +38,6 @@
-                 final Injector injector = Guice.createInjector(
-                         new UIConfiguration(),
-                         new ToolsModule(),
--                        new PaletteServiceConfiguration(),
--                        new PalettesConfiguration(), 
-                         new ServiceConfiguration());
-                 MainWindow mainWindow = injector.getInstance(MainWindow.class);
-                 mainWindow.initialize();
-diff --git a/palettes-impl/pom.xml b/palettes-impl/pom.xml
-new file mode 100644
---- /dev/null
-+++ b/palettes-impl/pom.xml
-@@ -0,0 +1,27 @@
-+<?xml version="1.0"?>
-+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-+  <modelVersion>4.0.0</modelVersion>
-+  <parent>
-+    <groupId>net.anatolich.cstitch</groupId>
-+    <artifactId>cross-stitch</artifactId>
-+    <version>1.0-SNAPSHOT</version>
-+  </parent>
-+  
-+  <groupId>net.anatolich.cstitch.impl</groupId>
-+  <artifactId>palettes-impl</artifactId>
-+  <name>palettes-impl</name>
-+
-+  <dependencies>
-+    <dependency>
-+      <groupId>junit</groupId>
-+      <artifactId>junit</artifactId>
-+      <scope>test</scope>
-+    </dependency>
-+    <dependency>
-+      <groupId>net.anatolich.cstitch</groupId>
-+      <artifactId>cross-stitch-api</artifactId>
-+      <version>1.0-SNAPSHOT</version>
-+    </dependency>
-+  </dependencies>
-+</project>
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/AbstractFilePalette.java b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/AbstractFilePalette.java
-rename from cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/AbstractFilePalette.java
-rename to palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/AbstractFilePalette.java
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/AbstractPaletteFileParser.java b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/AbstractPaletteFileParser.java
-rename from cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/AbstractPaletteFileParser.java
-rename to palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/AbstractPaletteFileParser.java
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParser.java b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParser.java
-rename from cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParser.java
-rename to palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParser.java
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParserException.java b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParserException.java
-rename from cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParserException.java
-rename to palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParserException.java
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/PaletteTextFileParser.java b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/PaletteTextFileParser.java
-rename from cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/PaletteTextFileParser.java
-rename to palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/PaletteTextFileParser.java
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/package-info.java b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/package-info.java
-rename from cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/file/package-info.java
-rename to palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/package-info.java
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/AnchorPalette.java b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/AnchorPalette.java
-rename from cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/AnchorPalette.java
-rename to palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/AnchorPalette.java
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/DmcPalette.java b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/DmcPalette.java
-rename from cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/DmcPalette.java
-rename to palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/DmcPalette.java
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/GammaPalette.java b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/GammaPalette.java
-rename from cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/GammaPalette.java
-rename to palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/GammaPalette.java
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/MadeiraPalette.java b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/MadeiraPalette.java
-rename from cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/MadeiraPalette.java
-rename to palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/MadeiraPalette.java
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/PaletteServiceConfiguration.java b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/PaletteServiceConfiguration.java
-rename from cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/PaletteServiceConfiguration.java
-rename to palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/PaletteServiceConfiguration.java
---- a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/PaletteServiceConfiguration.java
-+++ b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/PaletteServiceConfiguration.java
-@@ -15,7 +15,6 @@
-  */
- package net.anatolich.cstitch.palette.impl;
- 
--import net.anatolich.cstitch.palette.impl.Palettes;
- import com.google.inject.AbstractModule;
- import com.google.inject.Singleton;
- import net.anatolich.cstitch.palette.api.PaletteService;
-@@ -28,6 +27,7 @@
- 
-     @Override
-     protected void configure() {
-+        install(new PalettesConfiguration());
-         bind(PaletteService.class).to(Palettes.class).in(Singleton.class);
-     }
-     
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/Palettes.java b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/Palettes.java
-rename from cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/Palettes.java
-rename to palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/Palettes.java
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/PalettesConfiguration.java b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/PalettesConfiguration.java
-rename from cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/PalettesConfiguration.java
-rename to palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/PalettesConfiguration.java
-diff --git a/cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/package-info.java b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/package-info.java
-rename from cross-stitch-api/src/main/java/net/anatolich/cstitch/palette/impl/package-info.java
-rename to palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/package-info.java
-diff --git a/palettes-impl/src/main/resources/META-INF/services/com.google.inject.Module b/palettes-impl/src/main/resources/META-INF/services/com.google.inject.Module
-new file mode 100644
---- /dev/null
-+++ b/palettes-impl/src/main/resources/META-INF/services/com.google.inject.Module
-@@ -0,0 +1,1 @@
-+net.anatolich.cstitch.palette.impl.PaletteServiceConfiguration
-\ No newline at end of file
-diff --git a/cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/file/PaletteTextFileParserTest.java b/palettes-impl/src/test/java/net/anatolich/cstitch/palette/file/PaletteTextFileParserTest.java
-rename from cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/file/PaletteTextFileParserTest.java
-rename to palettes-impl/src/test/java/net/anatolich/cstitch/palette/file/PaletteTextFileParserTest.java
-diff --git a/cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/AnchorPaletteTest.java b/palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/AnchorPaletteTest.java
-rename from cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/AnchorPaletteTest.java
-rename to palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/AnchorPaletteTest.java
-diff --git a/cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/DmcPaletteTest.java b/palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/DmcPaletteTest.java
-rename from cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/DmcPaletteTest.java
-rename to palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/DmcPaletteTest.java
-diff --git a/cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/GammaPaletteTest.java b/palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/GammaPaletteTest.java
-rename from cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/GammaPaletteTest.java
-rename to palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/GammaPaletteTest.java
-diff --git a/cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/MadeiraPaletteTest.java b/palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/MadeiraPaletteTest.java
-rename from cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/MadeiraPaletteTest.java
-rename to palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/MadeiraPaletteTest.java
-diff --git a/cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/PaletteTest.java b/palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/PaletteTest.java
-rename from cross-stitch-api/src/test/java/net/anatolich/cstitch/palette/impl/PaletteTest.java
-rename to palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/PaletteTest.java
-diff --git a/pom.xml b/pom.xml
---- a/pom.xml
-+++ b/pom.xml
-@@ -135,5 +135,6 @@
-         <module>cross-stitch-api</module>
-         <module>cross-stitch-fileservice-impl</module>
-     <module>cross-stitch-app</module>
-+    <module>palettes-impl</module>
-   </modules>
- </project>
-\ No newline at end of file
-modularity
-fileServiceImpl
-paletteApi
-paletteImpl
-paletteApiImprove
-applicationStartup
-splitPaletteServiceAndActualPalettes
 # Placed by Bitbucket

splitPaletteServiceAndActualPalettes

-# HG changeset patch
-# Parent ac00eb227a4308d3ded850f50c363867edc78edb
-[mq]: splitPaletteServiceAndActualPalettes
-
-diff --git a/base-palettes/pom.xml b/base-palettes/pom.xml
-new file mode 100644
---- /dev/null
-+++ b/base-palettes/pom.xml
-@@ -0,0 +1,28 @@
-+<?xml version="1.0"?>
-+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-+  <modelVersion>4.0.0</modelVersion>
-+  <parent>
-+    <groupId>net.anatolich.cstitch</groupId>
-+    <artifactId>cross-stitch</artifactId>
-+    <version>1.0-SNAPSHOT</version>
-+  </parent>
-+  
-+  <groupId>net.anatolich.cstitch.impl</groupId>
-+  <artifactId>base-palettes</artifactId>
-+  <version>1.0-SNAPSHOT</version>
-+  <name>base-palettes</name>
-+  
-+  <dependencies>
-+    <dependency>
-+      <groupId>junit</groupId>
-+      <artifactId>junit</artifactId>
-+      <scope>test</scope>
-+    </dependency>
-+    <dependency>
-+      <groupId>net.anatolich.cstitch</groupId>
-+      <artifactId>cross-stitch-api</artifactId>
-+      <version>1.0-SNAPSHOT</version>
-+    </dependency>
-+  </dependencies>
-+</project>
-diff --git a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/AbstractFilePalette.java b/base-palettes/src/main/java/net/anatolich/cstitch/palette/file/AbstractFilePalette.java
-rename from palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/AbstractFilePalette.java
-rename to base-palettes/src/main/java/net/anatolich/cstitch/palette/file/AbstractFilePalette.java
---- a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/AbstractFilePalette.java
-+++ b/base-palettes/src/main/java/net/anatolich/cstitch/palette/file/AbstractFilePalette.java
-@@ -29,7 +29,7 @@
-  *
-  * @author anatolich
-  */
--public abstract class AbstractFilePalette implements Palette {
-+public abstract class AbstractFilePalette implements Palette, Comparable<Palette> {
- 
-     private final List<PaletteColor> colors;
-     private final Map<String, PaletteColor> namedColors;
-@@ -99,4 +99,11 @@
-     public String toString() {
-         return "AbstractFilePalette{" + "name=" + name + '}';
-     }
-+
-+    @Override
-+    public int compareTo(Palette o) {
-+        return this.name.compareTo(o.getName());
-+    }
-+    
-+    
- }
-diff --git a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/AbstractPaletteFileParser.java b/base-palettes/src/main/java/net/anatolich/cstitch/palette/file/AbstractPaletteFileParser.java
-rename from palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/AbstractPaletteFileParser.java
-rename to base-palettes/src/main/java/net/anatolich/cstitch/palette/file/AbstractPaletteFileParser.java
-diff --git a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParser.java b/base-palettes/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParser.java
-rename from palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParser.java
-rename to base-palettes/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParser.java
-diff --git a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParserException.java b/base-palettes/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParserException.java
-rename from palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParserException.java
-rename to base-palettes/src/main/java/net/anatolich/cstitch/palette/file/PaletteFileParserException.java
-diff --git a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/PaletteTextFileParser.java b/base-palettes/src/main/java/net/anatolich/cstitch/palette/file/PaletteTextFileParser.java
-rename from palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/PaletteTextFileParser.java
-rename to base-palettes/src/main/java/net/anatolich/cstitch/palette/file/PaletteTextFileParser.java
-diff --git a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/package-info.java b/base-palettes/src/main/java/net/anatolich/cstitch/palette/file/package-info.java
-rename from palettes-impl/src/main/java/net/anatolich/cstitch/palette/file/package-info.java
-rename to base-palettes/src/main/java/net/anatolich/cstitch/palette/file/package-info.java
-diff --git a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/AnchorPalette.java b/base-palettes/src/main/java/net/anatolich/cstitch/palette/impl/AnchorPalette.java
-rename from palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/AnchorPalette.java
-rename to base-palettes/src/main/java/net/anatolich/cstitch/palette/impl/AnchorPalette.java
-diff --git a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/DmcPalette.java b/base-palettes/src/main/java/net/anatolich/cstitch/palette/impl/DmcPalette.java
-rename from palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/DmcPalette.java
-rename to base-palettes/src/main/java/net/anatolich/cstitch/palette/impl/DmcPalette.java
-diff --git a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/GammaPalette.java b/base-palettes/src/main/java/net/anatolich/cstitch/palette/impl/GammaPalette.java
-rename from palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/GammaPalette.java
-rename to base-palettes/src/main/java/net/anatolich/cstitch/palette/impl/GammaPalette.java
-diff --git a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/MadeiraPalette.java b/base-palettes/src/main/java/net/anatolich/cstitch/palette/impl/MadeiraPalette.java
-rename from palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/MadeiraPalette.java
-rename to base-palettes/src/main/java/net/anatolich/cstitch/palette/impl/MadeiraPalette.java
-diff --git a/base-palettes/src/main/java/net/anatolich/cstitch/palette/impl/PaletteInstaller.java b/base-palettes/src/main/java/net/anatolich/cstitch/palette/impl/PaletteInstaller.java
-new file mode 100644
---- /dev/null
-+++ b/base-palettes/src/main/java/net/anatolich/cstitch/palette/impl/PaletteInstaller.java
-@@ -0,0 +1,36 @@
-+/*
-+ * Copyright 2012 Dmytro.
-+ *
-+ * Licensed 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 net.anatolich.cstitch.palette.impl;
-+
-+import com.google.inject.Inject;
-+import net.anatolich.cstitch.palette.api.PaletteService;
-+
-+/**
-+ *
-+ * @author Dmytro
-+ */
-+public class PaletteInstaller {
-+
-+    @Inject
-+    public PaletteInstaller(PaletteService paletteService) {
-+        paletteService.registerPalette(new AnchorPalette());
-+        paletteService.registerPalette(new DmcPalette());
-+        paletteService.registerPalette(new GammaPalette());   
-+        paletteService.registerPalette(new MadeiraPalette());
-+    }
-+
-+    
-+}
-diff --git a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/PalettesConfiguration.java b/base-palettes/src/main/java/net/anatolich/cstitch/palette/impl/PalettesConfiguration.java
-rename from palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/PalettesConfiguration.java
-rename to base-palettes/src/main/java/net/anatolich/cstitch/palette/impl/PalettesConfiguration.java
---- a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/PalettesConfiguration.java
-+++ b/base-palettes/src/main/java/net/anatolich/cstitch/palette/impl/PalettesConfiguration.java
-@@ -16,8 +16,6 @@
- package net.anatolich.cstitch.palette.impl;
- 
- import com.google.inject.AbstractModule;
--import com.google.inject.multibindings.MapBinder;
--import net.anatolich.cstitch.palette.api.Palette;
- 
- /**
-  *
-@@ -27,12 +25,7 @@
- 
-     @Override
-     protected void configure() {
--        MapBinder<String, Palette> palettesBinder = 
--                MapBinder.newMapBinder(binder(), String.class, Palette.class);
--        palettesBinder.addBinding(AnchorPalette.PALETTE_NAME).to(AnchorPalette.class).asEagerSingleton();
--        palettesBinder.addBinding(DmcPalette.PALETTE_NAME).to(DmcPalette.class).asEagerSingleton();
--        palettesBinder.addBinding(GammaPalette.PALETTE_NAME).to(GammaPalette.class).asEagerSingleton();
--        palettesBinder.addBinding(MadeiraPalette.PALETTE_NAME).to(MadeiraPalette.class).asEagerSingleton();
-+        bind(PaletteInstaller.class).asEagerSingleton();
-     }
-     
- }
-diff --git a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/package-info.java b/base-palettes/src/main/java/net/anatolich/cstitch/palette/impl/package-info.java
-rename from palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/package-info.java
-rename to base-palettes/src/main/java/net/anatolich/cstitch/palette/impl/package-info.java
-diff --git a/base-palettes/src/main/resources/META-INF/services/com.google.inject.Module b/base-palettes/src/main/resources/META-INF/services/com.google.inject.Module
-new file mode 100644
---- /dev/null
-+++ b/base-palettes/src/main/resources/META-INF/services/com.google.inject.Module
-@@ -0,0 +1,1 @@
-+net.anatolich.cstitch.palette.impl.PalettesConfiguration
-\ No newline at end of file
-diff --git a/palettes-impl/src/test/java/net/anatolich/cstitch/palette/file/PaletteTextFileParserTest.java b/base-palettes/src/test/java/net/anatolich/cstitch/palette/file/PaletteTextFileParserTest.java
-rename from palettes-impl/src/test/java/net/anatolich/cstitch/palette/file/PaletteTextFileParserTest.java
-rename to base-palettes/src/test/java/net/anatolich/cstitch/palette/file/PaletteTextFileParserTest.java
-diff --git a/palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/AnchorPaletteTest.java b/base-palettes/src/test/java/net/anatolich/cstitch/palette/impl/AnchorPaletteTest.java
-rename from palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/AnchorPaletteTest.java
-rename to base-palettes/src/test/java/net/anatolich/cstitch/palette/impl/AnchorPaletteTest.java
-diff --git a/palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/DmcPaletteTest.java b/base-palettes/src/test/java/net/anatolich/cstitch/palette/impl/DmcPaletteTest.java
-rename from palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/DmcPaletteTest.java
-rename to base-palettes/src/test/java/net/anatolich/cstitch/palette/impl/DmcPaletteTest.java
-diff --git a/palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/GammaPaletteTest.java b/base-palettes/src/test/java/net/anatolich/cstitch/palette/impl/GammaPaletteTest.java
-rename from palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/GammaPaletteTest.java
-rename to base-palettes/src/test/java/net/anatolich/cstitch/palette/impl/GammaPaletteTest.java
-diff --git a/palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/MadeiraPaletteTest.java b/base-palettes/src/test/java/net/anatolich/cstitch/palette/impl/MadeiraPaletteTest.java
-rename from palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/MadeiraPaletteTest.java
-rename to base-palettes/src/test/java/net/anatolich/cstitch/palette/impl/MadeiraPaletteTest.java
-diff --git a/palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/PaletteTest.java b/base-palettes/src/test/java/net/anatolich/cstitch/palette/impl/PaletteTest.java
-rename from palettes-impl/src/test/java/net/anatolich/cstitch/palette/impl/PaletteTest.java
-rename to base-palettes/src/test/java/net/anatolich/cstitch/palette/impl/PaletteTest.java
-diff --git a/cross-stitch-app/pom.xml b/cross-stitch-app/pom.xml
---- a/cross-stitch-app/pom.xml
-+++ b/cross-stitch-app/pom.xml
-@@ -37,5 +37,10 @@
-       <artifactId>palettes-impl</artifactId>
-       <version>${project.version}</version>
-     </dependency>
-+    <dependency>
-+      <groupId>net.anatolich.cstitch.impl</groupId>
-+      <artifactId>base-palettes</artifactId>
-+      <version>1.0-SNAPSHOT</version>
-+    </dependency>
-   </dependencies>
- </project>
-diff --git a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/PaletteServiceConfiguration.java b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/service/impl/PaletteServiceConfiguration.java
-rename from palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/PaletteServiceConfiguration.java
-rename to palettes-impl/src/main/java/net/anatolich/cstitch/palette/service/impl/PaletteServiceConfiguration.java
---- a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/PaletteServiceConfiguration.java
-+++ b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/service/impl/PaletteServiceConfiguration.java
-@@ -13,8 +13,9 @@
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
--package net.anatolich.cstitch.palette.impl;
-+package net.anatolich.cstitch.palette.service.impl;
- 
-+import net.anatolich.cstitch.palette.service.impl.Palettes;
- import com.google.inject.AbstractModule;
- import com.google.inject.Singleton;
- import net.anatolich.cstitch.palette.api.PaletteService;
-@@ -26,8 +27,7 @@
- public class PaletteServiceConfiguration extends AbstractModule {
- 
-     @Override
--    protected void configure() {
--        install(new PalettesConfiguration());
-+    protected void configure() {        
-         bind(PaletteService.class).to(Palettes.class).in(Singleton.class);
-     }
-     
-diff --git a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/Palettes.java b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/service/impl/Palettes.java
-rename from palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/Palettes.java
-rename to palettes-impl/src/main/java/net/anatolich/cstitch/palette/service/impl/Palettes.java
---- a/palettes-impl/src/main/java/net/anatolich/cstitch/palette/impl/Palettes.java
-+++ b/palettes-impl/src/main/java/net/anatolich/cstitch/palette/service/impl/Palettes.java
-@@ -13,13 +13,12 @@
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
--package net.anatolich.cstitch.palette.impl;
-+package net.anatolich.cstitch.palette.service.impl;
- 
--import com.google.inject.Inject;
- import java.util.ArrayList;
- import java.util.List;
- import java.util.Map;
--import net.anatolich.cstitch.palette.api.Palette;
-+import java.util.TreeMap;
- import net.anatolich.cstitch.palette.api.Palette;
- import net.anatolich.cstitch.palette.api.PaletteService;
- 
-@@ -29,11 +28,10 @@
-  */
- public class Palettes implements PaletteService{
-     
--    private Map<String, Palette> palettes;
-+    private final Map<String, Palette> palettes;
- 
--    @Inject
--    Palettes(Map<String, Palette> palettes) {
--        this.palettes = palettes;
-+    Palettes() {
-+        this.palettes = new TreeMap<>();
-     }
-     
-     @Override
-diff --git a/palettes-impl/src/main/resources/META-INF/services/com.google.inject.Module b/palettes-impl/src/main/resources/META-INF/services/com.google.inject.Module
---- a/palettes-impl/src/main/resources/META-INF/services/com.google.inject.Module
-+++ b/palettes-impl/src/main/resources/META-INF/services/com.google.inject.Module
-@@ -1,1 +1,1 @@
--net.anatolich.cstitch.palette.impl.PaletteServiceConfiguration
-\ No newline at end of file
-+net.anatolich.cstitch.palette.service.impl.PaletteServiceConfiguration
-\ No newline at end of file
-diff --git a/pom.xml b/pom.xml
---- a/pom.xml
-+++ b/pom.xml
-@@ -136,5 +136,6 @@
-         <module>cross-stitch-fileservice-impl</module>
-     <module>cross-stitch-app</module>
-     <module>palettes-impl</module>
-+    <module>base-palettes</module>
-   </modules>
- </project>
-\ No newline at end of file
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.