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

Bug 354806

Summary: [dot4zest] DotGraph file parsing error
Product: [Tools] GEF Reporter: wondawg3
Component: GEF-Legacy ZestAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: steeg
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description wondawg3 CLA 2011-08-16 06:09:25 EDT
Build Identifier: 20110615-0604

Whenever I pass a graph file into DotGraph constructor, the XML parser gives the following error message.
  File file = new File("./sample.graph");
  DotGraph graph = new DotGraph(file, parent, SWT.NONE);

> org.xml.sax.SAXParseException: Content is not allowed in prolog.

It works properly when I use the plain string variable containing the exact same contents as the graph file, so I guess the contents of the file are valid.

Thx,

Reproducible: Always

Steps to Reproduce:
1. Pass a graph file into DotGraph() constructor.
2.
3.
Comment 1 Fabian Steeg CLA 2011-08-16 09:28:08 EDT
Thanks for your report. The issue is the file extension, which has to be "dot".

I've added a clearer error message in master (see TestDotAst#extensionError).
Comment 2 wondawg3 CLA 2011-08-17 00:49:58 EDT
Great!! It works with .dot file extension.
Thanks for your help.