Commented gson code out.pull/2/head
| @@ -20,14 +20,8 @@ | |||||
| <arguments> | <arguments> | ||||
| </arguments> | </arguments> | ||||
| </buildCommand> | </buildCommand> | ||||
| <buildCommand> | |||||
| <name>org.eclipse.m2e.core.maven2Builder</name> | |||||
| <arguments> | |||||
| </arguments> | |||||
| </buildCommand> | |||||
| </buildSpec> | </buildSpec> | ||||
| <natures> | <natures> | ||||
| <nature>org.eclipse.m2e.core.maven2Nature</nature> | |||||
| <nature>org.eclipse.pde.PluginNature</nature> | <nature>org.eclipse.pde.PluginNature</nature> | ||||
| <nature>org.eclipse.jdt.core.javanature</nature> | <nature>org.eclipse.jdt.core.javanature</nature> | ||||
| </natures> | </natures> | ||||
| @@ -2,18 +2,6 @@ | |||||
| <?eclipse version="3.4"?> | <?eclipse version="3.4"?> | ||||
| <plugin> | <plugin> | ||||
| <extension | |||||
| id="anotherproduct" | |||||
| point="org.eclipse.core.runtime.products"> | |||||
| <product | |||||
| name="BggToolAnother" | |||||
| application="org.eclipse.e4.ui.workbench.swt.E4Application"> | |||||
| <property | |||||
| name="appName" | |||||
| value="BggToolAnother"> | |||||
| </property> | |||||
| </product> | |||||
| </extension> | |||||
| <extension | <extension | ||||
| id="bggtoolanother" | id="bggtoolanother" | ||||
| point="org.eclipse.core.runtime.products"> | point="org.eclipse.core.runtime.products"> | ||||
| @@ -1,80 +0,0 @@ | |||||
| <?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>xyz.veronie.bgg</groupId> | |||||
| <artifactId>xyz.veronie.bgg.ui</artifactId> | |||||
| <version>0.0.1-SNAPSHOT</version> | |||||
| <name>xyz.veronie.bgg.ui</name> | |||||
| <!-- FIXME change it to the project's website --> | |||||
| <url>http://www.example.com</url> | |||||
| <properties> | |||||
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |||||
| <maven.compiler.source>1.7</maven.compiler.source> | |||||
| <maven.compiler.target>1.7</maven.compiler.target> | |||||
| </properties> | |||||
| <dependencies> | |||||
| <dependency> | |||||
| <groupId>junit</groupId> | |||||
| <artifactId>junit</artifactId> | |||||
| <version>4.11</version> | |||||
| <scope>test</scope> | |||||
| </dependency> | |||||
| <dependency> | |||||
| <groupId>com.google.code.gson</groupId> | |||||
| <artifactId>gson</artifactId> | |||||
| <version>2.8.6</version> | |||||
| </dependency> | |||||
| </dependencies> | |||||
| <build> | |||||
| <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) --> | |||||
| <plugins> | |||||
| <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle --> | |||||
| <plugin> | |||||
| <artifactId>maven-clean-plugin</artifactId> | |||||
| <version>3.1.0</version> | |||||
| </plugin> | |||||
| <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging --> | |||||
| <plugin> | |||||
| <artifactId>maven-resources-plugin</artifactId> | |||||
| <version>3.0.2</version> | |||||
| </plugin> | |||||
| <plugin> | |||||
| <artifactId>maven-compiler-plugin</artifactId> | |||||
| <version>3.8.0</version> | |||||
| </plugin> | |||||
| <plugin> | |||||
| <artifactId>maven-surefire-plugin</artifactId> | |||||
| <version>2.22.1</version> | |||||
| </plugin> | |||||
| <plugin> | |||||
| <artifactId>maven-jar-plugin</artifactId> | |||||
| <version>3.0.2</version> | |||||
| </plugin> | |||||
| <plugin> | |||||
| <artifactId>maven-install-plugin</artifactId> | |||||
| <version>2.5.2</version> | |||||
| </plugin> | |||||
| <plugin> | |||||
| <artifactId>maven-deploy-plugin</artifactId> | |||||
| <version>2.8.2</version> | |||||
| </plugin> | |||||
| <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle --> | |||||
| <plugin> | |||||
| <artifactId>maven-site-plugin</artifactId> | |||||
| <version>3.7.1</version> | |||||
| </plugin> | |||||
| <plugin> | |||||
| <artifactId>maven-project-info-reports-plugin</artifactId> | |||||
| <version>3.0.0</version> | |||||
| </plugin> | |||||
| </plugins> | |||||
| </pluginManagement> | |||||
| </build> | |||||
| </project> | |||||
| @@ -2,7 +2,7 @@ package xyz.veronie.bgg.result; | |||||
| import java.beans.PropertyChangeListener; | import java.beans.PropertyChangeListener; | ||||
| import java.beans.PropertyChangeSupport; | import java.beans.PropertyChangeSupport; | ||||
| import com.google.gson.Gson; | |||||
| //import com.google.gson.Gson; | |||||
| public class ThingMetaData implements java.io.Serializable { | public class ThingMetaData implements java.io.Serializable { | ||||
| private static final long serialVersionUID = -5268898737006538509L; | private static final long serialVersionUID = -5268898737006538509L; | ||||
| @@ -123,9 +123,9 @@ public class ThingMetaData implements java.io.Serializable { | |||||
| @Override | @Override | ||||
| public String toString() { | public String toString() { | ||||
| //return String.valueOf(id); | |||||
| Gson gson = new Gson(); | |||||
| return gson.toJson(this); | |||||
| return String.valueOf(id); | |||||
| // Gson gson = new Gson(); | |||||
| // return gson.toJson(this); | |||||
| } | } | ||||
| @@ -10,7 +10,7 @@ import xyz.veronie.bgg.result.ThingMetaData; | |||||
| import org.eclipse.core.runtime.Path; | import org.eclipse.core.runtime.Path; | ||||
| import com.google.gson.Gson; | |||||
| //import com.google.gson.Gson; | |||||
| public enum ThingProvider { | public enum ThingProvider { | ||||
| INSTANCE; | INSTANCE; | ||||
| @@ -71,15 +71,15 @@ public enum ThingProvider { | |||||
| /// create a tag of the current list | /// create a tag of the current list | ||||
| public void tagResult() { | public void tagResult() { | ||||
| Gson gson = new Gson(); | |||||
| String resultList = gson.toJson(this.thingMetas); | |||||
| // Gson gson = new Gson(); | |||||
| // String resultList = gson.toJson(this.thingMetas); | |||||
| try { | try { | ||||
| Path filesPath = new Path("result_" + Long.toString(System.currentTimeMillis())); | Path filesPath = new Path("result_" + Long.toString(System.currentTimeMillis())); | ||||
| System.out.println("File output path: " + filesPath); | System.out.println("File output path: " + filesPath); | ||||
| BufferedWriter writer = new BufferedWriter( | BufferedWriter writer = new BufferedWriter( | ||||
| new FileWriter(filesPath.toString())); | new FileWriter(filesPath.toString())); | ||||
| writer.write(resultList); | |||||
| // writer.write(resultList); | |||||
| writer.close(); | writer.close(); | ||||
| } catch (IOException e) { | } catch (IOException e) { | ||||