eclipse-xtext / eclipse-xtext/xtext

FileTemplateWizard Validation and Generation triggered on every keystroke

Open
#2,482 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help_wanted
Dominant language
Java
Stars
831
Forks
330
Avg merge
3d 7h
Merged PRs (30d)
12

Description

It seems like the generation and validation methods are triggered on every keystroke in the generated FileTemplateWizard.

In org.eclipse.xtext.ui.wizard.template.NewFileWizardPrimaryPage.createHeader(Composite), a modification listener is attached to the file and folder texts that invokes the validation, which in turn invokes the generation. It seems a bit wasteful and error prone..

Shouldn't the actual generation only occur after the wizard is completed (in the finalise method?), e.g. if there are additional steps on the second screen?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in org.eclipse.xtext.ui.wizard.template.NewFileWizardPrimaryPage.createHeader(Composite) and trace the modification listener into validation and generation. Compare that flow with the finalise method; done means generation is no longer triggered for every keystroke and instead occurs when the wizard is completed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop, tooling
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.