eclipse-platform / eclipse-platform/eclipse.platform
Project description links information is not reconciled on project close and reopen
- Vorherrschende Sprache
- Java
- Sterne
- 165
- Forks
- 174
- Ø Merge
- 2 T. 8 Std.
- Gemergte PRs (30 T.)
- 22
Beschreibung
In our product, we have a builder that reads linked folders. The builder runs into a NPE, due to stale links information. The stale links information results due to the following sequence:
1. Debug Eclipse with a breakpoint at the start of `Project.reconcileLinksAndGroups()`.
2. Create a Java project.
3. Add a linked source folder to some folder on disk.
4. Close the project.
5. Delete the information about the link from the .project file on disk, e.g. delete the following block (location will be different):
```
test
2
/data/tmp/test
```
6. Open the project in Eclipse.
7. Observe `oldDescription.getLinks()` returns `null` and so nothing is done to refresh the links information.
The information about links in the project description is not persisted in `LocalMetaArea.writePrivateDescription()` and is also not read in `LocalMetaArea.readPrivateDescription()`. We should fix this, to ensure up-to-date links information in the project description after opening a closed project.
Beitragsleitfaden
Rechercherichtung
Beginne mit LocalMetaArea.writePrivateDescription() und LocalMetaArea.readPrivateDescription(), und verfolge dann Project.reconcileLinksAndGroups(), während du die Sequenz aus Schließen, Bearbeiten von .project und erneutem Öffnen reproduzierst. Erledigt bedeutet, dass die Informationen zu verknüpften Ressourcen persistiert und gelesen werden, sodass beim erneuten Öffnen die Projektbeschreibung aktualisiert wird, statt dass oldDescription.getLinks() null bleibt und eine NPE im Builder verursacht.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- devtools, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100