Bug 178250 - Exception from stereotype application copier
Summary: Exception from stereotype application copier
Status: VERIFIED FIXED
Alias: None
Product: MDT.UML2
Classification: Modeling
Component: Core (show other bugs)
Version: 2.1.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1.0   Edit
Assignee: James Bruck CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-03-20 09:30 EDT by James Bruck CLA
Modified: 2012-05-22 11:47 EDT (History)
1 user (show)

See Also:
Kenn.Hussey: pmc_approved+


Attachments
added guards to ensure target is changeable. (11.45 KB, patch)
2007-05-23 14:28 EDT, James Bruck CLA
Kenn.Hussey: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Bruck CLA 2007-03-20 09:30:39 EDT
Steps:
1. Create a uml profile project and profile
2. Create a stereotype in the profile
3. Create a metaclass extension to "Class"
4. Create an attribute "x:Integer" in the stereotype
5. Save 
6. Create a uml project and blank model
7. Apply the profile to the blank model
8. Add a class to the model
9. Apply the stereotype to the class
10. Save all
11. In the profile, open the properties for the "x" attribute and select the "Read Only" checkbox
12. Close the uml model
13. Open the uml model.  
14. reapply

Stack Trace:
java.lang.IllegalArgumentException: The feature 'x' is not a valid changeable feature
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(Unknown Source)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(Unknown Source)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(Unknown Source)
at org.eclipse.uml2.uml.internal.operations.PackageOperations$StereotypeApplicationCopier.copyEDataTypeAttribute(Unknown Source)
at org.eclipse.uml2.uml.internal.operations.PackageOperations$StereotypeApplicationCopier.copyAttribute(Unknown Source)
at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(Unknown Source)
at org.eclipse.uml2.uml.internal.operations.PackageOperations.applyProfile(Unknown Source)
at org.eclipse.uml2.uml.internal.impl.PackageImpl.applyProfile(Unknown Source)
at com.ibm.xtools.modeler.ui.internal.profile.ProfileMigrationUtil$2.run(Unknown Source)
at org.eclipse.swt.custom.BusyIndicator.showWhile(Unknown Source)
at com.ibm.xtools.modeler.ui.internal.profile.ProfileMigrationUtil$1.doExecuteWithResult(Unknown Source)
at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand.doExecute(Unknown Source)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Unknown Source)
at org.eclipse.emf.workspace.CompositeEMFOperation.doExecute(Unknown Source)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Unknown Source)
at org.eclipse.emf.workspace.CompositeEMFOperation.doExecute(Unknown Source)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Unknown Source)
at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(Unknown Source)
at com.ibm.xtools.modeler.ui.internal.profile.ProfileMigrationUtil.executeCommand(Unknown Source)
at com.ibm.xtools.modeler.ui.internal.profile.ProfileMigrationUtil.upversionProfileApplications(Unknown Source)
at com.ibm.xtools.modeler.ui.internal.profile.ProfileMigrationUtil.processAppliedProfiles(Unknown Source)
at com.ibm.xtools.modeler.ui.internal.ui.resources.ModelerResourceManager.processResourceMigration(Unknown Source)
at com.ibm.xtools.modeler.ui.internal.ui.resources.ModelerResourceManager.access$3(Unknown Source)
at com.ibm.xtools.modeler.ui.internal.ui.resources.ModelerResourceManager$2.run(Unknown Source)
at org.eclipse.swt.widgets.RunnableLock.run(Unknown Source)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Unknown Source)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Source)
at org.eclipse.ui.internal.Workbench.runUI(Unknown Source)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source)
at org.eclipse.ui.internal.ide.IDEApplication.run(Unknown Source)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Unknown Source)
at org.eclipse.core.launcher.Main.run(Unknown Source)
at org.eclipse.core.launcher.Main.main(Unknown Source)
Comment 1 James Bruck CLA 2007-05-23 14:28:56 EDT
Created attachment 68407 [details]
added guards to ensure target is changeable.
Comment 2 Kenn Hussey CLA 2007-05-23 15:39:36 EDT
The fix has been committed to CVS.
Comment 3 Kenn Hussey CLA 2007-05-24 13:16:36 EDT
The fix is available in build 2.1RC1.
Comment 4 Nick Boldt CLA 2008-01-28 16:37:47 EST
Move to verified as per bug 206558.