[jboss-cvs] jbosside/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console ...
Max Rydahl Andersen
mandersen at jboss.com
Fri Aug 25 07:39:38 EDT 2006
User: mandersen
Date: 06/08/25 07:39:38
Modified: hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console
HibernateConsolePlugin.java
HibernateConsoleSaveParticipant.java
Log:
HBX-736 old hibernate-console.xml's is not being deleted
Revision Changes Path
1.28 +1 -1 jbosside/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: HibernateConsolePlugin.java
===================================================================
RCS file: /cvsroot/jboss/jbosside/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- HibernateConsolePlugin.java 10 Aug 2006 07:01:52 -0000 1.27
+++ HibernateConsolePlugin.java 25 Aug 2006 11:39:38 -0000 1.28
@@ -234,7 +234,7 @@
}
void writeStateTo(File f) {
- System.out.println("write state to" + f);
+ //System.out.println("write state to" + f);
KnownConfigurations.getInstance().writeStateTo(f);
}
1.6 +6 -6 jbosside/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleSaveParticipant.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: HibernateConsoleSaveParticipant.java
===================================================================
RCS file: /cvsroot/jboss/jbosside/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleSaveParticipant.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- HibernateConsoleSaveParticipant.java 7 Jul 2006 13:51:11 -0000 1.5
+++ HibernateConsoleSaveParticipant.java 25 Aug 2006 11:39:38 -0000 1.6
@@ -47,16 +47,16 @@
public void saving(ISaveContext context) throws CoreException {
switch (context.getKind() ) {
case ISaveContext.FULL_SAVE:
- HibernateConsolePlugin myPluginInstance = HibernateConsolePlugin
- .getDefault();
// save the plug-in state
int saveNumber = context.getSaveNumber();
String saveFileName = SAVENAME + "-" + Integer.toString(saveNumber);
- File f = myPluginInstance.getStateLocation().append(saveFileName)
+ File f = HibernateConsolePlugin
+ .getDefault().getStateLocation().append(saveFileName)
.toFile();
// if we fail to write, an exception is thrown and we do not update
// the path
- myPluginInstance.writeStateTo(f);
+ HibernateConsolePlugin
+ .getDefault().writeStateTo(f);
context.map(new Path(SAVENAME), new Path(saveFileName) );
context.needSaveNumber();
break;
@@ -80,7 +80,7 @@
// delete the old saved state since it is not necessary anymore
int previousSaveNumber = context.getPreviousSaveNumber();
- String oldFileName = "save-" + Integer.toString(previousSaveNumber);
+ String oldFileName = SAVENAME + "-" + Integer.toString(previousSaveNumber);
File f = myPluginInstance.getStateLocation().append(oldFileName)
.toFile();
//System.out.println("delete " + f);
@@ -94,7 +94,7 @@
// since the save operation has failed, delete the saved state we have
// just written
int saveNumber = context.getSaveNumber();
- String saveFileName = "save-" + Integer.toString(saveNumber);
+ String saveFileName = SAVENAME + "-" + Integer.toString(saveNumber);
File f = myPluginInstance.getStateLocation().append(saveFileName)
.toFile();
f.delete();
More information about the jboss-cvs-commits
mailing list