Author: rob.stryker(a)jboss.com
Date: 2007-05-23 19:13:21 -0400 (Wed, 23 May 2007)
New Revision: 2067
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveDeltaPreNodeFactory.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeDeltaImpl.java
Log:
delta pre nodes were not attached to a model so event manager didn't know where to
fire events
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveDeltaPreNodeFactory.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveDeltaPreNodeFactory.java 2007-05-23
23:12:56 UTC (rev 2066)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveDeltaPreNodeFactory.java 2007-05-23
23:13:21 UTC (rev 2067)
@@ -28,6 +28,7 @@
import org.jboss.ide.eclipse.archives.core.model.IArchive;
import org.jboss.ide.eclipse.archives.core.model.IArchiveFileSet;
import org.jboss.ide.eclipse.archives.core.model.IArchiveFolder;
+import org.jboss.ide.eclipse.archives.core.model.IArchiveModelNode;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNode;
import
org.jboss.ide.eclipse.archives.core.model.internal.ArchiveNodeDeltaImpl.NodeDelta;
import org.jboss.ide.eclipse.archives.core.model.internal.xb.XbFileSet;
@@ -55,13 +56,13 @@
switch(postChange.getNodeType()) {
case IArchiveNode.TYPE_ARCHIVE_FILESET:
XbFileSet fs = createFileset((ArchiveFileSetImpl)postChange, attributeChanges,
propertyChanges);
- return new DeltaFileset(fs, parentDelta, postChange.getProjectPath());
+ return new DeltaFileset(fs, parentDelta, postChange);
case IArchiveNode.TYPE_ARCHIVE_FOLDER:
XbFolder folder = createFolder((ArchiveFolderImpl)postChange, attributeChanges,
propertyChanges);
- return new DeltaFolder(folder, parentDelta, postChange.getProjectPath());
+ return new DeltaFolder(folder, parentDelta, postChange);
case IArchiveNode.TYPE_ARCHIVE:
XbPackage pack = createPackage((ArchiveImpl)postChange, attributeChanges,
propertyChanges);
- return new DeltaArchive(pack, parentDelta, postChange.getProjectPath());
+ return new DeltaArchive(pack, parentDelta, postChange);
}
return null;
@@ -152,18 +153,21 @@
public static class DeltaFileset extends ArchiveFileSetImpl {
// everything goes through the delegate or the parent. Simple
private ArchiveNodeDeltaImpl parentDelta;
- private IPath project;
- public DeltaFileset(XbFileSet fileset, ArchiveNodeDeltaImpl parentDelta, IPath
project){
+ private ArchiveNodeImpl impl;
+ public DeltaFileset(XbFileSet fileset, ArchiveNodeDeltaImpl parentDelta,
ArchiveNodeImpl impl){
super(fileset);
this.parentDelta = parentDelta;
- this.project = project;
+ this.impl = impl;
}
public IArchiveNode getParent() {
return parentDelta == null ? null : parentDelta.getPreNode();
}
public IPath getProjectPath() {
- return project;
+ return impl.getProjectPath();
}
+ public IArchiveModelNode getModel() {
+ return impl.getModel();
+ }
}
/**
@@ -171,18 +175,21 @@
*/
public static class DeltaFolder extends ArchiveFolderImpl {
private ArchiveNodeDeltaImpl parentDelta;
- private IPath project;
- public DeltaFolder(XbFolder folder, ArchiveNodeDeltaImpl parentDelta, IPath project){
+ private ArchiveNodeImpl impl;
+ public DeltaFolder(XbFolder folder, ArchiveNodeDeltaImpl parentDelta, ArchiveNodeImpl
impl){
super(folder);
this.parentDelta = parentDelta;
- this.project = project;
+ this.impl = impl;
}
public IArchiveNode getParent() {
return parentDelta == null ? null : parentDelta.getPreNode();
}
public IPath getProjectPath() {
- return project;
+ return impl.getProjectPath();
}
+ public IArchiveModelNode getModel() {
+ return impl.getModel();
+ }
}
/**
@@ -190,17 +197,20 @@
*/
public static class DeltaArchive extends ArchiveImpl {
private ArchiveNodeDeltaImpl parentDelta;
- private IPath project;
- public DeltaArchive(XbPackage pack, ArchiveNodeDeltaImpl parentDelta, IPath project){
+ private ArchiveNodeImpl impl;
+ public DeltaArchive(XbPackage pack, ArchiveNodeDeltaImpl parentDelta, ArchiveNodeImpl
impl){
super(pack);
this.parentDelta = parentDelta;
- this.project = project;
+ this.impl = impl;
}
public IArchiveNode getParent() {
return parentDelta == null ? null : parentDelta.getPreNode();
}
public IPath getProjectPath() {
- return project;
+ return impl.getProjectPath();
}
+ public IArchiveModelNode getModel() {
+ return impl.getModel();
+ }
}
}
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeDeltaImpl.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeDeltaImpl.java 2007-05-23
23:12:56 UTC (rev 2066)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeDeltaImpl.java 2007-05-23
23:13:21 UTC (rev 2067)
@@ -26,6 +26,7 @@
import java.util.HashMap;
import java.util.Iterator;
+import org.jboss.ide.eclipse.archives.core.model.IArchiveModelListenerManager;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNode;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNodeDelta;
Show replies by date