mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEADEV-41212: Created an artifact from a folder, then renamed the artifact and it broke the link with the artifact I extracted it from (90.137)
This commit is contained in:
@@ -33,5 +33,8 @@ public interface ArtifactModel {
|
||||
@NotNull
|
||||
Artifact getArtifactByOriginal(@NotNull Artifact artifact);
|
||||
|
||||
@NotNull
|
||||
Artifact getOriginalArtifact(@NotNull Artifact artifact);
|
||||
|
||||
Collection<? extends Artifact> getArtifactsByType(@NotNull ArtifactType type);
|
||||
}
|
||||
|
||||
@@ -24,11 +24,14 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface ArtifactPointer {
|
||||
|
||||
@NotNull
|
||||
String getName();
|
||||
String getArtifactName();
|
||||
|
||||
@Nullable
|
||||
Artifact getArtifact();
|
||||
|
||||
@NotNull
|
||||
String getArtifactName(@NotNull ArtifactModel artifactModel);
|
||||
|
||||
@Nullable
|
||||
Artifact findArtifact(@NotNull ArtifactModel artifactModel);
|
||||
|
||||
|
||||
+4
-2
@@ -27,7 +27,9 @@ public abstract class ArtifactPointerManager {
|
||||
return ServiceManager.getService(project, ArtifactPointerManager.class);
|
||||
}
|
||||
|
||||
public abstract ArtifactPointer create(@NotNull String name);
|
||||
public abstract ArtifactPointer createPointer(@NotNull String name);
|
||||
|
||||
public abstract ArtifactPointer create(@NotNull Artifact artifact);
|
||||
public abstract ArtifactPointer createPointer(@NotNull Artifact artifact);
|
||||
|
||||
public abstract ArtifactPointer createPointer(@NotNull Artifact artifact, @NotNull ArtifactModel artifactModel);
|
||||
}
|
||||
|
||||
+9
-2
@@ -35,10 +35,17 @@ public interface ModifiableArtifactModel extends ArtifactModel {
|
||||
@NotNull
|
||||
ModifiableArtifact getOrCreateModifiableArtifact(@NotNull Artifact artifact);
|
||||
|
||||
@Nullable
|
||||
Artifact getModifiableCopy(Artifact artifact);
|
||||
|
||||
void addListener(@NotNull ArtifactListener listener);
|
||||
|
||||
void removeListener(@NotNull ArtifactListener listener);
|
||||
|
||||
|
||||
boolean isModified();
|
||||
|
||||
void commit();
|
||||
|
||||
@Nullable
|
||||
Artifact getModifiableCopy(Artifact artifact);
|
||||
void dispose();
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.roots.libraries.Library;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.packaging.artifacts.Artifact;
|
||||
import com.intellij.packaging.artifacts.ArtifactPointer;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -53,6 +54,9 @@ public abstract class PackagingElementFactory {
|
||||
@NotNull
|
||||
public abstract List<? extends PackagingElement<?>> createLibraryElements(@NotNull Library library);
|
||||
|
||||
@NotNull
|
||||
public abstract PackagingElement<?> createArtifactElement(@NotNull ArtifactPointer artifactPointer, @NotNull Project project);
|
||||
|
||||
@NotNull
|
||||
public abstract PackagingElement<?> createArtifactElement(@NotNull Artifact artifact, @NotNull Project project);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user