Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336589

Summary: Project Clean gets Resources twice
Product: [Modeling] TMF Reporter: Ed Willink <ed>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Ed Willink CLA 2011-02-08 02:56:37 EST
M5: In an Eclipse workspace comprising a single Xtext nature project and a single Xtext file, invoke Project Clean All. AbstractLinker.afterModelLinked is invoked twice requiring my OCL editors that perform Concrete to Abstract Syntax model mapping in a derived afterModelLinked to convert twice; this is an expensive activity.

[Particularly since the invoking protocol does not identify the sub-tree root that actually needs re-linking.]

The problem appears to be line 271 of ClusteringBuilderState

        resourceSet.getResources().clear(); // Empty the resource set so that the next phase starts afresh.

as result of which the two calls to resourceSet.getResource each start from scratch.
Comment 1 Sven Efftinge CLA 2012-11-20 12:23:24 EST
This has been fixed and only happens if you run low on memory.
Comment 2 Eclipse Webmaster CLA 2017-10-31 11:07:00 EDT
Requested via bug 522520.

-M.
Comment 3 Eclipse Webmaster CLA 2017-10-31 11:18:24 EDT
Requested via bug 522520.

-M.