Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 202339 Details for
Bug 355228
Modifications to the EModelService.cloneElement() API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
API changes
bug355228.txt (text/plain), 2.17 KB, created by
Dean Roberts
on 2011-08-29 11:31:55 EDT
(
hide
)
Description:
API changes
Filename:
MIME Type:
Creator:
Dean Roberts
Created:
2011-08-29 11:31:55 EDT
Size:
2.17 KB
patch
obsolete
>diff --git src/org/eclipse/e4/ui/internal/workbench/ModelServiceImpl.java src/org/eclipse/e4/ui/internal/workbench/ModelServiceImpl.java >index 7229520..913bf04 100644 >--- src/org/eclipse/e4/ui/internal/workbench/ModelServiceImpl.java >+++ src/org/eclipse/e4/ui/internal/workbench/ModelServiceImpl.java >@@ -247,18 +247,12 @@ > * @see org.eclipse.e4.ui.workbench.modeling.EModelService#cloneElement(org.eclipse.e4.ui.model. > * application.ui.MUIElement, java.lang.String) > */ >- public MUIElement cloneElement(MUIElement element, String cloneId, boolean saveAsSnippet) { >+ public MUIElement cloneElement(MUIElement element, MUIElement snippetContainer) { > EObject eObj = (EObject) element; > MUIElement clone = (MUIElement) EcoreUtil.copy(eObj); >- clone.setElementId(cloneId); > >- if (saveAsSnippet) { >- MUIElement topWin = getTopLevelWindowFor(element); >- if (topWin != null) { >- MUIElement appElement = topWin.getParent(); >- MApplication app = (MApplication) appElement; >- app.getClonableSnippets().add(clone); >- } >+ if (snippetContainer != null) { >+ snippetContainer.getClonableSnippets().add(clone); > } > > return clone; >diff --git src/org/eclipse/e4/ui/workbench/modeling/EModelService.java src/org/eclipse/e4/ui/workbench/modeling/EModelService.java >index 66090cb..e2bc8e9 100644 >--- src/org/eclipse/e4/ui/workbench/modeling/EModelService.java >+++ src/org/eclipse/e4/ui/workbench/modeling/EModelService.java >@@ -162,14 +162,12 @@ > * > * @param element > * The element to clone >- * @param cloneId >- * The id to give the newly coned element >- * @param saveAsSnippet >- * iff <code>true</code> saves the newly created clone into the app's >- * 'clonableSnippets' list >+ * @param snippetContainer >+ * An optional MUIElement where the cloned snippet is to be saved. null if the clone >+ * need not be saved > * @return The newly cloned element > */ >- public MUIElement cloneElement(MUIElement element, String cloneId, boolean saveAsSnippet); >+ public MUIElement cloneElement(MUIElement element, MUIElement snippetContainer); > > /** > * If a snippet with the given id exists a clone is created and returned. returns
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 355228
: 202339