Community
Participate
Working Groups
Steps to reproduce: - Create a new project using the quickstart archetype - Go in the editor, notice that the form based editor content is correct (GAV is present) - Go in the xml editor, completely delete the dependencies section - Use Insert Dependency content assist to add a dependency on spring-core - Save - Go back to the overview page, notice that the GAV is gone
sorry, cannot reproduce. can you reproduce reliably on your side?
I'm running: - Eclipse SDK 3.7.0.I20101208-1300 org.eclipse.sdk.ide - m2e - Maven Integration for Eclipse (Incubation) 0.13.0.201102272105 org.eclipse.m2e.feature.feature.group and I can still reproduces the error. The steps seem to be even simpler: - Create the project using quickstart archetype - Go in the editor, notice that the form based editor content is correct (GAV is present) - Go in the xml editor, completely delete the dependencies section - Save, go back to the overview tab
I debugged this a little, the problem is actually pretty funny. The problem only occurs if you delete the dependencies one line at a time. Once you've removed the dependencies, dependency & groupId elements the dependency's artifactId element is now a child of the project element. This causes some sort of collision which sets the artifactId to null on the EMF model. I assume the value doesn't get reset because the correct artifactId element isn't modified.
Matt, great thanks for debugging. I would have to force Pascal to create a movie of his actions otherwise. :) It's indeed somewhat funny situation. I'm not convince we need to fix for M6 (given that you need rather special steps to reproduce and the problem was probably present since day 1) -> M7. The solution I can see is rewrite the pom editor not to use the emf model for reading. The new problem that arises then is how to recognized change done in the xml editor or other panels. We shall only update the panel content when it's becoming visible (user switches to it) That will have us run less code on user updates (good) and will rely on the user switching only after doing a series of edits and leaving the document in (relatively) good state. As an added bonus, opening of the pom editor could be faster then as well. Since we will loose the elaborate fine grained notifications from EMF (it tells us for example that a Dependency object has changed only). That will unlikely pose a problem for the Overview page, but might be more important for the other pages, like Dependencies. eg. if the user changes just the version/artifactId in the dependency. Then it can be recognized as Remove of old dependency and Add of the new one instead of the change inside one dependency. Not sure if that aspect is important or not. The only visual effect can be lost selection in the dependencies lists..
fixed by changes done on branch http://git.eclipse.org/c/m2e/m2e-core.git/log/?h=milos_m7_buffer not in master yet
in master now, as far as I can tell the issue is fixed, please verify
Moved to https://github.com/eclipse-m2e/m2e-core/issues/