Author: timotei
Date: Tue Jul 26 17:31:04 2011
New Revision: 50424
URL: http://svn.gna.org/viewcvs/wesnoth?rev=50424&view=rev
Log:
eclipse plugin: Refactor a bit the deserialization
to deserialize properly the DependencyListBuilder
Modified:
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/builder/DependencyListBuilder.java
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/projects/ProjectCache.java
Modified:
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/builder/DependencyListBuilder.java
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/builder/DependencyListBuilder.java?rev=50424&r1=50423&r2=50424&view=diff
==============================================================================
---
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/builder/DependencyListBuilder.java
(original)
+++
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/builder/DependencyListBuilder.java
Tue Jul 26 17:31:04 2011
@@ -8,8 +8,6 @@
*******************************************************************************/
package org.wesnoth.builder;
-import java.io.IOException;
-import java.io.ObjectInputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
@@ -577,21 +575,11 @@
}
/**
- * Deserializes this object from the input
- * @param input The object input stream
- * @throws IOException
- * @throws ClassNotFoundException
- */
- public void deserialize( ObjectInputStream input ) throws IOException,
ClassNotFoundException
- {
- DependencyListBuilder tmp = (DependencyListBuilder) input.readObject(
);
- if ( tmp == null )
- return;
-
- this.currentIndex_ = tmp.currentIndex_;
- this.isCreated_ = tmp.isCreated_;
- this.list_ = tmp.list_;
- this.previous_ = tmp.previous_;
+ * Deserializes this object with the specified project
+ */
+ public void deserialize( IProject project )
+ {
+ project_ = project;
// now, refill the dependency nodes
for ( DependencyListNode node : list_.values( ) ) {
Modified:
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/projects/ProjectCache.java
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/projects/ProjectCache.java?rev=50424&r1=50423&r2=50424&view=diff
==============================================================================
--- trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/projects/ProjectCache.java
(original)
+++ trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/projects/ProjectCache.java
Tue Jul 26 17:31:04 2011
@@ -131,8 +131,12 @@
ObjectInputStream deserializer = new ObjectInputStream(
inputStream );
ProjectCache cache = ( ProjectCache ) deserializer.readObject(
);
+ properties_ = cache.properties_;
configFiles_ = cache.configFiles_;
dependTree_ = cache.dependTree_;
+ variables_ = cache.variables_;
+
+ dependTree_.deserialize( project_ );
}
// invalid file contents. just save this instance to it.
catch ( EOFException e) {
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits