mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
artifacts pointers fixed (IDEA-27203 & IDEA-27189)
This commit is contained in:
+4
-3
@@ -314,12 +314,13 @@ public class ArtifactManagerImpl extends ArtifactManager implements ProjectCompo
|
||||
myModel.setArtifactsList(allArtifacts);
|
||||
myModificationCount++;
|
||||
final ArtifactListener publisher = myProject.getMessageBus().syncPublisher(TOPIC);
|
||||
for (ArtifactImpl artifact : added) {
|
||||
publisher.artifactAdded(artifact);
|
||||
}
|
||||
for (ArtifactImpl artifact : removed) {
|
||||
publisher.artifactRemoved(artifact);
|
||||
}
|
||||
//it's important to send 'removed' events before 'added'. Otherwise when artifacts are reloaded from xml artifact pointers will be damaged
|
||||
for (ArtifactImpl artifact : added) {
|
||||
publisher.artifactAdded(artifact);
|
||||
}
|
||||
for (Pair<ArtifactImpl, String> pair : changed) {
|
||||
publisher.artifactChanged(pair.getFirst(), pair.getSecond());
|
||||
}
|
||||
|
||||
+7
-1
@@ -103,7 +103,13 @@ public class ArtifactPointerManagerImpl extends ArtifactPointerManager {
|
||||
public ArtifactPointer createPointer(@NotNull Artifact artifact) {
|
||||
ArtifactPointerImpl pointer = myPointers.get(artifact);
|
||||
if (pointer == null) {
|
||||
pointer = new ArtifactPointerImpl(artifact);
|
||||
pointer = myUnresolvedPointers.get(artifact.getName());
|
||||
if (pointer != null) {
|
||||
pointer.setArtifact(artifact);
|
||||
}
|
||||
else {
|
||||
pointer = new ArtifactPointerImpl(artifact);
|
||||
}
|
||||
myPointers.put(artifact, pointer);
|
||||
}
|
||||
return pointer;
|
||||
|
||||
Reference in New Issue
Block a user