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

Bug 491261

Summary: Merge DotImport and DotInterpreter into a single Xtend-based DotImport (comparable to DotExport)
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: GEF DOTAssignee: Tamas Miklossy <miklossy>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: miklossy
Version: 1.0.0   
Target Milestone: 5.0.0 (Oxygen) M1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 495456    
Bug Blocks:    
Attachments:
Description Flags
Patch representing integrating the DotInterpreter into the DotImport none

Description Alexander Nyßen CLA 2016-04-07 11:30:33 EDT
We should create a new Xtend-based DotImport that provides the reverse functionality of DotExport. It should comprise the current Java-based DotImport and DotInterpreter. 

Using Xtend-create functions, we should be able to do the interpretation of DOT (to a GEF4 Graph) in a much conciser way then by using an EMF switch. 

We should IMHO also drop support for importing dot substrings when recreating DotImport. Its seems that the behavior in conflict cases is not really determined, and I would rather opt for a cleaner API is dual to that of DotExport.
Comment 1 Alexander Nyßen CLA 2016-04-08 03:43:32 EDT
I pushed the following changes to origin/master:

- Created a simple Xtend-based DotImport that replaces the current Java-based implementation.
- Adjusted the API to resemble that of DotExport, dropping support for importing of DOT substrings.
Comment 2 Tamas Miklossy CLA 2016-07-22 05:38:08 EDT
I pushed the following changes to origin/master and to origin/R4_0_maintenance:

- Embed the DotInterpreter java class into the DotImport xtend class.
Use the xtend create function and lambda expressions to make the
implementation of the dot import logic more concise.
- Embed the test cases defined within the DotInterpreterTests class into
the DotImportTests class (eliminate 6 redundant test cases, improve
other DotImport test cases).
- Delete the DotInterpreter.java and the DotInterpreterTests.java files.

Resolving as fixed in 4.1.0 M1.
Comment 3 Tamas Miklossy CLA 2016-07-22 09:46:16 EDT
Created attachment 263263 [details]
Patch representing integrating the DotInterpreter into the DotImport
Comment 4 Tamas Miklossy CLA 2016-07-22 09:48:36 EDT
Commit has been reverted and bug reopened. The problem can be solved as soon as Java 7 is not any more supported. Set "Depends on" and added patch.
Comment 5 Tamas Miklossy CLA 2016-07-27 03:34:08 EDT
Since the Java 7 support has been dropped within the origin/master branch, I pushed the following changes into origin/master that has been previously reverted:

[491261] Merge DotInterpreter into DotImport.

- Embed the DotInterpreter java class into the DotImport xtend class.
Use the xtend create function and lambda expressions to make the
implementation of the dot import logic more concise.
- Embed the test cases defined within the DotInterpreterTests class into
the DotImportTests class (eliminate 6 redundant test cases, improve
other DotImport test cases).
- Delete the DotInterpreter.java and the DotInterpreterTests.java files.

I also pushed a follow-up commit into the origin/master concluding the following bugfixing:

- Let the DotImport consider the global nodes attributes only if the
node has just been created.
- Implement corresponding DotImport test cases.

Resolving as fixed in 5.0.0 M1.