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

Bug 351159

Summary: Smart paste in pom editor
Product: z_Archived Reporter: Pascal Rapicault <pascal>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED INVALID QA Contact:
Severity: enhancement    
Priority: P3 CC: igor, mkleint
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Pascal Rapicault CLA 2011-07-05 06:09:46 EDT
On a lot of webpage I can find snippets of XML explaining how to consume a library with Maven. It would be great if I could copy  those as is, paste them into the pom editor and have the editor take  care of putting them in the appropriate place in my XML.
Comment 1 Milos Kleint CLA 2011-07-18 06:12:03 EDT
I see the main problem with the feature in discoverability. I personally would not expect the editor to do it so I would always paste into the right position only.
are there other examples of similar behaviour in other eclipse (xml) editors? 

2 main cases: 
a. enclosing element(s) is missing in the file - wrap the pasted snipped into the enclosing ones on paste at current location or best guess location. Do we take caret position in file as context? eg. when in <profile> do we generate the <dependencies> section in the profile?
b. enclosing elements are present elsewhere - paste in the right location and jump to the new location with caret
Comment 2 Igor Fedorenko CLA 2013-09-28 23:50:52 EDT
closing old/stale bugreports
Comment 3 Denis Roy CLA 2021-04-19 13:23:41 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/