Skip to content

Conversation

Copy link

Copilot AI commented Nov 13, 2025

When a project's .project file is deleted but the workspace metadata contains natures and buildspec (added in eclipse-platform#2033), opening the project now succeeds by restoring from metadata instead of failing with an error dialog.

Changes

FileSystemResourceManager.java - Modified read() to attempt recovery:

  • When .project is missing, create description from private metadata
  • If natures or buildspec present, log warning and return restored description
  • If no useful data, throw original error (backward compatible)
  • Restored description is written to disk by existing SaveManager.saveMetaInfo() flow

IProjectTest.java - Added test coverage:

  • testOpenProjectWithMissingDotProjectButPrivateMetadata verifies project opens successfully and .project is recreated after workspace save

Behavior

Before:

Project closed → Delete .project → Try to open → Error: "project description file missing"

After:

Project closed → Delete .project → Try to open → Success (if metadata has natures/buildspec)
Warning logged: "project description file was missing... A new file has been created"
Next workspace save → .project recreated

Fixes eclipse-platform#2272

Original prompt

Propose a fix for eclipse-platform#2272


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix issue related to protocol handler registration Restore project description from private metadata when .project is missing Nov 13, 2025
Copilot AI requested a review from laeubi November 13, 2025 10:41
Copilot finished work on behalf of laeubi November 13, 2025 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support open closed projects with missing .project file

2 participants