Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 498324 - Improve the Dot Xtext editor content assistant support
Summary: Improve the Dot Xtext editor content assistant support
Status: RESOLVED FIXED
Alias: None
Product: GEF
Classification: Tools
Component: GEF DOT (show other bugs)
Version: 1.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 5.0.0 (Oxygen) M1   Edit
Assignee: Tamas Miklossy CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-22 03:40 EDT by Tamas Miklossy CLA
Modified: 2016-08-08 10:03 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tamas Miklossy CLA 2016-07-22 03:40:01 EDT
The content assistant support of the Dot Xtext editor should propose the valid attribute names and the valid attribute values considering the current context.
Comment 1 Tamas Miklossy CLA 2016-07-29 03:07:27 EDT
As a preparation step, I pushed the following changes to origin/master:

[498324] Move AttributeContext from DotJavaValidator to DotAttributes.

- The dot attribute context information is needed not only for
validation but also for the content assistant, so move these
information into the DotAttributes class.
Comment 2 Tamas Miklossy CLA 2016-07-31 13:04:17 EDT
I pushed the following changes to origin/master:

[498324] Improve the Dot Xtext editor content assistant support.

- Extend the GenerateDot.mwe2 workflow to generate content assistant
support for the dot sub-grammars: DotArrowTypeProposalProvider,
DotPointProposalProvider, DotShapeProposalProvider,
DotSplineTypeProposalProvider, DotStyleProposalProvider.

- Extend the DotProposalProvider class with the content assistant logic
for proposing the valid attribute names and the valid attribute values
considering the current context. Add the DotProposalProviderDelegator
class to delegate the content assistant logic to the proposal provider
of the corresponding sub-grammar.

- Implement corresponding test cases within the DotContentAssistTest
class (should be executed as JUnit Plug-in Test).
Comment 3 Tamas Miklossy CLA 2016-07-31 13:04:43 EDT
I pushed the following changes to origin/master:

[498324] Fix failing Dot xtext editor content assistant test cases.

- Avoid the presence of different dot grammar instances provided by
different Dot injectors (ensure that the dot grammar instance remains
singleton during the content assistant test execution).
- Inject the DotJavaValidator static field within the DotAttributes
class directly instead of using an additionally created dot injector.
- Request the injection of the DotAttributes static fields within the
DotRuntimeModule configure() method.
Comment 4 Tamas Miklossy CLA 2016-07-31 13:05:36 EDT
The integration of the DotContentAssistTest test cases into the maven build process (should be executed as JUnit Plug-in Test) still has to be done.
Comment 5 Tamas Miklossy CLA 2016-08-06 06:25:35 EDT
I pushed the following changes to origin/master:

[498324] Integrate the Content Assist Test Cases into the build process.

- Use the tycho surefire plugin to execute the dot plugin ui test cases.
- Use the maven surefire plugin to execute the dot junit test cases.
- Add explicit dependency to junit to let the maven surefire plugin pick
up the test cases properly.

Resolving as fixed in 5.0.0 M1.
Comment 6 Alexander Nyßen CLA 2016-08-06 07:48:51 EDT
Why can we not use Tycho Surefire tests alone? I would rather like to have one test infrastructure only.
Comment 7 Tamas Miklossy CLA 2016-08-08 10:03:04 EDT
The Dot Content Assist test cases have been integrated into the already existing Dot Test Suite (has been renamed from AllTests to AllUiTests). The pom.xml file of the dot test bundle has also been adapted to process the AllUiTests test suite using the tycho-surefire plugin with the right parameters: useUIHarness=true, useUIThread=true.