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

Bug 321536

Summary: Many linked resources are not resolved after eclipse restart
Product: [Modeling] TMF Reporter: Benjamin Schwertfeger <benjamin.schwertfeger>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: sebastian.zarnekow, sven.efftinge
Version: 1.0.0Flags: sebastian.zarnekow: helios+
Target Milestone: SR1   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Patch for different parameter on file reading, but in emf-gen folder sven.efftinge: iplog+

Description Benjamin Schwertfeger CLA 2010-08-02 16:22:36 EDT
The EMFBasedPresenter writes encoded URL's when exit eclipse and load the PersistableResourceDescriptionsImpl from disk with explicit encode url set to true. This causes urls with encoded characters to fail after reload and requires a project clean to work again.
Comment 1 Benjamin Schwertfeger CLA 2010-08-02 16:26:07 EDT
Created attachment 175731 [details]
Patch for different parameter on file reading, but in emf-gen folder

This patch fixes the encoding problem by setting ignoreEncoding for URI creation. The code is changed in the emf-gen folder, so there should be a better place to do this.
Comment 2 Benjamin Schwertfeger CLA 2010-08-03 03:36:12 EDT
I have to mention, that "after eclipse start" means here, that I changed something inside the file, directly after startup. The Container of the global scope provider is wrong for URI's with encoded characters and not requested for elements.
Comment 3 Sebastian Zarnekow CLA 2010-08-03 03:49:13 EDT
Scheduled for SR1. Thanks for the detailed report.
Comment 4 Sebastian Zarnekow CLA 2010-08-03 04:16:47 EDT
Benjamin,

could you provide a testcase or a reproducable example that illustrates the issue?
Comment 5 Benjamin Schwertfeger CLA 2010-08-03 06:46:18 EDT
An example are all Model files with a space in the name. 

1) I used the default xtext-project and changed the model to:

Model:
    greeting=Greeting
	'(' firstRef=[Greeting] ')'
    '(' secondRef=[Greeting] ')';

Greeting:
	'Hello' name=ID '!';

2) run the workflow
3) start runtime instance
4) create a new plain Project from general
5) add Xtext nature to the project
6) create two model files 'Copy of model.mysql' and 'Copy (2) of model.mydsl'
7) reference in each file both greetings:
Copy of model.mysql:
Hello hello !
(hello2)
(hello)

Copy (2) of model.mysql:
Hello hello2 !
(hello2)
(hello)

8) save and close the runtime instance
9) start the runtime again and open 'Copy of model.mysql'
10) enter a space somewhere o trigger validation and see the missing references
11) perform a clean and everything is correct again
Comment 6 Sven Efftinge CLA 2010-08-04 05:04:48 EDT
fixed in HEAD
Comment 7 Karsten Thoms CLA 2017-09-19 17:27:16 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 8 Karsten Thoms CLA 2017-09-19 17:38:31 EDT
Closing all bugs that were set to RESOLVED before Neon.0