diff --git a/biz.aQute.bndlib/src/aQute/bnd/build/model/BndEditModel.java b/biz.aQute.bndlib/src/aQute/bnd/build/model/BndEditModel.java index 19cd872717..8983b56a1d 100644 --- a/biz.aQute.bndlib/src/aQute/bnd/build/model/BndEditModel.java +++ b/biz.aQute.bndlib/src/aQute/bnd/build/model/BndEditModel.java @@ -112,7 +112,7 @@ public class BndEditModel { private Properties properties = new UTF8Properties(); private final Map objectProperties = new HashMap<>(); private final Map changesToSave = new TreeMap<>(); - private Project project; + private Project bndrun; private volatile boolean dirty; @@ -384,7 +384,7 @@ public BndEditModel(IDocument document) throws IOException { public BndEditModel(Project bndrun) throws IOException { this(bndrun.getWorkspace()); - this.project = bndrun; + this.bndrun = bndrun; File propertiesFile = bndrun.getPropertiesFile(); if (propertiesFile.isFile()) this.document = new Document(IO.collect(propertiesFile)); @@ -400,13 +400,13 @@ public BndEditModel(Project bndrun) throws IOException { * Workspace/Project/sub bnd files files */ Processor getOwner() { - File propertiesFile = project.getPropertiesFile(); + File propertiesFile = bndrun.getPropertiesFile(); if (!propertiesFile.getName() .endsWith(".bnd")) - return project; + return bndrun; return workspace.findProcessor(propertiesFile) - .orElse(project); + .orElse(bndrun); } public void loadFrom(IDocument document) throws IOException { @@ -1253,11 +1253,11 @@ private boolean hasIncludeResourceHeaderLikeInstruction() { } public void setProject(Project project) { - this.project = project; + this.bndrun = project; } public Project getProject() { - return project; + return bndrun; } public Workspace getWorkspace() { @@ -1290,10 +1290,10 @@ public Processor getProperties() throws Exception { File source = getBndResource(); Processor parent; - if (project != null) { - parent = project; + if (bndrun != null) { + parent = bndrun; if (source == null) { - source = project.getPropertiesFile(); + source = bndrun.getPropertiesFile(); } } else if (workspace != null && isCnf()) { parent = workspace; @@ -1366,7 +1366,7 @@ public Map getDocumentChanges() { */ public void saveChanges() throws IOException { assert document != null - && project != null : "you can only call saveChanges when you created this edit model with a project"; + && bndrun != null : "you can only call saveChanges when you created this edit model with a project"; saveChangesTo(document); store(document, getProject().getPropertiesFile()); @@ -1383,7 +1383,7 @@ public ResolutionInstructions.ResolveMode getResolveMode() { try { return aQute.lib.converter.Converter.cnv(ResolutionInstructions.ResolveMode.class, resolve); } catch (Exception e) { - project.error("Invalid value for %s: %s. Allowed values are %s", Constants.RESOLVE, resolve, + bndrun.error("Invalid value for %s: %s. Allowed values are %s", Constants.RESOLVE, resolve, ResolutionInstructions.ResolveMode.class.getEnumConstants()); } } @@ -1407,7 +1407,7 @@ public void setDirty(boolean isDirty) { } public void load() throws IOException { - loadFrom(project.getPropertiesFile()); + loadFrom(bndrun.getPropertiesFile()); } /**