eclipse plugin: Refactor a bit the deserialization...
...to deserialize properly the DependencyListBuilder
This commit is contained in:
parent
e311df23b7
commit
4670419127
2 changed files with 7 additions and 15 deletions
|
@ -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 @@ public class DependencyListBuilder implements Serializable
|
|||
}
|
||||
|
||||
/**
|
||||
* Deserializes this object from the input
|
||||
* @param input The object input stream
|
||||
* @throws IOException
|
||||
* @throws ClassNotFoundException
|
||||
* Deserializes this object with the specified project
|
||||
*/
|
||||
public void deserialize( ObjectInputStream input ) throws IOException, ClassNotFoundException
|
||||
public void deserialize( IProject project )
|
||||
{
|
||||
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_;
|
||||
project_ = project;
|
||||
|
||||
// now, refill the dependency nodes
|
||||
for ( DependencyListNode node : list_.values( ) ) {
|
||||
|
|
|
@ -131,8 +131,12 @@ public class ProjectCache implements Serializable
|
|||
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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue