|
From: <caw...@us...> - 2007-02-19 14:24:21
|
Revision: 1969
http://svn.sourceforge.net/rubyeclipse/?rev=1969&view=rev
Author: cawilliams
Date: 2007-02-19 06:24:20 -0800 (Mon, 19 Feb 2007)
Log Message:
-----------
fix problem where we could never load the variables and containers file
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyModelManager.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyModelManager.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyModelManager.java 2007-02-18 16:54:06 UTC (rev 1968)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyModelManager.java 2007-02-19 14:24:20 UTC (rev 1969)
@@ -891,38 +891,9 @@
try {
in = new DataInputStream(new BufferedInputStream(new FileInputStream(file)));
switch (in.readInt()) {
- case 2 :
+ case VARIABLES_AND_CONTAINERS_FILE_VERSION :
new VariablesAndContainersLoadHelper(in).load();
break;
- case 1 : // backward compatibility, load old format
- // variables
- int size = in.readInt();
- while (size-- > 0) {
- String varName = in.readUTF();
- String pathString = in.readUTF();
- if (CP_ENTRY_IGNORE.equals(pathString))
- continue;
- IPath varPath = Path.fromPortableString(pathString);
- this.variables.put(varName, varPath);
- this.previousSessionVariables.put(varName, varPath);
- }
-
- // containers
- IRubyModel model = getRubyModel();
- int projectSize = in.readInt();
- while (projectSize-- > 0) {
- String projectName = in.readUTF();
- IRubyProject project = model.getRubyProject(projectName);
- int containerSize = in.readInt();
- while (containerSize-- > 0) {
- IPath containerPath = Path.fromPortableString(in.readUTF());
- int length = in.readInt();
- byte[] containerString = new byte[length];
- in.readFully(containerString);
- recreatePersistedContainer(project, containerPath, new String(containerString), true/*add to container values*/);
- }
- }
- break;
}
} catch (IOException e) {
if (file.exists())
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|