projects
/
jSite2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix log handler level
[jSite2.git]
/
src
/
net
/
pterodactylus
/
jsite
/
main
/
Main.java
diff --git
a/src/net/pterodactylus/jsite/main/Main.java
b/src/net/pterodactylus/jsite/main/Main.java
index
39024ec
..
dab65f5
100644
(file)
--- a/
src/net/pterodactylus/jsite/main/Main.java
+++ b/
src/net/pterodactylus/jsite/main/Main.java
@@
-21,13
+21,15
@@
package net.pterodactylus.jsite.main;
import java.io.File;
import java.io.File;
-import net.pterodactylus.jsite.core.Core;
+import net.pterodactylus.jsite.core.CoreImpl;
+import net.pterodactylus.jsite.core.NodeManager;
import net.pterodactylus.jsite.core.ProjectManager;
import net.pterodactylus.jsite.gui.SwingInterface;
import net.pterodactylus.jsite.core.ProjectManager;
import net.pterodactylus.jsite.gui.SwingInterface;
+import net.pterodactylus.util.logging.Logging;
/**
* Main class that is called by the VM.
/**
* Main class that is called by the VM.
- *
+ *
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
* @version $Id$
*/
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
* @version $Id$
*/
@@
-35,7
+37,7
@@
public class Main {
/**
* Main entry method for the VM.
/**
* Main entry method for the VM.
- *
+ *
* @param args
* The command-line arguments
*/
* @param args
* The command-line arguments
*/
@@
-47,14
+49,22
@@
public class Main {
* Starts the core and the default {@link SwingInterface}.
*/
private void start() {
* Starts the core and the default {@link SwingInterface}.
*/
private void start() {
- Core core = new Core();
+ Logging.setup("jSite");
+
+ CoreImpl core = new CoreImpl();
- ProjectManager projectManager = new ProjectManager(System.getProperty("user.home") + File.pathSeparator + ".jSite");
+ String configDirectory = System.getProperty("user.home") + File.separator + ".jSite";
+
+ ProjectManager projectManager = new ProjectManager(configDirectory);
core.setProjectManager(projectManager);
core.setProjectManager(projectManager);
- SwingInterface swingInterface = new SwingInterface(core);
+ NodeManager nodeManager = new NodeManager("jSite-" + Version.getVersion(), configDirectory);
+ core.setNodeManager(nodeManager);
+ nodeManager.addNodeListener(core);
+
+ SwingInterface swingInterface = new SwingInterface(core, configDirectory);
core.addCoreListener(swingInterface);
core.addCoreListener(swingInterface);
-
swingInterface.start(
);
+
Logging.addLoggingListener(swingInterface
);
core.start();
}
core.start();
}