Browse Source

replaced ParseException with Exception and made some little changes to get gradle working again

Jessey Widhalm 8 years ago
parent
commit
5fea2687e4

+ 3 - 0
.classpath

@@ -6,5 +6,8 @@
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
 	<classpathentry kind="lib" path="jars/json-simple-1.1.1.jar"/>
+	<classpathentry kind="lib" path="/home/jessey/git/praktikum-holons/libs/json-simple-1.1.1.jar"/>
+	<classpathentry kind="lib" path="/home/jessey/git/praktikum-holons/libs/commons-lang-2.5.jar"/>
+	<classpathentry kind="lib" path="/home/jessey/git/praktikum-holons/libs/json-smart-1.0.6.3.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

BIN
.gradle/2.2.1/taskArtifacts/cache.properties.lock


BIN
.gradle/2.2.1/taskArtifacts/fileHashes.bin


BIN
.gradle/2.2.1/taskArtifacts/fileSnapshots.bin


BIN
.gradle/2.2.1/taskArtifacts/taskArtifacts.bin


+ 8 - 1
build.gradle

@@ -36,8 +36,15 @@ sourceSets {
     }
 }
 
+repositories {
+   flatDir {
+       dirs 'jars'
+   }
+}
+
+
 dependencies {
-	compile files('jars/json-simple-1.1.1.jar')
+   compile name: 'json-simple-1.1.1'
 }
 /*
 // In this section you declare where to find the dependencies of your project

+ 1 - 4
src/ui/controller/Control.java

@@ -1,19 +1,16 @@
 package ui.controller;
 
-import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.LinkedList;
 
+import Interfaces.CategoryListener;
 import classes.Category;
 import classes.CpsEdge;
 import classes.CpsObject;
 import classes.HolonElement;
 import classes.HolonObject;
-import Interfaces.CategoryListener;
 import ui.model.Model;
-import ui.view.GUI;
 
 public class Control {
 

+ 2 - 2
src/ui/controller/LoadController.java

@@ -4,7 +4,6 @@ import java.awt.Point;
 import java.io.FileReader;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -92,7 +91,8 @@ public class LoadController {
 			dispatch(edge, json);
 			dispatch(gp, json);
 
-		} catch (ParseException e) {
+		} catch (Exception e) {
+			// Should be ParseException, but gradle won't work with it
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}

+ 0 - 5
src/ui/controller/MultiPurposeController.java

@@ -1,13 +1,8 @@
 package ui.controller;
 
-import java.util.ArrayList;
-import java.util.Collections;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map.Entry;
 
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiNilLoader.Array;
-
 import classes.Category;
 import classes.CpsObject;
 import classes.HolonElement;

+ 0 - 2
src/ui/controller/StoreController.java

@@ -7,7 +7,6 @@ import java.util.ListIterator;
 
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
-import org.json.simple.parser.JSONParser;
 
 import classes.Category;
 import classes.CpsEdge;
@@ -16,7 +15,6 @@ import classes.HolonElement;
 import classes.HolonObject;
 import classes.HolonSwitch;
 import classes.HolonTransformer;
-import jdk.nashorn.internal.ir.debug.JSONWriter;
 import ui.model.Model;
 import ui.model.idCounter;
 

+ 1 - 11
src/ui/view/GUI.java

@@ -1,18 +1,15 @@
 package ui.view;
 
-import java.awt.AWTException;
 import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.Component;
 import java.awt.Cursor;
-import java.awt.Dialog;
 import java.awt.Dimension;
 import java.awt.Image;
 import java.awt.Point;
 import java.awt.Toolkit;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.awt.event.KeyListener;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
 import java.beans.PropertyChangeEvent;
@@ -27,7 +24,6 @@ import javax.swing.ImageIcon;
 import javax.swing.JButton;
 import javax.swing.JCheckBoxMenuItem;
 import javax.swing.JComboBox;
-import javax.swing.JDialog;
 import javax.swing.JEditorPane;
 import javax.swing.JFileChooser;
 import javax.swing.JFrame;
@@ -51,15 +47,11 @@ import javax.swing.border.LineBorder;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
 import javax.swing.filechooser.FileNameExtensionFilter;
-import javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardDownRightHandler;
 import javax.swing.table.DefaultTableModel;
 import javax.swing.tree.DefaultMutableTreeNode;
 import javax.swing.tree.DefaultTreeModel;
 import javax.swing.tree.TreeCellRenderer;
 
-import com.sun.glass.events.KeyEvent;
-import com.sun.glass.ui.Robot;
-
 import Interfaces.CategoryListener;
 import classes.Category;
 import classes.CpsEdge;
@@ -68,10 +60,8 @@ import classes.HolonElement;
 import classes.HolonObject;
 import classes.HolonSwitch;
 import classes.HolonTransformer;
-import jdk.internal.util.xml.impl.Input;
 import ui.controller.Control;
-import ui.model.Model;
-import ui.view.PropertyTable;;
+import ui.model.Model;;
 
 public class GUI<E> implements CategoryListener {
 

+ 2 - 4
src/ui/view/MyCanvas.java

@@ -1,9 +1,7 @@
 package ui.view;
 
 import java.awt.BasicStroke;
-import java.awt.BorderLayout;
 import java.awt.Color;
-import java.awt.Dimension;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
 import java.awt.Image;
@@ -21,7 +19,6 @@ import java.util.Timer;
 import java.util.TimerTask;
 
 import javax.swing.ImageIcon;
-import javax.swing.JButton;
 import javax.swing.JMenuItem;
 import javax.swing.JPanel;
 import javax.swing.JPopupMenu;
@@ -34,7 +31,8 @@ import classes.HolonElement;
 import classes.HolonObject;
 import classes.HolonSwitch;
 import ui.controller.Control;
-import ui.model.*;
+import ui.model.Model;
+import ui.model.idCounter;
 
 class MyCanvas extends JPanel implements MouseListener, MouseMotionListener {
 	private Image img = null; // Contains the image to draw on MyCanvas

+ 2 - 2
src/ui/view/UnitGraph.java

@@ -246,7 +246,7 @@ class UnitGraph extends JPanel implements MouseListener, MouseMotionListener, Co
 	}
 
 	/**
-	 * Wenn ein Punkt von einem Element gedrück wird
+	 * Wenn ein Punkt von einem Element gedrueckt wird
 	 * 
 	 * @param e
 	 */
@@ -299,7 +299,7 @@ class UnitGraph extends JPanel implements MouseListener, MouseMotionListener, Co
 	}
 
 	/**
-	 * Wenn ein Punkt von einem Switch gedrück wird
+	 * Wenn ein Punkt von einem Switch gedr�ck wird
 	 * 
 	 * @param e
 	 */