bprocessor-commit Mailing List for B-processor (Page 169)
Status: Pre-Alpha
Brought to you by:
henryml
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(117) |
Aug
(151) |
Sep
(157) |
Oct
(81) |
Nov
(117) |
Dec
(119) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(183) |
Feb
(130) |
Mar
(117) |
Apr
(61) |
May
(82) |
Jun
(45) |
Jul
(149) |
Aug
(173) |
Sep
(199) |
Oct
(165) |
Nov
(107) |
Dec
(137) |
2007 |
Jan
(124) |
Feb
(58) |
Mar
(123) |
Apr
(80) |
May
(130) |
Jun
(64) |
Jul
(31) |
Aug
(42) |
Sep
(114) |
Oct
(167) |
Nov
(239) |
Dec
(200) |
2008 |
Jan
(43) |
Feb
(43) |
Mar
(4) |
Apr
(9) |
May
(5) |
Jun
(1) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(9) |
Nov
(12) |
Dec
|
2009 |
Jan
|
Feb
(20) |
Mar
(7) |
Apr
(12) |
May
(34) |
Jun
(72) |
Jul
|
Aug
(3) |
Sep
(31) |
Oct
(2) |
Nov
(8) |
Dec
(4) |
2010 |
Jan
(5) |
Feb
(32) |
Mar
(8) |
Apr
(7) |
May
(36) |
Jun
|
Jul
(11) |
Aug
(15) |
Sep
(7) |
Oct
(2) |
Nov
(13) |
Dec
(80) |
2011 |
Jan
|
Feb
|
Mar
(8) |
Apr
(12) |
May
(32) |
Jun
(9) |
Jul
(5) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(8) |
2012 |
Jan
|
Feb
|
Mar
(3) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(22) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jesper P. <je...@us...> - 2005-08-04 09:52:10
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18973 Modified Files: HibernateUtil.java Log Message: Configure() now takes a database reference Index: HibernateUtil.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/db/HibernateUtil.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** HibernateUtil.java 4 Aug 2005 06:05:04 -0000 1.3 --- HibernateUtil.java 4 Aug 2005 09:52:00 -0000 1.4 *************** *** 55,60 **** /** * Configure the persistence layer */ ! synchronized void configure() { try { if (sf != null && !sf.isClosed()) { --- 55,61 ---- /** * Configure the persistence layer + * @param db The database */ ! synchronized void configure(Database db) { try { if (sf != null && !sf.isClosed()) { *************** *** 63,67 **** Configuration cfg = new Configuration(); - Database db = DatabaseFactory.getInstance().getDatabase(); int type = db.getType(); --- 64,67 ---- |
From: Jesper P. <je...@us...> - 2005-08-04 09:51:49
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18834 Modified Files: DatabaseFactory.java Log Message: Pass the database reference to Hibernate Index: DatabaseFactory.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/db/DatabaseFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DatabaseFactory.java 4 Aug 2005 06:04:43 -0000 1.1 --- DatabaseFactory.java 4 Aug 2005 09:51:33 -0000 1.2 *************** *** 76,80 **** database.setAutodrop(autodrop); ! hb.configure(); } } --- 76,80 ---- database.setAutodrop(autodrop); ! hb.configure(database); } } |
From: Jesper P. <je...@us...> - 2005-08-04 06:07:18
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3596 Modified Files: FileExitActionListener.java Log Message: Save settings during shutdown Index: FileExitActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/FileExitActionListener.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** FileExitActionListener.java 27 Jun 2005 09:32:23 -0000 1.1.1.1 --- FileExitActionListener.java 4 Aug 2005 06:07:10 -0000 1.2 *************** *** 7,10 **** --- 7,12 ---- package net.sourceforge.bprocessor.gui.actions; + import net.sourceforge.bprocessor.gui.properties.Settings; + import java.awt.event.ActionEvent; import java.awt.event.ActionListener; *************** *** 30,33 **** --- 32,36 ---- */ public void actionPerformed(ActionEvent e) { + Settings.getInstance().save(); System.exit(0); } |
From: Jesper P. <je...@us...> - 2005-08-04 06:06:56
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3535 Modified Files: GUI.java Log Message: Load settings during startup Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GUI.java 18 Jul 2005 09:28:13 -0000 1.5 --- GUI.java 4 Aug 2005 06:06:48 -0000 1.6 *************** *** 19,22 **** --- 19,23 ---- import net.sourceforge.bprocessor.gui.actions.ToolsJoinActionListener; import net.sourceforge.bprocessor.gui.attrview.AttributeView; + import net.sourceforge.bprocessor.gui.properties.Settings; import net.sourceforge.bprocessor.gui.treeview.SpacesTreeView; import net.sourceforge.bprocessor.gui.treeview.SurfacesTreeView; *************** *** 298,301 **** --- 299,305 ---- */ public void start() { + Settings settings = Settings.getInstance(); + settings.load(); + setSize(800, 600); setVisible(true); |
From: Jesper P. <je...@us...> - 2005-08-04 06:06:34
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/properties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3481 Added Files: Settings.java package.html Log Message: Initial import --- NEW FILE: package.html --- <body> This packages contains classes that are used for the users properties </body> --- NEW FILE: Settings.java --- //--------------------------------------------------------------------------------- // $Id: Settings.java,v 1.1 2005/08/04 06:06:26 jews Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.gui.properties; import net.sourceforge.bprocessor.model.db.Database; import net.sourceforge.bprocessor.model.db.DatabaseFactory; import java.io.FileInputStream; import java.io.FileOutputStream; import java.util.Properties; import org.apache.log4j.Logger; /** * The settings class */ public class Settings extends Properties { /** The logger */ private static Logger log = Logger.getLogger(Settings.class); /** The singleton instance */ private static Settings instance; /** DATABASE_NAME */ public static final String DATABASE_NAME = "database.name"; /** DATABASE_TYPE */ public static final String DATABASE_TYPE = "database.type"; /** CONNECTION_URL */ public static final String CONNECTION_URL = "connection.url"; /** CONNECTION_USER */ public static final String CONNECTION_USER = "connection.user"; /** CONNECTION_PASSWORD */ public static final String CONNECTION_PASSWORD = "connection.password"; /** CONNECTION_AUTODROP */ public static final String CONNECTION_AUTODROP = "connection.autodrop"; /** * Constructor for Settings */ private Settings() { } /** * Get the instance * @return The instance */ public static synchronized Settings getInstance() { if (instance == null) { instance = new Settings(); } return instance; } /** * Load the settings */ public synchronized void load() { try { super.clear(); super.load(new FileInputStream("bprocessor.properties")); apply(); } catch (Exception e) { log.error("The settings could not be loaded: " + e.getMessage()); log.warn("Using default settings"); defaultSettings(); } } /** * Save the settings */ public synchronized void save() { try { super.store(new FileOutputStream("bprocessor.properties"), "BProcessor"); } catch (Exception e) { log.error("The settings could not be saved", e); } } /** * Apply settings */ public synchronized void apply() { int type = Integer.parseInt(getProperty(DATABASE_TYPE)); String url = getProperty(CONNECTION_URL); String user = getProperty(CONNECTION_USER); String password = getProperty(CONNECTION_PASSWORD); boolean autodrop = Boolean.valueOf(getProperty(CONNECTION_AUTODROP)).booleanValue(); DatabaseFactory.getInstance().setDatabase(type, url, user, password, autodrop); } /** * Default settings */ private void defaultSettings() { clear(); Database db = DatabaseFactory.getInstance().getDatabase(); setProperty(DATABASE_NAME, db.getName()); setProperty(DATABASE_TYPE, Integer.toString(db.getType())); setProperty(CONNECTION_URL, db.getUrl()); setProperty(CONNECTION_USER, db.getUser()); setProperty(CONNECTION_PASSWORD, db.getPassword()); setProperty(CONNECTION_AUTODROP, Boolean.toString(db.getAutodrop())); } } |
From: Jesper P. <je...@us...> - 2005-08-04 06:06:03
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/properties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3365/properties Log Message: Directory /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/properties added to the repository |
From: Jesper P. <je...@us...> - 2005-08-04 06:05:12
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3250 Modified Files: HibernateUtil.java Log Message: Use database factory Index: HibernateUtil.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/db/HibernateUtil.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HibernateUtil.java 1 Aug 2005 10:33:37 -0000 1.2 --- HibernateUtil.java 4 Aug 2005 06:05:04 -0000 1.3 *************** *** 35,44 **** private static final ThreadLocal TL = new ThreadLocal(); - /** MODE_HSQLDB */ - public static final int MODE_HSQLDB = 0; - - /** MODE_POSTGRESQL */ - public static final int MODE_POSTGRESQL = 1; - /** * Constructor --- 35,38 ---- *************** *** 46,50 **** private HibernateUtil() { sf = null; - setMode(MODE_HSQLDB, true, "jdbc:hsqldb:mem:bprocessor", "", ""); } --- 40,43 ---- *************** *** 61,73 **** /** ! * Set the mode of the persistence layer ! * @param mode The mode ! * @param autodrop Should the database be dropped ? ! * @param url The connection url ! * @param user The user name ! * @param password The password */ ! public synchronized void setMode(int mode, boolean autodrop, ! String url, String user, String password) { try { if (sf != null && !sf.isClosed()) { --- 54,60 ---- /** ! * Configure the persistence layer */ ! synchronized void configure() { try { if (sf != null && !sf.isClosed()) { *************** *** 76,95 **** Configuration cfg = new Configuration(); ! if (mode == MODE_HSQLDB) { cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.HSQLDialect"); cfg.setProperty("hibernate.use_outer_join", "false"); cfg.setProperty("hibernate.connection.driver_class", "org.hsqldb.jdbcDriver"); ! } else if (mode == MODE_POSTGRESQL) { cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.PostgreSQLDialect"); cfg.setProperty("hibernate.use_outer_join", "true"); cfg.setProperty("hibernate.connection.driver_class", "org.postgresql.Driver"); } else { ! log.error("Unsupported database: " + mode); ! log.warn("Defaulting to HSQLDB/Memory"); ! url = "jdbc:hsqldb:mem:bprocessor"; ! user = null; ! password = null; ! autodrop = true; cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.HSQLDialect"); cfg.setProperty("hibernate.use_outer_join", "false"); --- 63,80 ---- Configuration cfg = new Configuration(); + Database db = DatabaseFactory.getInstance().getDatabase(); + int type = db.getType(); ! if (type == Database.HSQLDB) { cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.HSQLDialect"); cfg.setProperty("hibernate.use_outer_join", "false"); cfg.setProperty("hibernate.connection.driver_class", "org.hsqldb.jdbcDriver"); ! } else if (type == Database.POSTGRESQL) { cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.PostgreSQLDialect"); cfg.setProperty("hibernate.use_outer_join", "true"); cfg.setProperty("hibernate.connection.driver_class", "org.postgresql.Driver"); } else { ! log.error("Unsupported database: " + type); ! log.warn("Defaulting to HSQLDB"); cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.HSQLDialect"); cfg.setProperty("hibernate.use_outer_join", "false"); *************** *** 97,101 **** } ! if (autodrop) { cfg.setProperty("hibernate.hbm2ddl.auto", "create-drop"); } else { --- 82,86 ---- } ! if (db.getAutodrop()) { cfg.setProperty("hibernate.hbm2ddl.auto", "create-drop"); } else { *************** *** 106,116 **** cfg.setProperty("hibernate.order_updates", "true"); ! cfg.setProperty("hibernate.connection.url", url); ! if (user != null && !user.trim().equals("")) { ! cfg.setProperty("hibernate.connection.username", user); ! } ! if (password != null && !password.trim().equals("")) { ! cfg.setProperty("hibernate.connection.password", password); } --- 91,101 ---- cfg.setProperty("hibernate.order_updates", "true"); ! cfg.setProperty("hibernate.connection.url", db.getUrl()); ! if (db.getUser() != null && !db.getUser().trim().equals("")) { ! cfg.setProperty("hibernate.connection.username", db.getUser()); ! if (db.getPassword() != null && !db.getPassword().trim().equals("")) { ! cfg.setProperty("hibernate.connection.password", db.getPassword()); ! } } |
From: Jesper P. <je...@us...> - 2005-08-04 06:04:52
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3181 Added Files: AbstractDatabase.java DatabaseFactory.java Database.java HSQLDB.java PostgreSQL.java Log Message: Initial import --- NEW FILE: AbstractDatabase.java --- //--------------------------------------------------------------------------------- // $Id: AbstractDatabase.java,v 1.1 2005/08/04 06:04:43 jews Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.model.db; import org.apache.log4j.Logger; /** * The abstract database */ public abstract class AbstractDatabase implements Database { /** The logger */ private static Logger log = Logger.getLogger(AbstractDatabase.class); /** The url */ private String url; /** The user */ private String user; /** The password */ private String password; /** Autodrop */ private boolean autodrop; /** * Constructor * @param url The url * @param user The user * @param password The password * @param autodrop The autodrop */ protected AbstractDatabase(String url, String user, String password, boolean autodrop) { this.url = url; this.user = user; this.password = password; this.autodrop = autodrop; } /** * Get the url * @return The url of the database */ public String getUrl() { return url; } /** * Set the url * @param url The url */ public void setUrl(String url) { this.url = url; } /** * Get the user * @return The user of the database */ public String getUser() { return user; } /** * Set the user * @param user The user */ public void setUser(String user) { this.user = user; } /** * Get the password of the user * @return The password */ public String getPassword() { return password; } /** * Set the password * @param password The password */ public void setPassword(String password) { this.password = password; } /** * Should the database be auto dropped ? * @return True if auto dropped; otherwise false */ public boolean getAutodrop() { return autodrop; } /** * Set the autodrop * @param autodrop The autodrop */ public void setAutodrop(boolean autodrop) { this.autodrop = autodrop; } /** * Get the name * @return The name of the database */ public abstract String getName(); /** * Get the type * @return The type of the database */ public abstract int getType(); } --- NEW FILE: PostgreSQL.java --- //--------------------------------------------------------------------------------- // $Id: PostgreSQL.java,v 1.1 2005/08/04 06:04:43 jews Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.model.db; import org.apache.log4j.Logger; /** * The PostgreSQL database */ public class PostgreSQL extends AbstractDatabase { /** The logger */ private static Logger log = Logger.getLogger(PostgreSQL.class); /** The singleton */ private static PostgreSQL instance; /** * Constructor */ private PostgreSQL() { super("", "", "", false); } /** * Get the instance * @return The instance */ public static synchronized PostgreSQL getInstance() { if (instance == null) { instance = new PostgreSQL(); } return instance; } /** * Get the name * @return The name of the database */ public String getName() { return "PostgreSQL"; } /** * Get the type * @return The type of the database */ public int getType() { return Database.POSTGRESQL; } } --- NEW FILE: HSQLDB.java --- //--------------------------------------------------------------------------------- // $Id: HSQLDB.java,v 1.1 2005/08/04 06:04:43 jews Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.model.db; import org.apache.log4j.Logger; /** * The HSQLDB database */ public class HSQLDB extends AbstractDatabase { /** The logger */ private static Logger log = Logger.getLogger(HSQLDB.class); /** The singleton */ private static HSQLDB instance; /** * Constructor */ private HSQLDB() { super("jdbc:hsqldb:mem:bprocessor", "", "", true); } /** * Get the instance * @return The instance */ public static synchronized HSQLDB getInstance() { if (instance == null) { instance = new HSQLDB(); } return instance; } /** * Get the name * @return The name of the database */ public String getName() { return "HSQLDB"; } /** * Get the type * @return The type of the database */ public int getType() { return Database.HSQLDB; } } --- NEW FILE: Database.java --- //--------------------------------------------------------------------------------- // $Id: Database.java,v 1.1 2005/08/04 06:04:43 jews Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.model.db; /** * The database interface */ public interface Database { /** HSQLDB */ public static final int HSQLDB = 0; /** POSTGRESQL */ public static final int POSTGRESQL = 1; /** * Get the name * @return The name of the database */ public String getName(); /** * Get the type * @return The type of the database */ public int getType(); /** * Get the url * @return The url of the database */ public String getUrl(); /** * Set the url * @param url The url */ public void setUrl(String url); /** * Get the user * @return The user of the database */ public String getUser(); /** * Set the user * @param user The user */ public void setUser(String user); /** * Get the password of the user * @return The password */ public String getPassword(); /** * Set the password * @param password The password */ public void setPassword(String password); /** * Should the database be auto dropped ? * @return True if auto dropped; otherwise false */ public boolean getAutodrop(); /** * Set if the database should be autodropped * @param autodrop Should the database be autodropped ? */ public void setAutodrop(boolean autodrop); } --- NEW FILE: DatabaseFactory.java --- //--------------------------------------------------------------------------------- // $Id: DatabaseFactory.java,v 1.1 2005/08/04 06:04:43 jews Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.model.db; import org.apache.log4j.Logger; /** * The database factory */ public class DatabaseFactory { /** The logger */ private static Logger log = Logger.getLogger(DatabaseFactory.class); /** The singleton */ private static DatabaseFactory instance; /** The current database */ private Database database; /** * Constructor */ private DatabaseFactory() { Database db = HSQLDB.getInstance(); setDatabase(Database.HSQLDB, db.getUrl(), db.getUser(), db.getPassword(), db.getAutodrop()); } /** * Get the instance * @return The instance */ public static synchronized DatabaseFactory getInstance() { if (instance == null) { instance = new DatabaseFactory(); } return instance; } /** * Get the database * @return The database */ public Database getDatabase() { return database; } /** * Set the database * @param type The database type * @param url The url * @param user The user * @param password The password * @param autodrop Autodrop tables */ public synchronized void setDatabase(int type, String url, String user, String password, boolean autodrop) { boolean known = true; HibernateUtil hb = HibernateUtil.getInstance(); if (type == Database.HSQLDB) { database = HSQLDB.getInstance(); } else if (type == Database.POSTGRESQL) { database = PostgreSQL.getInstance(); } else { log.error("Unknown database: " + type); log.warn("Keeping existing configuration"); known = false; } if (known) { database.setUrl(url); database.setUser(user); database.setPassword(password); database.setAutodrop(autodrop); hb.configure(); } } } |
From: Jesper P. <je...@us...> - 2005-08-02 07:18:33
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31811 Modified Files: VertexFacade.java Log Message: Added findByLocation() Index: VertexFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/VertexFacade.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** VertexFacade.java 28 Jul 2005 10:16:02 -0000 1.3 --- VertexFacade.java 2 Aug 2005 07:18:25 -0000 1.4 *************** *** 203,205 **** --- 203,254 ---- return result; } + + /** + * Find vertex based upon location and delta + * @param x The x coordinate + * @param y The y coordinate + * @param z The z coordinate + * @param delta The delta value + * @return The vertexs + */ + public Set findByLocation(double x, double y, double z, double delta) { + Set result = new HashSet(); + + HibernateUtil hu = HibernateUtil.getInstance(); + try { + Session session = hu.currentSession(); + Transaction tx = session.beginTransaction(); + + double minX = x - delta; + double maxX = x + delta; + double minY = y - delta; + double maxY = y + delta; + double minZ = z - delta; + double maxZ = z + delta; + + Query q = session.createQuery("SELECT v FROM Vertex AS v WHERE " + + "v.x BETWEEN :minX AND :maxX AND " + + "v.y BETWEEN :minY AND :maxY AND " + + "v.z BETWEEN :minZ AND :maxZ"); + q.setDouble("minX", minX); + q.setDouble("maxX", maxX); + q.setDouble("minY", minY); + q.setDouble("maxY", maxY); + q.setDouble("minZ", minZ); + q.setDouble("maxZ", maxZ); + + Iterator it = q.iterate(); + while (it.hasNext()) { + result.add((Vertex)it.next()); + } + + tx.commit(); + } catch (Exception ex) { + log.error(ex.getMessage(), ex); + } finally { + hu.closeSession(); + } + + return result; + } } |
From: Jesper P. <je...@us...> - 2005-08-01 11:17:07
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1647 Modified Files: Surface.java Log Message: Let the same edge be referenced from multiple surfaces Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Surface.java 28 Jul 2005 06:48:54 -0000 1.4 --- Surface.java 1 Aug 2005 11:16:58 -0000 1.5 *************** *** 112,116 **** * @hibernate.key * column="SURFACE_ID" ! * @hibernate.one-to-many * class="net.sourceforge.bprocessor.model.Edge" */ --- 112,116 ---- * @hibernate.key * column="SURFACE_ID" ! * @hibernate.many-to-many * class="net.sourceforge.bprocessor.model.Edge" */ |
From: Jesper P. <je...@us...> - 2005-08-01 10:33:45
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25164 Modified Files: HibernateUtil.java Log Message: Added setMode() - dynamic configuration (HSQLDB/PostgreSQL) Index: HibernateUtil.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/db/HibernateUtil.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HibernateUtil.java 28 Jul 2005 06:50:19 -0000 1.1 --- HibernateUtil.java 1 Aug 2005 10:33:37 -0000 1.2 *************** *** 7,10 **** --- 7,16 ---- package net.sourceforge.bprocessor.model.db; + import net.sourceforge.bprocessor.model.Attribute; + import net.sourceforge.bprocessor.model.Edge; + import net.sourceforge.bprocessor.model.Vertex; + import net.sourceforge.bprocessor.model.Domain; + import net.sourceforge.bprocessor.model.Surface; + import org.hibernate.Session; import org.hibernate.SessionFactory; *************** *** 29,41 **** private static final ThreadLocal TL = new ThreadLocal(); /** * Constructor */ private HibernateUtil() { ! try { ! sf = new Configuration().configure().buildSessionFactory(); ! } catch (Exception e) { ! log.fatal("Exception", e); ! } } --- 35,50 ---- private static final ThreadLocal TL = new ThreadLocal(); + /** MODE_HSQLDB */ + public static final int MODE_HSQLDB = 0; + + /** MODE_POSTGRESQL */ + public static final int MODE_POSTGRESQL = 1; + /** * Constructor */ private HibernateUtil() { ! sf = null; ! setMode(MODE_HSQLDB, true, "jdbc:hsqldb:mem:bprocessor", "", ""); } *************** *** 52,55 **** --- 61,131 ---- /** + * Set the mode of the persistence layer + * @param mode The mode + * @param autodrop Should the database be dropped ? + * @param url The connection url + * @param user The user name + * @param password The password + */ + public synchronized void setMode(int mode, boolean autodrop, + String url, String user, String password) { + try { + if (sf != null && !sf.isClosed()) { + sf.close(); + } + + Configuration cfg = new Configuration(); + + if (mode == MODE_HSQLDB) { + cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.HSQLDialect"); + cfg.setProperty("hibernate.use_outer_join", "false"); + cfg.setProperty("hibernate.connection.driver_class", "org.hsqldb.jdbcDriver"); + } else if (mode == MODE_POSTGRESQL) { + cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.PostgreSQLDialect"); + cfg.setProperty("hibernate.use_outer_join", "true"); + cfg.setProperty("hibernate.connection.driver_class", "org.postgresql.Driver"); + } else { + log.error("Unsupported database: " + mode); + log.warn("Defaulting to HSQLDB/Memory"); + url = "jdbc:hsqldb:mem:bprocessor"; + user = null; + password = null; + autodrop = true; + cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.HSQLDialect"); + cfg.setProperty("hibernate.use_outer_join", "false"); + cfg.setProperty("hibernate.connection.driver_class", "org.hsqldb.jdbcDriver"); + } + + if (autodrop) { + cfg.setProperty("hibernate.hbm2ddl.auto", "create-drop"); + } else { + cfg.setProperty("hibernate.hbm2ddl.auto", "update"); + } + + cfg.setProperty("hibernate.show_sql", "false"); + cfg.setProperty("hibernate.order_updates", "true"); + + cfg.setProperty("hibernate.connection.url", url); + + if (user != null && !user.trim().equals("")) { + cfg.setProperty("hibernate.connection.username", user); + } + if (password != null && !password.trim().equals("")) { + cfg.setProperty("hibernate.connection.password", password); + } + + cfg.addClass(Attribute.class); + cfg.addClass(Edge.class); + cfg.addClass(Vertex.class); + cfg.addClass(Domain.class); + cfg.addClass(Surface.class); + + sf = cfg.buildSessionFactory(); + } catch (Exception e) { + log.fatal("Exception", e); + } + } + + /** * Get the current session * @return The session |
From: Jesper P. <je...@us...> - 2005-08-01 10:33:02
|
Update of /cvsroot/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24996 Modified Files: build.xml Log Message: Hibernate configuration is now dynamic Index: build.xml =================================================================== RCS file: /cvsroot/bprocessor/model/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** build.xml 28 Jul 2005 06:52:33 -0000 1.3 --- build.xml 1 Aug 2005 10:32:53 -0000 1.4 *************** *** 120,132 **** <hibernate version="3.0"/> - <hibernatecfg version="3.0" - hbm2ddl="create-drop" - jdbcUrl="jdbc:hsqldb:mem:bprocessor" - driver="org.hsqldb.jdbcDriver" - username="" - password="" - dialect="org.hibernate.dialect.HSQLDialect"> - </hibernatecfg> - </hibernatedoclet> </target> --- 120,123 ---- |
From: Jesper P. <je...@us...> - 2005-07-28 11:00:39
|
Update of /cvsroot/bprocessor/gl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20583 Modified Files: build.xml Log Message: Copy gfx to JAR file Index: build.xml =================================================================== RCS file: /cvsroot/bprocessor/gl/build.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** build.xml 14 Jul 2005 09:49:58 -0000 1.1.1.1 --- build.xml 28 Jul 2005 11:00:15 -0000 1.2 *************** *** 13,16 **** --- 13,17 ---- <property name="src.dir" value="${basedir}/src"/> <property name="conf.dir" value="${src.dir}/etc"/> + <property name="gfx.dir" value="${src.dir}/gfx"/> <property name="doc.dir" value="${basedir}/doc"/> <property name="doc.api.dir" value="${doc.dir}/api"/> *************** *** 100,103 **** --- 101,109 ---- <target name="jar" depends="compile"> <mkdir dir="${dist.dir}"/> + <copy todir="${build.dir}"> + <fileset dir="${gfx.dir}"> + <include name="**/*"/> + </fileset> + </copy> <jar jarfile="${dist.dir}/${name}.jar" basedir="${build.dir}" |
From: rimestad <rim...@us...> - 2005-07-28 10:26:14
|
Update of /cvsroot/bprocessor/gl/src/gfx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14756 Added Files: drawicon.png selecticon.png Log Message: initial import --- NEW FILE: selecticon.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: drawicon.png --- (This appears to be a binary file; contents omitted.) |
From: rimestad <rim...@us...> - 2005-07-28 10:25:27
|
Update of /cvsroot/bprocessor/gl/src/gfx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14626/gfx Log Message: Directory /cvsroot/bprocessor/gl/src/gfx added to the repository |
From: Jesper P. <je...@us...> - 2005-07-28 10:19:16
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13756 Modified Files: SpacesTreeView.java SurfacesTreeView.java Log Message: Removed RENAMED and added DESELECTED Index: SurfacesTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SurfacesTreeView.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SurfacesTreeView.java 1 Jul 2005 11:28:01 -0000 1.1 --- SurfacesTreeView.java 28 Jul 2005 10:19:06 -0000 1.2 *************** *** 80,85 **** if (type.equals(Notification.SURFACE_CREATED) || type.equals(Notification.SURFACE_DELETED) || - type.equals(Notification.SURFACE_RENAMED) || type.equals(Notification.SURFACE_SELECTED) || type.equals(Notification.SURFACE_MODIFIED)) { return true; --- 80,85 ---- if (type.equals(Notification.SURFACE_CREATED) || type.equals(Notification.SURFACE_DELETED) || type.equals(Notification.SURFACE_SELECTED) || + type.equals(Notification.SURFACE_DESELECTED) || type.equals(Notification.SURFACE_MODIFIED)) { return true; Index: SpacesTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpacesTreeView.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SpacesTreeView.java 1 Jul 2005 06:42:01 -0000 1.2 --- SpacesTreeView.java 28 Jul 2005 10:19:06 -0000 1.3 *************** *** 96,106 **** if (type.equals(Notification.FUNCTIONAL_SPACE_CREATED) || type.equals(Notification.FUNCTIONAL_SPACE_DELETED) || - type.equals(Notification.FUNCTIONAL_SPACE_RENAMED) || type.equals(Notification.FUNCTIONAL_SPACE_SELECTED) || type.equals(Notification.FUNCTIONAL_SPACE_MODIFIED) || type.equals(Notification.CONSTRUCTION_SPACE_CREATED) || type.equals(Notification.CONSTRUCTION_SPACE_DELETED) || - type.equals(Notification.CONSTRUCTION_SPACE_RENAMED) || type.equals(Notification.CONSTRUCTION_SPACE_SELECTED) || type.equals(Notification.CONSTRUCTION_SPACE_MODIFIED)) { return true; --- 96,106 ---- if (type.equals(Notification.FUNCTIONAL_SPACE_CREATED) || type.equals(Notification.FUNCTIONAL_SPACE_DELETED) || type.equals(Notification.FUNCTIONAL_SPACE_SELECTED) || + type.equals(Notification.FUNCTIONAL_SPACE_DESELECTED) || type.equals(Notification.FUNCTIONAL_SPACE_MODIFIED) || type.equals(Notification.CONSTRUCTION_SPACE_CREATED) || type.equals(Notification.CONSTRUCTION_SPACE_DELETED) || type.equals(Notification.CONSTRUCTION_SPACE_SELECTED) || + type.equals(Notification.CONSTRUCTION_SPACE_DESELECTED) || type.equals(Notification.CONSTRUCTION_SPACE_MODIFIED)) { return true; |
From: Jesper P. <je...@us...> - 2005-07-28 10:18:50
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13696 Modified Files: CreateConstructionSpaceActionListener.java CreateElementActionListener.java CreateFunctionalSpaceActionListener.java CreatePartActionListener.java CreateSurfaceActionListener.java Log Message: Facades now genrates CREATED, MODIFIED and DELETED Index: CreatePartActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreatePartActionListener.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CreatePartActionListener.java 28 Jul 2005 06:54:40 -0000 1.3 --- CreatePartActionListener.java 28 Jul 2005 10:18:40 -0000 1.4 *************** *** 7,12 **** package net.sourceforge.bprocessor.gui.actions; - import net.sourceforge.bprocessor.kernel.notification.Notification; - import net.sourceforge.bprocessor.kernel.notification.Notifier; import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Part; --- 7,10 ---- *************** *** 50,56 **** p = pf.create(p); - - Notification n = new Notification(Notification.PART_CREATED, p.getId()); - Notifier.getInstance().sendNotification(n); } } --- 48,51 ---- Index: CreateConstructionSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateConstructionSpaceActionListener.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CreateConstructionSpaceActionListener.java 28 Jul 2005 06:54:40 -0000 1.2 --- CreateConstructionSpaceActionListener.java 28 Jul 2005 10:18:40 -0000 1.3 *************** *** 7,13 **** package net.sourceforge.bprocessor.gui.actions; - import net.sourceforge.bprocessor.kernel.notification.Notification; - import net.sourceforge.bprocessor.kernel.notification.Notifier; - import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.ConstructionSpace; --- 7,10 ---- *************** *** 51,57 **** cs = csf.create(cs); - - Notification n = new Notification(Notification.CONSTRUCTION_SPACE_CREATED, cs.getId()); - Notifier.getInstance().sendNotification(n); } } --- 48,51 ---- Index: CreateElementActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateElementActionListener.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CreateElementActionListener.java 28 Jul 2005 06:54:40 -0000 1.3 --- CreateElementActionListener.java 28 Jul 2005 10:18:40 -0000 1.4 *************** *** 7,12 **** package net.sourceforge.bprocessor.gui.actions; - import net.sourceforge.bprocessor.kernel.notification.Notification; - import net.sourceforge.bprocessor.kernel.notification.Notifier; import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Element; --- 7,10 ---- *************** *** 50,56 **** el = ef.create(el); - - Notification n = new Notification(Notification.ELEMENT_CREATED, el.getId()); - Notifier.getInstance().sendNotification(n); } } --- 48,51 ---- Index: CreateFunctionalSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateFunctionalSpaceActionListener.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CreateFunctionalSpaceActionListener.java 28 Jul 2005 06:54:40 -0000 1.2 --- CreateFunctionalSpaceActionListener.java 28 Jul 2005 10:18:40 -0000 1.3 *************** *** 7,13 **** package net.sourceforge.bprocessor.gui.actions; - import net.sourceforge.bprocessor.kernel.notification.Notification; - import net.sourceforge.bprocessor.kernel.notification.Notifier; - import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.FunctionalSpace; --- 7,10 ---- *************** *** 51,57 **** fs = fsf.create(fs); - - Notification n = new Notification(Notification.FUNCTIONAL_SPACE_CREATED, fs.getId()); - Notifier.getInstance().sendNotification(n); } } --- 48,51 ---- Index: CreateSurfaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateSurfaceActionListener.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CreateSurfaceActionListener.java 28 Jul 2005 06:54:40 -0000 1.3 --- CreateSurfaceActionListener.java 28 Jul 2005 10:18:40 -0000 1.4 *************** *** 7,12 **** package net.sourceforge.bprocessor.gui.actions; - import net.sourceforge.bprocessor.kernel.notification.Notification; - import net.sourceforge.bprocessor.kernel.notification.Notifier; import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Surface; --- 7,10 ---- *************** *** 50,56 **** s = sf.create(s); - - Notification n = new Notification(Notification.SURFACE_CREATED, s.getId()); - Notifier.getInstance().sendNotification(n); } } --- 48,51 ---- |
From: Jesper P. <je...@us...> - 2005-07-28 10:18:11
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13483 Modified Files: AbstractTool.java Log Message: Facades now genrates CREATED, MODIFIED and DELETED Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AbstractTool.java 28 Jul 2005 06:55:56 -0000 1.3 --- AbstractTool.java 28 Jul 2005 10:17:52 -0000 1.4 *************** *** 7,13 **** package net.sourceforge.bprocessor.gl.tool; - import net.sourceforge.bprocessor.kernel.notification.Notifier; - import net.sourceforge.bprocessor.kernel.notification.Notification; - import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.EdgeFacade; --- 7,10 ---- *************** *** 264,270 **** VertexFacade.getInstance().update(v); - - Notification n = new Notification(Notification.VERTEX_CREATED, v.getId()); - Notifier.getInstance().sendNotification(n); return v; --- 261,264 ---- *************** *** 287,293 **** VertexFacade.getInstance().update(v); - - Notification n = new Notification(Notification.VERTEX_MODIFIED, v.getId()); - Notifier.getInstance().sendNotification(n); } else { log.error("[updateVertex] wrong argument length was: " + coord.length); --- 281,284 ---- *************** *** 300,306 **** */ protected void removeVertex(Vertex v) { - Notification n = new Notification(Notification.VERTEX_DELETED, v.getId()); - Notifier.getInstance().sendNotification(n); - VertexFacade.getInstance().remove(v); } --- 291,294 ---- *************** *** 322,328 **** EdgeFacade.getInstance().update(e); - Notification n = new Notification(Notification.EDGE_CREATED, e.getId()); - Notifier.getInstance().sendNotification(n); - return e; } --- 310,313 ---- *************** *** 334,340 **** protected void updateEdge(Edge e) { EdgeFacade.getInstance().update(e); - - Notification n = new Notification(Notification.EDGE_MODIFIED, e.getId()); - Notifier.getInstance().sendNotification(n); } --- 319,322 ---- *************** *** 353,358 **** SurfaceFacade.getInstance().update(s); - Notification n = new Notification(Notification.SURFACE_CREATED, s.getId()); - Notifier.getInstance().sendNotification(n); return s; } --- 335,338 ---- |
From: Jesper P. <je...@us...> - 2005-07-28 10:16:49
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13194 Modified Files: PersistenceManager.java Log Message: Facades now genrates CREATED, MODIFIED and DELETED Index: PersistenceManager.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/xml/PersistenceManager.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PersistenceManager.java 28 Jul 2005 06:49:28 -0000 1.2 --- PersistenceManager.java 28 Jul 2005 10:16:37 -0000 1.3 *************** *** 7,13 **** package net.sourceforge.bprocessor.model.xml; - import net.sourceforge.bprocessor.kernel.notification.Notification; - import net.sourceforge.bprocessor.kernel.notification.Notifier; - import net.sourceforge.bprocessor.model.ConstructionSpace; import net.sourceforge.bprocessor.model.ConstructionSpaceFacade; --- 7,10 ---- *************** *** 158,164 **** csm = ConstructionSpaceFacade.getInstance().create(csm); - - Notification n = new Notification(Notification.CONSTRUCTION_SPACE_CREATED, csm.getId()); - Notifier.getInstance().sendNotification(n); } } --- 155,158 ---- *************** *** 178,184 **** fsm = FunctionalSpaceFacade.getInstance().create(fsm); - - Notification n = new Notification(Notification.FUNCTIONAL_SPACE_CREATED, fsm.getId()); - Notifier.getInstance().sendNotification(n); } } --- 172,175 ---- *************** *** 200,206 **** em = ElementFacade.getInstance().create(em); - - Notification n = new Notification(Notification.ELEMENT_CREATED, em.getId()); - Notifier.getInstance().sendNotification(n); } } --- 191,194 ---- *************** *** 222,228 **** pm = PartFacade.getInstance().create(pm); - - Notification n = new Notification(Notification.PART_CREATED, pm.getId()); - Notifier.getInstance().sendNotification(n); } } --- 210,213 ---- *************** *** 246,252 **** sm = SurfaceFacade.getInstance().create(sm); - - Notification n = new Notification(Notification.SURFACE_CREATED, sm.getId()); - Notifier.getInstance().sendNotification(n); } } --- 231,234 ---- *************** *** 268,274 **** em = EdgeFacade.getInstance().create(em); - - Notification n = new Notification(Notification.EDGE_CREATED, em.getId()); - Notifier.getInstance().sendNotification(n); } } --- 250,253 ---- *************** *** 295,301 **** vm = VertexFacade.getInstance().create(vm); - - Notification n = new Notification(Notification.VERTEX_CREATED, vm.getId()); - Notifier.getInstance().sendNotification(n); } } --- 274,277 ---- |
From: Jesper P. <je...@us...> - 2005-07-28 10:16:13
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13099 Modified Files: ConstructionSpaceFacade.java EdgeFacade.java ElementFacade.java FunctionalSpaceFacade.java PartFacade.java SurfaceFacade.java VertexFacade.java Log Message: Generate notifications Index: ConstructionSpaceFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ConstructionSpaceFacade.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ConstructionSpaceFacade.java 28 Jul 2005 06:48:54 -0000 1.2 --- ConstructionSpaceFacade.java 28 Jul 2005 10:16:01 -0000 1.3 *************** *** 7,10 **** --- 7,12 ---- package net.sourceforge.bprocessor.model; + import net.sourceforge.bprocessor.kernel.notification.Notification; + import net.sourceforge.bprocessor.kernel.notification.Notifier; import net.sourceforge.bprocessor.model.db.HibernateUtil; *************** *** 59,62 **** --- 61,67 ---- tx.commit(); + + Notification n = new Notification(Notification.CONSTRUCTION_SPACE_CREATED, c.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); *************** *** 81,84 **** --- 86,92 ---- tx.commit(); + + Notification n = new Notification(Notification.CONSTRUCTION_SPACE_MODIFIED, c.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); *************** *** 101,104 **** --- 109,115 ---- tx.commit(); + + Notification n = new Notification(Notification.CONSTRUCTION_SPACE_DELETED, c.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); Index: SurfaceFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/SurfaceFacade.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SurfaceFacade.java 28 Jul 2005 07:39:05 -0000 1.3 --- SurfaceFacade.java 28 Jul 2005 10:16:02 -0000 1.4 *************** *** 7,10 **** --- 7,12 ---- package net.sourceforge.bprocessor.model; + import net.sourceforge.bprocessor.kernel.notification.Notification; + import net.sourceforge.bprocessor.kernel.notification.Notifier; import net.sourceforge.bprocessor.model.db.HibernateUtil; *************** *** 59,62 **** --- 61,67 ---- tx.commit(); + + Notification n = new Notification(Notification.SURFACE_CREATED, s.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); *************** *** 81,84 **** --- 86,92 ---- tx.commit(); + + Notification n = new Notification(Notification.SURFACE_MODIFIED, s.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); *************** *** 101,104 **** --- 109,115 ---- tx.commit(); + + Notification n = new Notification(Notification.SURFACE_DELETED, s.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); Index: ElementFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ElementFacade.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ElementFacade.java 28 Jul 2005 06:48:54 -0000 1.2 --- ElementFacade.java 28 Jul 2005 10:16:02 -0000 1.3 *************** *** 7,10 **** --- 7,12 ---- package net.sourceforge.bprocessor.model; + import net.sourceforge.bprocessor.kernel.notification.Notification; + import net.sourceforge.bprocessor.kernel.notification.Notifier; import net.sourceforge.bprocessor.model.db.HibernateUtil; *************** *** 59,62 **** --- 61,67 ---- tx.commit(); + + Notification n = new Notification(Notification.ELEMENT_CREATED, e.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); *************** *** 81,84 **** --- 86,92 ---- tx.commit(); + + Notification n = new Notification(Notification.ELEMENT_MODIFIED, e.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); *************** *** 101,104 **** --- 109,115 ---- tx.commit(); + + Notification n = new Notification(Notification.ELEMENT_DELETED, e.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); Index: VertexFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/VertexFacade.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** VertexFacade.java 28 Jul 2005 06:48:54 -0000 1.2 --- VertexFacade.java 28 Jul 2005 10:16:02 -0000 1.3 *************** *** 7,10 **** --- 7,12 ---- package net.sourceforge.bprocessor.model; + import net.sourceforge.bprocessor.kernel.notification.Notification; + import net.sourceforge.bprocessor.kernel.notification.Notifier; import net.sourceforge.bprocessor.model.db.HibernateUtil; *************** *** 59,62 **** --- 61,67 ---- tx.commit(); + + Notification n = new Notification(Notification.VERTEX_CREATED, v.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); *************** *** 81,84 **** --- 86,92 ---- tx.commit(); + + Notification n = new Notification(Notification.VERTEX_MODIFIED, v.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); *************** *** 101,104 **** --- 109,115 ---- tx.commit(); + + Notification n = new Notification(Notification.VERTEX_DELETED, v.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); Index: EdgeFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/EdgeFacade.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EdgeFacade.java 28 Jul 2005 08:01:24 -0000 1.3 --- EdgeFacade.java 28 Jul 2005 10:16:02 -0000 1.4 *************** *** 7,10 **** --- 7,12 ---- package net.sourceforge.bprocessor.model; + import net.sourceforge.bprocessor.kernel.notification.Notification; + import net.sourceforge.bprocessor.kernel.notification.Notifier; import net.sourceforge.bprocessor.model.db.HibernateUtil; *************** *** 59,62 **** --- 61,67 ---- tx.commit(); + + Notification n = new Notification(Notification.EDGE_CREATED, e.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); *************** *** 81,84 **** --- 86,92 ---- tx.commit(); + + Notification n = new Notification(Notification.EDGE_MODIFIED, e.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); *************** *** 101,104 **** --- 109,115 ---- tx.commit(); + + Notification n = new Notification(Notification.EDGE_DELETED, e.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); Index: PartFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/PartFacade.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PartFacade.java 28 Jul 2005 06:48:54 -0000 1.2 --- PartFacade.java 28 Jul 2005 10:16:02 -0000 1.3 *************** *** 7,10 **** --- 7,12 ---- package net.sourceforge.bprocessor.model; + import net.sourceforge.bprocessor.kernel.notification.Notification; + import net.sourceforge.bprocessor.kernel.notification.Notifier; import net.sourceforge.bprocessor.model.db.HibernateUtil; *************** *** 59,62 **** --- 61,67 ---- tx.commit(); + + Notification n = new Notification(Notification.PART_CREATED, p.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); *************** *** 81,84 **** --- 86,92 ---- tx.commit(); + + Notification n = new Notification(Notification.PART_MODIFIED, p.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); *************** *** 101,104 **** --- 109,115 ---- tx.commit(); + + Notification n = new Notification(Notification.PART_DELETED, p.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); Index: FunctionalSpaceFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/FunctionalSpaceFacade.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FunctionalSpaceFacade.java 28 Jul 2005 06:48:54 -0000 1.2 --- FunctionalSpaceFacade.java 28 Jul 2005 10:16:02 -0000 1.3 *************** *** 7,10 **** --- 7,12 ---- package net.sourceforge.bprocessor.model; + import net.sourceforge.bprocessor.kernel.notification.Notification; + import net.sourceforge.bprocessor.kernel.notification.Notifier; import net.sourceforge.bprocessor.model.db.HibernateUtil; *************** *** 59,62 **** --- 61,67 ---- tx.commit(); + + Notification n = new Notification(Notification.FUNCTIONAL_SPACE_CREATED, f.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); *************** *** 81,84 **** --- 86,92 ---- tx.commit(); + + Notification n = new Notification(Notification.FUNCTIONAL_SPACE_MODIFIED, f.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); *************** *** 101,104 **** --- 109,115 ---- tx.commit(); + + Notification n = new Notification(Notification.FUNCTIONAL_SPACE_DELETED, f.getId()); + Notifier.getInstance().sendNotification(n); } catch (Exception ex) { log.error(ex.getMessage(), ex); |
From: Jesper P. <je...@us...> - 2005-07-28 10:15:24
|
Update of /cvsroot/bprocessor/kernel/src/net/sourceforge/bprocessor/kernel/notification In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12849/src/net/sourceforge/bprocessor/kernel/notification Modified Files: Notification.java Log Message: Removed RENAMED and added DESELECTED Index: Notification.java =================================================================== RCS file: /cvsroot/bprocessor/kernel/src/net/sourceforge/bprocessor/kernel/notification/Notification.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Notification.java 18 Jul 2005 09:16:56 -0000 1.4 --- Notification.java 28 Jul 2005 10:15:09 -0000 1.5 *************** *** 22,31 **** public static final String FUNCTIONAL_SPACE_DELETED = "functionalspace.deleted"; - /** Functional space renamed */ - public static final String FUNCTIONAL_SPACE_RENAMED = "functionalspace.renamed"; - /** Functional space selected */ public static final String FUNCTIONAL_SPACE_SELECTED = "functionalspace.selected"; /** Functional space modified */ public static final String FUNCTIONAL_SPACE_MODIFIED = "functionalspace.modified"; --- 22,31 ---- public static final String FUNCTIONAL_SPACE_DELETED = "functionalspace.deleted"; /** Functional space selected */ public static final String FUNCTIONAL_SPACE_SELECTED = "functionalspace.selected"; + /** Functional space deselected */ + public static final String FUNCTIONAL_SPACE_DESELECTED = "functionalspace.deselected"; + /** Functional space modified */ public static final String FUNCTIONAL_SPACE_MODIFIED = "functionalspace.modified"; *************** *** 37,46 **** public static final String CONSTRUCTION_SPACE_DELETED = "constructionspace.deleted"; - /** Construction space renamed */ - public static final String CONSTRUCTION_SPACE_RENAMED = "constructionspace.renamed"; - /** Construction space selected */ public static final String CONSTRUCTION_SPACE_SELECTED = "constructionspace.selected"; /** Construction space modified */ public static final String CONSTRUCTION_SPACE_MODIFIED = "constructionspace.modified"; --- 37,46 ---- public static final String CONSTRUCTION_SPACE_DELETED = "constructionspace.deleted"; /** Construction space selected */ public static final String CONSTRUCTION_SPACE_SELECTED = "constructionspace.selected"; + /** Construction space deselected */ + public static final String CONSTRUCTION_SPACE_DESELECTED = "constructionspace.deselected"; + /** Construction space modified */ public static final String CONSTRUCTION_SPACE_MODIFIED = "constructionspace.modified"; *************** *** 52,61 **** public static final String ELEMENT_DELETED = "element.deleted"; - /** Element renamed */ - public static final String ELEMENT_RENAMED = "element.renamed"; - /** Element selected */ public static final String ELEMENT_SELECTED = "element.selected"; /** Element modified */ public static final String ELEMENT_MODIFIED = "element.modified"; --- 52,61 ---- public static final String ELEMENT_DELETED = "element.deleted"; /** Element selected */ public static final String ELEMENT_SELECTED = "element.selected"; + /** Element deselected */ + public static final String ELEMENT_DESELECTED = "element.deselected"; + /** Element modified */ public static final String ELEMENT_MODIFIED = "element.modified"; *************** *** 67,76 **** public static final String PART_DELETED = "part.deleted"; - /** Part renamed */ - public static final String PART_RENAMED = "part.renamed"; - /** Part selected */ public static final String PART_SELECTED = "part.selected"; /** Part modified */ public static final String PART_MODIFIED = "part.modified"; --- 67,76 ---- public static final String PART_DELETED = "part.deleted"; /** Part selected */ public static final String PART_SELECTED = "part.selected"; + /** Part deselected */ + public static final String PART_DESELECTED = "part.deselected"; + /** Part modified */ public static final String PART_MODIFIED = "part.modified"; *************** *** 82,91 **** public static final String SURFACE_DELETED = "surface.deleted"; - /** Surface renamed */ - public static final String SURFACE_RENAMED = "surface.renamed"; - /** Surface selected */ public static final String SURFACE_SELECTED = "surface.selected"; /** Surface modified */ public static final String SURFACE_MODIFIED = "surface.modified"; --- 82,91 ---- public static final String SURFACE_DELETED = "surface.deleted"; /** Surface selected */ public static final String SURFACE_SELECTED = "surface.selected"; + /** Surface deselected */ + public static final String SURFACE_DESELECTED = "surface.deselected"; + /** Surface modified */ public static final String SURFACE_MODIFIED = "surface.modified"; *************** *** 97,106 **** public static final String EDGE_DELETED = "edge.deleted"; - /** Edge renamed */ - public static final String EDGE_RENAMED = "edge.renamed"; - /** Edge selected */ public static final String EDGE_SELECTED = "edge.selected"; /** Edge modified */ public static final String EDGE_MODIFIED = "edge.modified"; --- 97,106 ---- public static final String EDGE_DELETED = "edge.deleted"; /** Edge selected */ public static final String EDGE_SELECTED = "edge.selected"; + /** Edge deselected */ + public static final String EDGE_DESELECTED = "edge.deselected"; + /** Edge modified */ public static final String EDGE_MODIFIED = "edge.modified"; *************** *** 112,121 **** public static final String VERTEX_DELETED = "vertex.deleted"; - /** Vertex renamed */ - public static final String VERTEX_RENAMED = "vertex.renamed"; - /** Vertex selected */ public static final String VERTEX_SELECTED = "vertex.selected"; /** Vertex modified */ public static final String VERTEX_MODIFIED = "vertex.modified"; --- 112,121 ---- public static final String VERTEX_DELETED = "vertex.deleted"; /** Vertex selected */ public static final String VERTEX_SELECTED = "vertex.selected"; + /** Vertex deselected */ + public static final String VERTEX_DESELECTED = "vertex.deselected"; + /** Vertex modified */ public static final String VERTEX_MODIFIED = "vertex.modified"; |
From: Jesper P. <je...@us...> - 2005-07-28 08:01:34
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20257/src/net/sourceforge/bprocessor/model Modified Files: EdgeFacade.java Log Message: Added findByVertex() Index: EdgeFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/EdgeFacade.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EdgeFacade.java 28 Jul 2005 06:48:54 -0000 1.2 --- EdgeFacade.java 28 Jul 2005 08:01:24 -0000 1.3 *************** *** 192,194 **** --- 192,226 ---- return result; } + + /** + * Find edges that has a vertex + * @param v The vertex + * @return The edges + */ + public Set findByVertex(Vertex v) { + Set result = new HashSet(); + + HibernateUtil hu = HibernateUtil.getInstance(); + try { + Session session = hu.currentSession(); + Transaction tx = session.beginTransaction(); + + Query q = session.createQuery("SELECT e FROM Edge AS e " + + "WHERE e.from.id = :id OR e.to.id = :id"); + q.setLong("id", v.getId().longValue()); + + Iterator it = q.iterate(); + while (it.hasNext()) { + result.add((Edge)it.next()); + } + + tx.commit(); + } catch (Exception ex) { + log.error(ex.getMessage(), ex); + } finally { + hu.closeSession(); + } + + return result; + } } |
From: Jesper P. <je...@us...> - 2005-07-28 07:39:14
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16219/src/net/sourceforge/bprocessor/model Modified Files: SurfaceFacade.java Log Message: Added findByEdge() Index: SurfaceFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/SurfaceFacade.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SurfaceFacade.java 28 Jul 2005 06:48:54 -0000 1.2 --- SurfaceFacade.java 28 Jul 2005 07:39:05 -0000 1.3 *************** *** 192,194 **** --- 192,227 ---- return result; } + + /** + * Find surfaces based upon an edge + * @param e The edge + * @return The surfaces + */ + public Set findByEdge(Edge e) { + Set result = new HashSet(); + + HibernateUtil hu = HibernateUtil.getInstance(); + try { + Session session = hu.currentSession(); + Transaction tx = session.beginTransaction(); + + Query q = session.createQuery("SELECT s FROM Surface AS s " + + "JOIN s.edges AS edges " + + "WHERE edges.id = :id"); + q.setLong("id", e.getId().longValue()); + + Iterator it = q.iterate(); + while (it.hasNext()) { + result.add((Surface)it.next()); + } + + tx.commit(); + } catch (Exception ex) { + log.error(ex.getMessage(), ex); + } finally { + hu.closeSession(); + } + + return result; + } } |
From: Jesper P. <je...@us...> - 2005-07-28 06:56:49
|
Update of /cvsroot/bprocessor/build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9186 Modified Files: build.xml Log Message: Use Hibernate and HSQLDB as libraries Index: build.xml =================================================================== RCS file: /cvsroot/bprocessor/build/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** build.xml 14 Jul 2005 09:50:58 -0000 1.2 --- build.xml 28 Jul 2005 06:56:40 -0000 1.3 *************** *** 59,62 **** --- 59,92 ---- </copy> <copy todir="${release.dir}/library"> + <fileset dir="${tools.dir}/hibernate"/> + </copy> + <copy todir="${release.dir}/library"> + <fileset dir="${tools.dir}/antlr"/> + </copy> + <copy todir="${release.dir}/library"> + <fileset dir="${tools.dir}/asm"/> + </copy> + <copy todir="${release.dir}/library"> + <fileset dir="${tools.dir}/commons-collections"/> + </copy> + <copy todir="${release.dir}/library"> + <fileset dir="${tools.dir}/commons-logging"/> + </copy> + <copy todir="${release.dir}/library"> + <fileset dir="${tools.dir}/cglib"/> + </copy> + <copy todir="${release.dir}/library"> + <fileset dir="${tools.dir}/dom4j"/> + </copy> + <copy todir="${release.dir}/library"> + <fileset dir="${tools.dir}/ehcache"/> + </copy> + <copy todir="${release.dir}/library"> + <fileset dir="${tools.dir}/jta"/> + </copy> + <copy todir="${release.dir}/library"> + <fileset dir="${tools.dir}/hsqldb"/> + </copy> + <copy todir="${release.dir}/library"> <fileset dir="${tools.dir}/jogl"/> </copy> |
From: Jesper P. <je...@us...> - 2005-07-28 06:56:04
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9078/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractTool.java DrawTool.java Log Message: Use new facades in model Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AbstractTool.java 27 Jul 2005 11:04:32 -0000 1.2 --- AbstractTool.java 28 Jul 2005 06:55:56 -0000 1.3 *************** *** 257,261 **** Vertex v = new Vertex("V" + vertexNum); vertexNum++; ! VertexFacade.getInstance().add(v); v.setX(coord[0]); --- 257,261 ---- Vertex v = new Vertex("V" + vertexNum); vertexNum++; ! v = VertexFacade.getInstance().create(v); v.setX(coord[0]); *************** *** 263,266 **** --- 263,268 ---- v.setZ(coord[2]); + VertexFacade.getInstance().update(v); + Notification n = new Notification(Notification.VERTEX_CREATED, v.getId()); Notifier.getInstance().sendNotification(n); *************** *** 284,287 **** --- 286,291 ---- v.setZ(coord[2]); + VertexFacade.getInstance().update(v); + Notification n = new Notification(Notification.VERTEX_MODIFIED, v.getId()); Notifier.getInstance().sendNotification(n); *************** *** 296,303 **** */ protected void removeVertex(Vertex v) { - VertexFacade.getInstance().remove(v); - Notification n = new Notification(Notification.VERTEX_DELETED, v.getId()); Notifier.getInstance().sendNotification(n); } --- 300,307 ---- */ protected void removeVertex(Vertex v) { Notification n = new Notification(Notification.VERTEX_DELETED, v.getId()); Notifier.getInstance().sendNotification(n); + + VertexFacade.getInstance().remove(v); } *************** *** 311,319 **** Edge e = new Edge("E" + edgeNum); edgeNum++; ! EdgeFacade.getInstance().add(e); e.setTo(to); e.setFrom(from); Notification n = new Notification(Notification.EDGE_CREATED, e.getId()); Notifier.getInstance().sendNotification(n); --- 315,325 ---- Edge e = new Edge("E" + edgeNum); edgeNum++; ! e = EdgeFacade.getInstance().create(e); e.setTo(to); e.setFrom(from); + EdgeFacade.getInstance().update(e); + Notification n = new Notification(Notification.EDGE_CREATED, e.getId()); Notifier.getInstance().sendNotification(n); *************** *** 327,330 **** --- 333,338 ---- */ protected void updateEdge(Edge e) { + EdgeFacade.getInstance().update(e); + Notification n = new Notification(Notification.EDGE_MODIFIED, e.getId()); Notifier.getInstance().sendNotification(n); *************** *** 339,346 **** Surface s = new Surface("S" + surfaceNum); surfaceNum++; ! SurfaceFacade.getInstance().add(s); s.setEdges(set); Notification n = new Notification(Notification.SURFACE_CREATED, s.getId()); Notifier.getInstance().sendNotification(n); --- 347,356 ---- Surface s = new Surface("S" + surfaceNum); surfaceNum++; ! s = SurfaceFacade.getInstance().create(s); s.setEdges(set); + SurfaceFacade.getInstance().update(s); + Notification n = new Notification(Notification.SURFACE_CREATED, s.getId()); Notifier.getInstance().sendNotification(n); Index: DrawTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/DrawTool.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DrawTool.java 27 Jul 2005 10:59:56 -0000 1.3 --- DrawTool.java 28 Jul 2005 06:55:56 -0000 1.4 *************** *** 116,120 **** if (to != null) { // we have to change excisting surface ! removeVertex(activeEdge.getTo()); activeEdge.setTo(to); updateEdge(activeEdge); --- 116,125 ---- if (to != null) { // we have to change excisting surface ! Vertex old = activeEdge.getTo(); ! ! activeEdge.setTo(null); ! updateEdge(activeEdge); ! removeVertex(old); ! activeEdge.setTo(to); updateEdge(activeEdge); *************** *** 138,142 **** Vertex from = vertexCollide(coord); if (from == null) { - log.info("[addEdge] made new from"); from = createVertex(coord); } --- 143,146 ---- |