Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauricio Alferez2016-02-11 14:11:24 +0000
committerMauricio Alferez2016-02-11 14:11:24 +0000
commit751a204d74e15eb2db6b41c937691fc56dcc1252 (patch)
tree8aa9a59c8fd679a72726e0bab4dca86e1e055fb2
parent9f0dccd90b00ccd5ee9dde1b7e13d3f9682de86f (diff)
downloadorg.eclipse.papyrus-751a204d74e15eb2db6b41c937691fc56dcc1252.tar.gz
org.eclipse.papyrus-751a204d74e15eb2db6b41c937691fc56dcc1252.tar.xz
org.eclipse.papyrus-751a204d74e15eb2db6b41c937691fc56dcc1252.zip
[Extra][Requirements] New "Papyrus for requirements" plugins
Change-Id: I6b277cbd7b8e5d353a942b285270e6fdf6c00268 Signed-off-by: Mauricio Alferez <mauricio.alferez@cea.fr>
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/META-INF/MANIFEST.MF12
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/build.properties9
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_16x16.pngbin0 -> 630 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_32x32.icobin0 -> 4286 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_48x48.icobin0 -> 9662 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/plugin.properties4
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/plugin.xml48
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/src/org/eclipse/papyrus/requirements/common/ui/Activator.java62
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common/.gitignore1
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common/META-INF/MANIFEST.MF23
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common/build.properties7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common/bundle.properties3
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common/src/org/eclipse/papyrus/requirements/common/Activator.java30
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.common/src/org/eclipse/papyrus/requirements/common/PapyrusAbstractHandler.java123
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.feature/.project17
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.feature/build.properties6
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.feature/epl-v10.html304
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.feature/feature.properties138
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.feature/feature.xml135
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.feature/license.html107
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.feature/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/META-INF/MANIFEST.MF20
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/build.properties8
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/plugin.properties6
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/plugin.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/Activator.java64
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/CreateProfileFromDomainModelCommand.java48
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/InitCreateProfileFromDomainModelCommand.java73
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/.gitignore1
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/META-INF/MANIFEST.MF16
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/build.properties8
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/bundle.properties4
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/plugin.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/Activator.java44
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/generator/ProfileGenerator.java523
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/utils/Utils.java375
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/META-INF/MANIFEST.MF15
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/build.properties8
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/plugin.properties3
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/plugin.xml12
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/src/org/eclipse/papyrus/requirements/languagecreationtools/handlers/Activator.java64
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/src/org/eclipse/papyrus/requirements/languagecreationtools/handlers/InitCreateInitialProfileFromDomainModelHandler.java57
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/META-INF/MANIFEST.MF13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/build.properties10
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/images/Profile.gifbin0 -> 154 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/plugin.properties12
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/plugin.xml47
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/src/org/eclipse/papyrus/requirements/languagecreationtools/ui/Activator.java62
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/META-INF/MANIFEST.MF13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/build.properties8
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/plugin.properties4
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/plugin.xml19
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/src/org/eclipse/papyrus/requirements/preferences/Activator.java62
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/src/org/eclipse/papyrus/requirements/preferences/PreferenceConstants.java32
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/src/org/eclipse/papyrus/requirements/preferences/PreferenceInitializer.java46
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/src/org/eclipse/papyrus/requirements/preferences/PreferencePage.java92
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/META-INF/MANIFEST.MF22
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/build.properties8
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/plugin.properties12
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/plugin.xml48
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/Activator.java62
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/AddDerivedLinkReqCommand.java78
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/AddSatisfyLinkCommand.java73
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/AddVerifyLinkCommand.java73
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/CommentReqCommand.java51
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/DecomposeReqCommand.java51
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/DerivationReqCreateCommand.java57
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/ExtractCommentCommand.java77
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/InitDecomposeReqCommand.java121
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/InitDerivedReqCommand.java97
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/PapyrusReqSysMLRequirementCreateCommand.java107
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/SatisfyCreateCommand.java61
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/VerifyCreateCommand.java61
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/META-INF/MANIFEST.MF15
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/build.properties8
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/plugin.properties40
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/plugin.xml40
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/Activator.java62
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/AddDerivedLinkReqHandler.java67
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/AddSatisfyLinkHandler.java68
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/AddVerifyLinkHandler.java68
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/CommentReqHandler.java55
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/DecomposeReqHandler.java57
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/ExtractCommentsHandler.java57
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/InitDerivedReqHandler.java56
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/PapyrusReqSysMLRequirementHandler.java52
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/META-INF/MANIFEST.MF13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/build.properties10
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Comment.gifbin0 -> 324 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/ContainmentConnection.gifbin0 -> 549 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Copy.gifbin0 -> 119 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/DeriveReqt.gifbin0 -> 119 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Link.gifbin0 -> 944 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Profile.gifbin0 -> 154 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Refine.gifbin0 -> 121 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Requirement.gifbin0 -> 371 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Satisfy.gifbin0 -> 120 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/TestCase.gifbin0 -> 368 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Trace.gifbin0 -> 120 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Verify.gifbin0 -> 120 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/plugin.properties30
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/plugin.xml235
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/src/org/eclipse/papyrus/requirements/sysml/assistant/ui/Activator.java62
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/.gitignore1
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/META-INF/MANIFEST.MF12
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/build.properties5
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/bundle.properties3
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/src/org/eclipse/papyrus/requirements/sysml/common/Activator.java30
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/src/org/eclipse/papyrus/requirements/sysml/common/I_SysMLStereotype.java248
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/META-INF/MANIFEST.MF16
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/build.properties8
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/plugin.properties40
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/plugin.xml43
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/Activator.java62
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/ModelTester.java53
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/PackageTester.java51
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/ProfileTester.java52
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/RequirementTester.java59
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/SysMLRequirementsProfileTester.java57
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/META-INF/MANIFEST.MF19
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/build.properties7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/plugin.properties4
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/Activator.java64
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/AbstractionRule.java84
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/DeriveReqRule.java87
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/ITracabilityRule.java39
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/SatisfyRule.java85
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/TracabilityAnalyzer.java87
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/META-INF/MANIFEST.MF19
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/build.properties8
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/plugin.properties6
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/plugin.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/AbstractionCreateCommand.java53
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/Activator.java64
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/DerivationReqCreateCommand.java57
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/RefinementCreateCommand.java57
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/SatisfactionCreateCommand.java57
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/META-INF/MANIFEST.MF18
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/build.properties8
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/plugin.properties40
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/plugin.xml12
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/src/org/eclipse/papyrus/requirements/sysml/traceability/handlers/Activator.java64
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/src/org/eclipse/papyrus/requirements/sysml/traceability/handlers/ApplyTracabilityHandler.java127
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/META-INF/MANIFEST.MF18
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/build.properties10
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Comment.gifbin0 -> 324 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/ContainmentConnection.gifbin0 -> 549 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Copy.gifbin0 -> 119 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/DeriveReqt.gifbin0 -> 119 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Link.gifbin0 -> 944 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Profile.gifbin0 -> 154 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Refine.gifbin0 -> 121 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Requirement.gifbin0 -> 371 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Satisfy.gifbin0 -> 120 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/TestCase.gifbin0 -> 368 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Trace.gifbin0 -> 120 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Verify.gifbin0 -> 120 bytes
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/plugin.properties9
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/plugin.xml57
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/src/org/eclipse/papyrus/requirements/sysml/traceability/ui/Activator.java62
240 files changed, 8168 insertions, 0 deletions
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/.project
new file mode 100644
index 00000000000..b58aa022100
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.common.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..8bf29fccc07
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.common.ui;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.common.ui.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0"
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: org.eclipse.papyrus.requirements.common.ui
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/build.properties
new file mode 100644
index 00000000000..e2735b145a2
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ images/,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_16x16.png b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_16x16.png
new file mode 100644
index 00000000000..fc20adffa46
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_16x16.png
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_32x32.ico b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_32x32.ico
new file mode 100644
index 00000000000..ae20fcd2471
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_32x32.ico
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_48x48.ico b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_48x48.ico
new file mode 100644
index 00000000000..d1941be56ee
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_48x48.ico
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/plugin.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/plugin.properties
new file mode 100644
index 00000000000..ec7e320486e
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/plugin.properties
@@ -0,0 +1,4 @@
+#Properties file for org.eclipse.papyrus.requirements.common.ui
+
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Req Common UI (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/plugin.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/plugin.xml
new file mode 100644
index 00000000000..8407c30d1cd
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/plugin.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="true"
+ locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup">
+ <separator
+ name="org.eclipse.papyrus.requirements.common.ui.sysml.assistant.additions"
+ visible="true">
+ </separator>
+ <separator
+ name="org.eclipse.papyrus.requirements.common.ui.traceability.additions"
+ visible="false">
+ </separator>
+ <separator
+ name="org.eclipse.papyrus.requirements.common.ui.languagecreation.additions"
+ visible="false">
+ </separator>
+ <separator
+ name="org.eclipse.papyrus.requirements.common.ui.dummy"
+ visible="true">
+ </separator>
+ </menuContribution>
+ <menuContribution
+ allPopups="true"
+ locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu?after=filtersMenu">
+ <separator
+ name="org.eclipse.papyrus.requirements.common.ui.sysml.assistant.additions"
+ visible="true">
+ </separator>
+ <separator
+ name="org.eclipse.papyrus.requirements.common.ui.traceability.additions"
+ visible="false">
+ </separator>
+ <separator
+ name="org.eclipse.papyrus.requirements.common.ui.languagecreation.additions"
+ visible="false">
+ </separator>
+ <separator
+ name="org.eclipse.papyrus.requirements.common.ui.dummy"
+ visible="true">
+ </separator>
+ </menuContribution>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/pom.xml
new file mode 100644
index 00000000000..9a60d199beb
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.common.ui</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/src/org/eclipse/papyrus/requirements/common/ui/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/src/org/eclipse/papyrus/requirements/common/ui/Activator.java
new file mode 100644
index 00000000000..324858ded59
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common.ui/src/org/eclipse/papyrus/requirements/common/ui/Activator.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+* CEA LIST. - initial API and implementation
+*******************************************************************************/
+package org.eclipse.papyrus.requirements.common.ui;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.requirements.common.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common/.gitignore b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/.gitignore
new file mode 100644
index 00000000000..ae3c1726048
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/.project
new file mode 100644
index 00000000000..9585f942b03
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.common</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..c8c3c27f9b1
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/META-INF/MANIFEST.MF
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.common
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.common.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.12.0",
+ org.eclipse.emf.common;bundle-version="2.12.0",
+ org.eclipse.emf.ecore;bundle-version="2.12.0",
+ org.eclipse.uml2.uml;bundle-version="5.1.100",
+ org.eclipse.uml2.uml.resources;bundle-version="5.1.0",
+ org.eclipse.ui;bundle-version="3.107.0",
+ org.eclipse.emf.transaction;bundle-version="1.9.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.8.0",
+ org.eclipse.core.resources;bundle-version="3.11.0",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.requirements.common
+Bundle-Localization: bundle
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/build.properties
new file mode 100644
index 00000000000..3bb74c5dbdb
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ bundle.properties
+src.includes = about.html
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common/bundle.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/bundle.properties
new file mode 100644
index 00000000000..20f29553c11
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.requirements.common
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Req Common (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/pom.xml
new file mode 100644
index 00000000000..fb0afc17af4
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.common</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common/src/org/eclipse/papyrus/requirements/common/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/src/org/eclipse/papyrus/requirements/common/Activator.java
new file mode 100644
index 00000000000..19d2f9c05ea
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/src/org/eclipse/papyrus/requirements/common/Activator.java
@@ -0,0 +1,30 @@
+package org.eclipse.papyrus.requirements.common;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.common/src/org/eclipse/papyrus/requirements/common/PapyrusAbstractHandler.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/src/org/eclipse/papyrus/requirements/common/PapyrusAbstractHandler.java
new file mode 100644
index 00000000000..e056a7e9602
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.common/src/org/eclipse/papyrus/requirements/common/PapyrusAbstractHandler.java
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+* CEA LIST. - initial API and implementation
+*******************************************************************************/
+package org.eclipse.papyrus.requirements.common;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
+import org.eclipse.ui.ISelectionService;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * Abstract handler in order to do the connection with Papyrus
+ *
+ */
+public abstract class PapyrusAbstractHandler extends AbstractHandler {
+
+ protected TransactionalEditingDomain transactionalEditingDomain=null;
+ protected IMultiDiagramEditor papyrusEditor;
+
+
+ /**
+ * install element of Papyrus in order to execute commands
+ * @param event the context of the execution
+ */
+ protected void setPapyrusEnvironment(ExecutionEvent event){
+ //look for papyrus
+ try {
+ papyrusEditor = ServiceUtilsForHandlers.getInstance().getService(IMultiDiagramEditor.class, event);
+ transactionalEditingDomain= ServiceUtilsForHandlers.getInstance().getService(org.eclipse.emf.transaction.TransactionalEditingDomain.class, event);
+
+ } catch (ServiceException ex) {
+ System.err.println(ex);
+ }
+ }
+ /**
+ * getSelected element in the diagram or in the model explorer
+ * @return Element or null
+ */
+ protected Element getSelection(){
+ org.eclipse.uml2.uml.Element selectedElement =null;
+ ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ ISelection selection = selectionService.getSelection();
+ //look for papyrus
+ if(selection instanceof IStructuredSelection) {
+ Object selectedobject = ((IStructuredSelection)selection).getFirstElement();
+ if(selectedobject instanceof GraphicalEditPart) {
+ Object graphicalElement = ((GraphicalEditPart)selectedobject).getModel();
+ if((graphicalElement instanceof View) && ((View)graphicalElement).getElement() instanceof org.eclipse.uml2.uml.Element) {
+ selectedElement = (org.eclipse.uml2.uml.Element)((View)graphicalElement).getElement();
+ }
+ }
+ else if(selectedobject instanceof IAdaptable) {
+ EObject selectedEObject = (EObject)((IAdaptable)selectedobject).getAdapter(EObject.class);
+ if (selectedEObject instanceof org.eclipse.uml2.uml.Element){
+ selectedElement=(Element)selectedEObject;
+ }
+ }
+ }
+ return selectedElement;
+ }
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ setPapyrusEnvironment(event);
+ return null;
+ }
+ /**
+ * getSelected element in the diagram or in the model explorer
+ * @return Element or null
+ */
+ protected ArrayList<Element> getSelectionSet(){
+ ArrayList<Element> selectedSet =new ArrayList<Element>();
+ ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ ISelection selection = selectionService.getSelection();
+
+
+ if(selection instanceof IStructuredSelection) {
+ @SuppressWarnings("rawtypes")
+ Iterator selectedobjectIteractor = ((IStructuredSelection)selection).iterator();
+ while (selectedobjectIteractor.hasNext()) {
+ Object currentSelection = selectedobjectIteractor.next();
+ if(currentSelection instanceof GraphicalEditPart) {
+ Object graphicalElement = ((GraphicalEditPart)currentSelection).getModel();
+ if((graphicalElement instanceof View) && ((View)graphicalElement).getElement() instanceof org.eclipse.uml2.uml.Element) {
+ selectedSet.add( (org.eclipse.uml2.uml.Element)((View)graphicalElement).getElement());
+ }
+ }
+ else if(currentSelection instanceof IAdaptable) {
+ EObject selectedEObject = (EObject)((IAdaptable)currentSelection).getAdapter(EObject.class);
+ if (selectedEObject instanceof org.eclipse.uml2.uml.Element){
+ selectedSet.add((Element)selectedEObject);
+ }
+ }
+ }
+
+
+ }
+ return selectedSet;
+ }
+}
+
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/.project
new file mode 100644
index 00000000000..fae70a58d74
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/build.properties
new file mode 100644
index 00000000000..463be2d773f
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/build.properties
@@ -0,0 +1,6 @@
+bin.includes = feature.xml,\
+ epl-v10.html,\
+ feature.properties,\
+ license.html
+src.includes = epl-v10.html,\
+ license.html
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/epl-v10.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/epl-v10.html
new file mode 100644
index 00000000000..cb1073a4bad
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/feature.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/feature.properties
new file mode 100644
index 00000000000..f0c918158e7
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/feature.properties
@@ -0,0 +1,138 @@
+# NLS_MESSAGEFORMAT_VAR
+
+# "featureName" property - name of the feature
+featureName=Papyrus Requirements Feature (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 9, 2014\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+\t- Content may be structured and packaged into modules to facilitate delivering,\n\
+\t extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+\t plug-in fragments ("Fragments"), and features ("Features").\n\
+\t- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+\t in a directory named "plugins".\n\
+\t- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+\t Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+\t Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+\t numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+\t- Features may also include other Features ("Included Features"). Within a Feature, files\n\
+\t named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+\t- The top-level (root) directory\n\
+\t- Plug-in and Fragment directories\n\
+\t- Inside Plug-ins and Fragments packaged as JARs\n\
+\t- Sub-directories of the directory named "src" of certain Plug-ins\n\
+\t- Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+\t- Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+\t- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+\t- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+\t- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+\t- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+\t1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+\t the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+\t extending or updating the functionality of an Eclipse-based product.\n\
+\t2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+\t Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+\t3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+\t govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+\t Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+\t with the Specification. Such Installable Software Agreement must inform the user of the\n\
+\t terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+\t the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+\t indication of agreement by the user, the provisioning Technology will complete installation\n\
+\t of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/feature.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/feature.xml
new file mode 100644
index 00000000000..e248a8b9530
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/feature.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.requirements.feature"
+ label="%featureName"
+ version="0.7.0.qualifier"
+ provider-name="%providerName">
+
+ <description>
+ This feature support model-based specification of requirements
+ </description>
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ Copyright (c) 2015 CEA LIST
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License
+v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.eclipse.papyrus.requirements.common"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.requirements.common.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.requirements.languagecreationtools.commands"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.requirements.languagecreationtools.handlers"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.requirements.languagecreationtools.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.requirements.preferences"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.requirements.sysml.assistant.commands"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.requirements.sysml.assistant.handlers"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.requirements.sysml.assistant.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.requirements.sysml.common"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.requirements.sysml.testers"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.requirements.sysml.traceability.assistant"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.requirements.sysml.traceability.commands"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.papyrus.requirements.sysml.traceability.handlers"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.papyrus.requirements.sysml.traceability.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/license.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/license.html
new file mode 100644
index 00000000000..c3d34c3c21e
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 9, 2014</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/pom.xml
new file mode 100644
index 00000000000..247199f15bd
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.feature/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.feature</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/.project
new file mode 100644
index 00000000000..1acc5520beb
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.languagecreationtools.commands</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..2ad1e4d0ae7
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.languagecreationtools.commands;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.languagecreationtools.commands.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="0.9.1";resolution:=optional,
+ org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile,
+ org.eclipse.papyrus.infra.widgets;bundle-version="0.9.1";resolution:=optional,
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.requirements.languagecreationtools.commands;
+ uses:="org.osgi.framework,
+ org.eclipse.uml2.uml,
+ org.eclipse.ui.plugin,
+ org.eclipse.emf.transaction"
+Bundle-Localization: plugin
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/build.properties
new file mode 100644
index 00000000000..baa36b183ee
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/plugin.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/plugin.properties
new file mode 100644
index 00000000000..e904ab55e21
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/plugin.properties
@@ -0,0 +1,6 @@
+#Properties file for org.eclipse.papyrus.requirements.languagecreationtools.commands
+
+generateProfileFromADomainModel.command.name = Generate a profile from a domain model
+
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Req Language Creation Tools Commands (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/plugin.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/plugin.xml
new file mode 100644
index 00000000000..17fe5d4d69a
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/plugin.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ id="org.eclipse.papyrus.requirements.languagecreationtools.handlers.InitCreateInitialProfileFromDomainModelHandler"
+ name="%generateProfileFromADomainModel.command.name">
+ </command>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/pom.xml
new file mode 100644
index 00000000000..31f2782ad20
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.languagecreationtools.commands</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/Activator.java
new file mode 100644
index 00000000000..576387c8846
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/Activator.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.languagecreationtools.commands;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.requirements.languagecreationtools.commands"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/CreateProfileFromDomainModelCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/CreateProfileFromDomainModelCommand.java
new file mode 100644
index 00000000000..51479047112
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/CreateProfileFromDomainModelCommand.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.languagecreationtools.commands;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile.generator.ProfileGenerator;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+
+/**
+ *
+ * Generates an UML profile based on a UML domain model
+ *
+ */
+
+public class CreateProfileFromDomainModelCommand extends RecordingCommand {
+ protected Element selectedElement;
+
+ public CreateProfileFromDomainModelCommand(TransactionalEditingDomain domain, Element selectedElement) {
+ super(domain, "CreateProfileFromDomainModelCommand");
+ this.selectedElement = selectedElement;
+ }
+
+ protected void createProfile(org.eclipse.uml2.uml.Package selectedPackage) {
+ ProfileGenerator profileGenerator = new ProfileGenerator(selectedPackage);
+ profileGenerator.generate();
+ }
+
+ @Override
+ protected void doExecute() {
+ if (selectedElement instanceof Package) {
+ createProfile((Package) selectedElement);
+ }
+ }
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/InitCreateProfileFromDomainModelCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/InitCreateProfileFromDomainModelCommand.java
new file mode 100644
index 00000000000..289cfc29654
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.commands/src/org/eclipse/papyrus/requirements/languagecreationtools/commands/InitCreateProfileFromDomainModelCommand.java
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.languagecreationtools.commands;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog;
+import org.eclipse.papyrus.uml.tools.providers.UMLContentProvider;
+import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Element;
+//import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Executes the generation of a profile based on a class diagram according to
+ * the preferences page of Papyrus Req
+ *
+ */
+public class InitCreateProfileFromDomainModelCommand extends RecordingCommand {
+ protected Element selectedElement;
+ TransactionalEditingDomain domain;
+
+ public InitCreateProfileFromDomainModelCommand(TransactionalEditingDomain domain, Element selectedElement) {
+ super(domain, "InitCreateProfileFromDomainModelCommand");
+ this.selectedElement = selectedElement;
+ this.domain = domain;
+ }
+
+ @Override
+ protected void doExecute() {
+ Package sourcePackage = null;
+ if (!(selectedElement instanceof Package)) {
+ org.eclipse.uml2.uml.Package _package = (Package) selectedElement;
+ TreeSelectorDialog dialog = new TreeSelectorDialog(Display.getDefault().getActiveShell());
+ dialog.setContentProvider(
+ new UMLContentProvider(_package, UMLPackage.eINSTANCE.getPackage_NestedPackage()));
+ dialog.setLabelProvider(new UMLLabelProvider());
+ dialog.setMessage("Choose the domain model");
+ dialog.setTitle("Choose the domain model");
+ dialog.create();
+ dialog.setDescription("Choose the domain model");
+ if (dialog.open() == org.eclipse.jface.window.Window.OK) {
+ Object[] result = dialog.getResult();
+ sourcePackage = ((org.eclipse.uml2.uml.Package) result[0]);
+ } else {
+ return;
+ }
+ CreateProfileFromDomainModelCommand createProfileFromDomainModelCommand = new CreateProfileFromDomainModelCommand(
+ domain, sourcePackage);
+ createProfileFromDomainModelCommand.execute();
+ }
+ else {
+ sourcePackage = (Package) selectedElement;
+ CreateProfileFromDomainModelCommand createProfileFromDomainModelCommand = new CreateProfileFromDomainModelCommand(
+ domain, sourcePackage);
+ createProfileFromDomainModelCommand.execute();
+ }
+ }
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/.gitignore b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/.gitignore
new file mode 100644
index 00000000000..ae3c1726048
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/.project
new file mode 100644
index 00000000000..652cd78a47f
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..6cca4555383
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.uml2.uml.resources,
+ org.eclipse.gmf.runtime.diagram.ui,
+ org.eclipse.papyrus.requirements.preferences
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile;uses:="org.osgi.framework",
+ org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile.generator;uses:="org.eclipse.uml2.uml,org.eclipse.emf.common.util,org.eclipse.emf.ecore.resource",
+ org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile.utils;uses:="org.eclipse.uml2.uml,org.eclipse.emf.common.util"
+Bundle-Localization: bundle
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/about.html
new file mode 100644
index 00000000000..209103075a7
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 14, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/build.properties
new file mode 100644
index 00000000000..34dfd31bf32
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ bundle.properties
+src.includes = about.html
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/bundle.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/bundle.properties
new file mode 100644
index 00000000000..a3c6be556a1
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/bundle.properties
@@ -0,0 +1,4 @@
+#Properties file for org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile
+
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Generate Initial Profile from Domain Model (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/plugin.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/plugin.xml
new file mode 100644
index 00000000000..20a77b84de7
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/plugin.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ id="org.eclipse.papyrus.requirements.languagecreationtools.handlers.CreateProfileFromDomainModelHandler"
+ name="%generateProfileFromADomainModel.command.name">
+ </command>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/pom.xml
new file mode 100644
index 00000000000..8940653ced0
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/Activator.java
new file mode 100644
index 00000000000..3819f8e8406
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/Activator.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/generator/ProfileGenerator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/generator/ProfileGenerator.java
new file mode 100644
index 00000000000..45a32740a0f
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/generator/ProfileGenerator.java
@@ -0,0 +1,523 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile.generator;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile.utils.Utils;
+import org.eclipse.papyrus.requirements.preferences.Activator;
+import org.eclipse.papyrus.requirements.preferences.PreferenceConstants;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.PrimitiveType;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.resource.UMLResource;
+import org.eclipse.uml2.uml.resources.util.UMLResourcesUtil;
+
+/**
+ * Generates an UML profile based on a UML domain model
+ *
+ */
+public class ProfileGenerator {
+ protected static ResourceSet resourceSet;
+ // Output profile created based on the domain model
+ protected Profile profile;
+ // Input package representing the domain model
+ protected Package sourcePackage;
+ // File of the sourcePackage
+ protected File sourceModelFile;
+ // Generation options
+ private static String NSURI_PREFIX = "https://www.eclipse.org/papyrus/";
+ private static boolean GENERATE_ABSTRACTIONS_MODEL = false;
+ private static boolean FROM_ASSOCIATIONS_TO_STEREOTYPES = false;
+ private static boolean FROM_ASSOCIATIONS_TO_ASSOCIATIONS = false;
+ private static String METACLASS_EXTENDED_BY_NODES = "none"; //UMLPackage.Literals.CLASS.getName();
+ private static String METACLASS_EXTENDED_BY_EDGES = "none";//= UMLPackage.Literals.ASSOCIATION.getName();
+ // Debug=true will automatically refresh the project to show the output
+ // files.
+ private static boolean DEBUG = true;
+ protected Stereotype baseNodeStereotype;
+ protected Stereotype baseEdgeStereotype;
+ protected Map<Element, Element> mapClassNodes = new HashMap<Element, Element>();
+ protected Map<Element, Element> mapAssociationsEdges = new HashMap<Element, Element>();
+ protected Map<Element, Element> mapProfileAssociations2MMAssociations = new HashMap<Element, Element>();
+ protected Map<Element, Element> mapPrimitiveTypesNodes = new HashMap<Element, Element>();
+ protected Map<Element, Element> mapEnumerationsNodes = new HashMap<Element, Element>();
+ protected Map<Element, Element> mapPackagesNodes = new HashMap<Element, Element>();
+ protected List<PrimitiveType> listStandardPrimitiveTypes = new ArrayList<PrimitiveType>();
+ protected String outputDirectoryPath;
+ protected List<Generalization> listInternalGeneralizations = new ArrayList<Generalization>();
+ protected List<Association> listAssociations = new ArrayList<Association>();
+ protected Model abstractionsModel;
+
+
+ /**
+ * Constructor to be called by Eclipse, takes into account generation
+ * preferences in the Papyrus Req preference page.
+ *
+ * @param selectedPackage The UML domain model
+ */
+ public ProfileGenerator(Package selectedPackage) {
+ DEBUG = false;
+ IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ NSURI_PREFIX = store.getString(PreferenceConstants.NSURI_PREFIX);
+ GENERATE_ABSTRACTIONS_MODEL = store.getBoolean(PreferenceConstants.GENERATE_ABSTRACTIONS_MODEL);
+ FROM_ASSOCIATIONS_TO_STEREOTYPES = store.getBoolean(PreferenceConstants.FROM_ASSOCIATIONS_TO_STEREOTYPES);
+ FROM_ASSOCIATIONS_TO_ASSOCIATIONS =store.getBoolean(PreferenceConstants.FROM_ASSOCIATIONS_TO_ASSOCIATIONS);
+ // METACLASS_EXTENDED_BY_NODES =
+ // store.getString(PreferenceConstants.METACLASS_EXTENDED_BY_NODES);
+ // //by default "none"
+ // METACLASS_EXTENDED_BY_EDGES =
+ // store.getString(PreferenceConstants.METACLASS_EXTENDED_BY_EDGES);
+ // //by default "none"
+ sourcePackage = selectedPackage;
+ URI uri = sourcePackage.eResource().getURI();
+ sourceModelFile = Utils.getFileFromURI(uri);
+ outputDirectoryPath = sourceModelFile.getParent();
+ setResourceSet();
+ }
+
+ /**
+ * Constructor to be used in an standalone Java application. It does not takes
+ * into account preferences in the Papyrus Req preference page.
+ *
+ * @param _inputModelPath The path of the input model
+ * @param _outputDirectoryPath The path to save the profile and if the abstractions model
+ * @param _prefix the NSURI prefix used in the profile
+ */
+ public ProfileGenerator(String _inputModelPath, String _outputDirectoryPath, String _prefix) {
+ DEBUG = true;
+ NSURI_PREFIX = _prefix;
+ ResourceSet resourceSetSourceModel = new ResourceSetImpl();
+ UMLResourcesUtil.init(resourceSetSourceModel);
+ URI _inputModelURI = URI.createFileURI(new File(_inputModelPath).getAbsolutePath());
+ Resource r = resourceSetSourceModel.getResource(_inputModelURI, true);
+ sourcePackage = (Package) EcoreUtil.getObjectByType(r.getContents(), UMLPackage.Literals.PACKAGE);
+ sourceModelFile = new File(_inputModelPath).getAbsoluteFile();
+ outputDirectoryPath = new File(_outputDirectoryPath).getAbsolutePath();
+ setResourceSet();
+ }
+
+ protected void setResourceSet() {
+ resourceSet = new ResourceSetImpl();
+ UMLResourcesUtil.init(resourceSet);
+ }
+
+ public void generate() {
+ String nameOfAbstractionsModel = sourcePackage.getName() + "_refinement";
+ String nameOfProfile = sourcePackage.getName();
+ setProfile(Utils.createProfile(nameOfProfile, NSURI_PREFIX + sourcePackage.getName()));
+
+ if (!METACLASS_EXTENDED_BY_NODES.contentEquals("none")) {
+ METACLASS_EXTENDED_BY_NODES= UMLPackage.Literals.CLASS.getName();
+ baseNodeStereotype = Utils.createStereotype(profile, "baseNodeStereotype", true);
+ }
+ if (!METACLASS_EXTENDED_BY_EDGES.contentEquals("none")) {
+ METACLASS_EXTENDED_BY_EDGES= UMLPackage.Literals.ASSOCIATION.getName();
+ baseEdgeStereotype = Utils.createStereotype(profile, "baseEdgeStereotype", true);
+ }
+
+ visitPackagedElements(sourcePackage);
+
+ String[] requiredPrimitiveTypes = { "Boolean", "Real", "String", "Integer", "UnlimitedNatural" };
+ createStandardPrimitiveTypes(requiredPrimitiveTypes);
+
+ createProfiles(mapClassNodes);
+ createProfiles(mapPrimitiveTypesNodes);
+ createProfiles(mapEnumerationsNodes);
+ if (FROM_ASSOCIATIONS_TO_STEREOTYPES) {
+ createProfiles(mapAssociationsEdges);
+ }
+ if (FROM_ASSOCIATIONS_TO_ASSOCIATIONS) {
+ createAssociations();
+ }
+ createEnumerationLiterals();
+ createTagDefinitions();
+ createInternalGeneralizations();
+
+ if (!METACLASS_EXTENDED_BY_NODES.contentEquals("none")
+ && referenceMetaclass(profile, METACLASS_EXTENDED_BY_NODES) != null) {
+ createGeneralizations(mapClassNodes.keySet(), baseNodeStereotype);
+ Utils.createExtension(referenceMetaclass(profile, METACLASS_EXTENDED_BY_NODES), baseNodeStereotype, false);
+ }
+ if (!METACLASS_EXTENDED_BY_EDGES.contentEquals("none")
+ && referenceMetaclass(profile, METACLASS_EXTENDED_BY_NODES) != null) {
+ createGeneralizations(mapAssociationsEdges.keySet(), baseEdgeStereotype);
+ Utils.createExtension(referenceMetaclass(profile, METACLASS_EXTENDED_BY_EDGES), baseEdgeStereotype, false);
+ }
+
+ Utils.defineProfile(profile);
+
+ for (Element element : mapPackagesNodes.keySet()) {
+ if (element instanceof Profile) {
+ Utils.defineProfile((Profile) element);
+ }
+ }
+
+ save(profile, outputDirectoryPath, nameOfProfile, UMLResource.PROFILE_FILE_EXTENSION);
+
+ if (GENERATE_ABSTRACTIONS_MODEL) {
+ abstractionsModel = Utils.createModel(nameOfAbstractionsModel);
+ createAbstractionsModel(mapClassNodes);
+ createAbstractionsModel(mapProfileAssociations2MMAssociations);
+ abstractionsModel.setURI(NSURI_PREFIX + nameOfAbstractionsModel);
+ save(abstractionsModel, outputDirectoryPath, nameOfAbstractionsModel, UMLResource.FILE_EXTENSION);
+ }
+ // Debug=true will automatically refresh the project to show the
+ // generated ...profile.uml file.
+ if (!DEBUG) {
+ Utils.refreshProject(sourceModelFile);
+ }
+ }
+
+ /**
+ * Creates associations between stereotypes in a profile, based on the
+ * associations in a domain model
+ */
+ protected void createAssociations() {
+ Stereotype targetEndInProfile = null;
+ Stereotype sourceEndInProfile = null;
+ for (Association assocInMM : listAssociations) {
+ Property targetEndInMM = Utils.getTargetEnd(assocInMM);
+ // Property sourceEndInMM = targetEndInMM.getOtherEnd();
+ Property sourceEndInMM = Utils.getSourceEnd(assocInMM);
+ targetEndInProfile = getStereotypeByName(targetEndInMM.getType().getName());
+ sourceEndInProfile = getStereotypeByName(sourceEndInMM.getType().getName());
+ if (targetEndInProfile != null) {
+ Association assocInProfile = Utils.createAssociation(sourceEndInProfile, true,
+ AggregationKind.NONE_LITERAL, targetEndInMM.getName(), targetEndInMM.getLower(),
+ targetEndInMM.getUpper(), targetEndInProfile, true, AggregationKind.NONE_LITERAL,
+ sourceEndInMM.getName(), sourceEndInMM.getLower(), sourceEndInMM.getUpper());
+ assocInProfile.setName(assocInMM.getName());
+ mapProfileAssociations2MMAssociations.put(assocInProfile, assocInMM);
+ }
+ }
+ }
+
+ /**
+ * @param stereotypeName
+ * The not qualified name of a stereotype
+ * @return stereotype The stereotype with the stereotypeName in the
+ * Stereotypes - Class map (ex. key: Stereotype named Focus, value:
+ * Class named Focus).
+ */
+ protected Stereotype getStereotypeByName(String stereotypeName) {
+ Stereotype stereotype=null;
+ for (Map.Entry<Element, Element> entry : mapClassNodes.entrySet()) {
+ if (entry.getKey() instanceof Stereotype && entry.getValue() instanceof Class) {
+ stereotype = (Stereotype) entry.getKey();
+ if (stereotype.getName().contentEquals(stereotypeName)){
+ return stereotype;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Generates the mapping model between source elements and produced
+ * elements. Each abstraction relationship can have many sources and many
+ * targets which is ideal to allow N 2 M mappings.
+ *
+ * @param map
+ * containing the element (value) in the domain model that
+ * originated the element (key) in the profile
+ */
+ protected void createAbstractionsModel(Map<Element, Element> map) {
+ for (Map.Entry<Element, Element> entry : map.entrySet()) {
+ NamedElement key = (NamedElement) entry.getKey();
+ NamedElement value = (NamedElement) entry.getValue();
+ Abstraction _abstraction = UMLFactory.eINSTANCE.createAbstraction();
+ _abstraction.getSuppliers().add(key);
+ _abstraction.getClients().add(value);
+ _abstraction.setName(key.getName() + "-" + value.getName());
+ abstractionsModel.getPackagedElements().add(_abstraction);
+ }
+ }
+
+ protected void visitPackagedElements(Element element) {
+ if (element instanceof org.eclipse.uml2.uml.Package) {
+ org.eclipse.uml2.uml.Package packageInMetamodel = (org.eclipse.uml2.uml.Package) element;
+ for (Element e : packageInMetamodel.getPackagedElements()) {
+ visitPackagedElements(e);
+ }
+ } else if (element instanceof org.eclipse.uml2.uml.Class) {
+ mapClassNodes.put((Element) Utils.createStereotype(profile, ((NamedElement) element).getName(),
+ ((Class) element).isAbstract()), element);
+ if (((Classifier) element).getGeneralizations() != null) {
+ for (Generalization generalization : ((Classifier) element).getGeneralizations()) {
+ listInternalGeneralizations.add(generalization);
+ }
+ }
+ } else if (element instanceof PrimitiveType) {
+ mapPrimitiveTypesNodes.put((Element) Utils.createPrimitiveType(profile, ((NamedElement) element).getName()),
+ element);
+ } else if (element instanceof Enumeration) {
+ mapEnumerationsNodes.put((Element) Utils.createEnumeration(profile, ((NamedElement) element).getName()),
+ element);
+ } else if (element instanceof Association) {
+ if (FROM_ASSOCIATIONS_TO_STEREOTYPES) {
+ mapAssociationsEdges.put(
+ (Element) Utils.createStereotype(profile, ((NamedElement) element).getName(), false), element);
+ }
+ listAssociations.add((Association)element);
+ }
+ }
+
+ protected void createInternalGeneralizations() {
+ for (Generalization generalizationInMM : listInternalGeneralizations) {
+ Classifier specificInMM = generalizationInMM.getSpecific();
+ Classifier generalInMM = generalizationInMM.getGeneral();
+ Stereotype specificInProfile = null;
+ Stereotype generalInProfile = null;
+ Set<Element> classNodesStereotypesInProfile = mapClassNodes.keySet();
+ for (Element e : classNodesStereotypesInProfile) {
+ Stereotype classNodeStereotypeInProfile = (Stereotype) e;
+ if (classNodeStereotypeInProfile.getName().contentEquals(specificInMM.getName())) {
+ specificInProfile = classNodeStereotypeInProfile;
+ } else if (classNodeStereotypeInProfile.getName().contentEquals(generalInMM.getName())) {
+ generalInProfile = classNodeStereotypeInProfile;
+ }
+ }
+ if (specificInProfile != null && generalInProfile != null) {
+ Utils.createGeneralization(specificInProfile, generalInProfile);
+ }
+ }
+ }
+
+ protected static org.eclipse.uml2.uml.Package load(URI uri) {
+ org.eclipse.uml2.uml.Package package_ = null;
+ try {
+ // Load the requested resource
+ Resource resource = resourceSet.getResource(uri, true);
+ // Get the first (should be only) package from it
+ package_ = (org.eclipse.uml2.uml.Package) EcoreUtil.getObjectByType(resource.getContents(),
+ UMLPackage.Literals.PACKAGE);
+ } catch (WrappedException we) {
+ System.err.println();
+ System.exit(1);
+ }
+ return package_;
+ }
+
+ public static PrimitiveType importPrimitiveType(org.eclipse.uml2.uml.Package package_, String name) {
+ org.eclipse.uml2.uml.Package umlLibrary = load(URI.createURI(UMLResource.UML_PRIMITIVE_TYPES_LIBRARY_URI));
+ PrimitiveType primitiveType = (PrimitiveType) umlLibrary.getOwnedType(name);
+ package_.createElementImport(primitiveType);
+ return primitiveType;
+ }
+
+ protected static org.eclipse.uml2.uml.Class referenceMetaclass(Profile profile, String metaclassName) {
+ Model umlMetamodel = (Model) load(URI.createURI(UMLResource.UML_METAMODEL_URI));
+ // my hack
+ Class metaclass = null;
+ if (umlMetamodel.getOwnedType(metaclassName) instanceof Class) {
+ metaclass = (Class) umlMetamodel.getOwnedType(metaclassName);
+ if (metaclass != null) {
+ profile.createMetaclassReference(metaclass);
+ }
+ }
+ return metaclass;
+ }
+
+ /**
+ * @param stereotypeInProfile
+ * @param propertyInClass
+ */
+ protected void addEnumerationProperty(Stereotype stereotypeInProfile, Property propertyInClass) {
+ Set<Element> enumerationsInProfile = mapEnumerationsNodes.keySet();
+ for (Element e : enumerationsInProfile) {
+ Enumeration enumerationInProfile = (Enumeration) e;
+ if (enumerationInProfile.getName().contentEquals(propertyInClass.getType().getName())) {
+ Utils.createAttribute((Class) stereotypeInProfile, propertyInClass.getName(), enumerationInProfile, 0,
+ 1, null);
+ }
+ }
+ }
+
+ /**
+ * @param stereotypeInProfile
+ * @param propertyInClass
+ */
+ protected void addPrimitiveTypeProperty(Stereotype stereotypeInProfile, Property propertyInClass) {
+ boolean foundStandardPrimitiveType = false;
+ for (PrimitiveType standardPrimitiveType : listStandardPrimitiveTypes) {
+ if (standardPrimitiveType.getName().contentEquals(propertyInClass.getType().getName())) {
+ foundStandardPrimitiveType = true;
+
+ Utils.createAttribute((Class) stereotypeInProfile, propertyInClass.getName(), standardPrimitiveType,
+ propertyInClass.getLower(), propertyInClass.getUpper(), null);
+ break;
+ }
+ }
+ if (!foundStandardPrimitiveType) {
+ Set<Element> primitiveTypesInProfile = mapPrimitiveTypesNodes.keySet();
+ for (Element e : primitiveTypesInProfile) {
+ PrimitiveType primitiveTypeInProfile = (PrimitiveType) e;
+ if (primitiveTypeInProfile.getName().contentEquals(propertyInClass.getType().getName())) {
+ Utils.createAttribute((Class) stereotypeInProfile, propertyInClass.getName(),
+ primitiveTypeInProfile, propertyInClass.getLower(), propertyInClass.getUpper(), null);
+ }
+ }
+ }
+ }
+
+ protected void createEnumerationLiterals() {
+ for (Map.Entry<Element, Element> entry : mapEnumerationsNodes.entrySet()) {
+ Element key = entry.getKey();
+ Element value = entry.getValue();
+ if (key instanceof Enumeration && value instanceof Enumeration) {
+ Enumeration enumInProfile = (Enumeration) key;
+ Enumeration enumInMetamodel = (Enumeration) value;
+ for (EnumerationLiteral literalInMM : enumInMetamodel.getOwnedLiterals()) {
+ Utils.createEnumerationLiteral(enumInProfile, literalInMM.getName().replaceAll("\\s", ""));
+ }
+ }
+ }
+ }
+
+ protected void createGeneralizations(Set<Element> specificStereotypes, Stereotype generalStereotype) {
+ for (Element element : specificStereotypes) {
+ if (element instanceof Stereotype) {
+ Stereotype specificStereotype = (Stereotype) element;
+ if (specificStereotype.getGeneralizations().size() == 0) {
+ Utils.createGeneralization(specificStereotype, generalStereotype);
+ }
+ }
+ }
+ }
+
+ /**
+ * Creates a profile and sub-profiles based on the packages structure of the
+ * domain model. Each Package becomes a new profile.
+ *
+ * @param map
+ * in the map, the key is an Stereotype, PrimitiveType, Profile,
+ * etc. and the value is the Element that originated the creation
+ * of the key. For example, a Class X (the key) originated an
+ * Stereotype X (the value)
+ *
+ */
+ protected void createProfiles(Map<Element, Element> map) {
+ boolean foundPackage;
+ for (Map.Entry<Element, Element> entry : map.entrySet()) {
+ Element key = entry.getKey();
+ Element value = entry.getValue();
+ Package package_ = value.getNearestPackage();
+ foundPackage = false;
+ for (Package nestedPackage : profile.getNestedPackages()) {
+ if (nestedPackage.getName().contentEquals(package_.getName())) {
+ foundPackage = true;
+ nestedPackage.getPackagedElements().add((PackageableElement) key);
+ break;
+ }
+ }
+ if (!foundPackage) {
+ Profile newSubProfile = Utils.createProfile(package_.getName(), NSURI_PREFIX + package_.getName());
+ mapPackagesNodes.put(newSubProfile, package_);
+ profile.getNestedPackages().add(newSubProfile);
+ newSubProfile.getPackagedElements().add((PackageableElement) key);
+ }
+ }
+ }
+
+ protected void createStandardPrimitiveTypes(String[] requiredPrimitiveTypes) {
+ for (String primitiveTypeName : requiredPrimitiveTypes) {
+ listStandardPrimitiveTypes.add(importPrimitiveType(profile, primitiveTypeName));
+ }
+ }
+
+ protected void createTagDefinitions() {
+ for (Map.Entry<Element, Element> entry : mapClassNodes.entrySet()) {
+ Element key = entry.getKey();
+ Element value = entry.getValue();
+ if (key instanceof Stereotype && value instanceof Class) {
+ Stereotype stereotypeInProfile = (Stereotype) key;
+ Class classInMetamodel = (Class) value;
+ for (Property propertyInClass : classInMetamodel.getOwnedAttributes()) {
+ if (propertyInClass.getType() instanceof PrimitiveType) {
+ addPrimitiveTypeProperty(stereotypeInProfile, propertyInClass);
+ } else if (propertyInClass.getType() instanceof Enumeration) {
+ addEnumerationProperty(stereotypeInProfile, propertyInClass);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * @return the profile
+ */
+ public Profile getProfile() {
+ return profile;
+ }
+
+ /**
+ * Save our refinement model to a file in the user-specified output
+ * directory
+ *
+ */
+ protected void save(Package model, String outputDirectoryPath, String fileName, String fileExtension) {
+ URI outputURI = URI.createFileURI(outputDirectoryPath).appendSegment(fileName)
+ .appendFileExtension(fileExtension);
+ save(model, outputURI);
+ }
+
+ protected static void save(org.eclipse.uml2.uml.Package package_, URI uri) {
+ Resource resource = resourceSet.createResource(uri);
+ resource.getContents().add(package_);
+ try {
+ resource.save(null);
+ } catch (IOException ioe) {
+ System.err.println(ioe.getMessage());
+ }
+ }
+
+ /**
+ * @param profile
+ * the profile to set
+ */
+ public void setProfile(Profile profile) {
+ this.profile = profile;
+ }
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/utils/Utils.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/utils/Utils.java
new file mode 100644
index 00000000000..96d8160ba6b
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile/src/org/eclipse/papyrus/requirements/languagecreationtools/domainModel2Profile/utils/Utils.java
@@ -0,0 +1,375 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alférez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation based on UML2 tutorials.
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.languagecreationtools.domainModel2Profile.utils;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.Extension;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.InstanceValue;
+import org.eclipse.uml2.uml.LiteralBoolean;
+import org.eclipse.uml2.uml.LiteralString;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.PrimitiveType;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Utility methods to create a profile
+ *
+ */
+/**
+ * @author MA244259
+ *
+ */
+public class Utils {
+ /**
+ * Creates a new UML model with a specific name
+ *
+ * @param name
+ * The name of the model
+ * @return the UML model
+ */
+ public static Model createModel(String name) {
+ Model model = UMLFactory.eINSTANCE.createModel();
+ model.setName(name);
+ return model;
+ }
+
+ /**
+ * Refresh the project that contains a file without user intervention (e.g.,
+ * by using the F5 key)
+ *
+ * @param file
+ * The file contained in the project to be refreshed
+ */
+ public static void refreshProject(File file) {
+ IProject iproject = ResourcesPlugin.getWorkspace().getRoot().getProject(file.getParentFile().getName());
+ try {
+ iproject.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Creates an enumeration in a UML package
+ *
+ * @param package_
+ * The UML package that will owns the enumeration
+ * @param name
+ * The name of the enumeration contained in package_
+ * @return a new Enumeration
+ */
+ public static Enumeration createEnumeration(org.eclipse.uml2.uml.Package package_, String name) {
+ Enumeration enumeration = package_.createOwnedEnumeration(name);
+ return enumeration;
+ }
+
+ /**
+ * Creates an enumeration literal
+ *
+ * @param enumeration
+ * The enumeration that will own the literal
+ * @param name
+ * The name of the literal
+ * @return a new enumeration literal
+ */
+ public static EnumerationLiteral createEnumerationLiteral(Enumeration enumeration, String name) {
+ EnumerationLiteral enumerationLiteral = enumeration.createOwnedLiteral(name);
+ return enumerationLiteral;
+ }
+
+ /**
+ * Creates a extension of the specified metaclass with this stereotype.
+ *
+ * @param metaclass
+ * The UML metaclass that will be extended, for example Class or
+ * Association
+ * @param stereotype
+ * The stereotype that will extend the metaclass
+ * @param required
+ * Whether the new extension should be required
+ * @return the new extension
+ */
+ public static Extension createExtension(org.eclipse.uml2.uml.Class metaclass, Stereotype stereotype,
+ boolean required) {
+ Extension extension = stereotype.createExtension(metaclass, required);
+ return extension;
+ }
+
+ /**
+ * Creates a new {@link org.eclipse.uml2.uml.Generalization}, with the
+ * specified '<em><b>General</b></em>', and appends it to the
+ * '<em><b>Generalization</b></em>' containment reference list.
+ *
+ * @param specificClassifier
+ * The '<em><b>Specific</b></em>' for the new
+ * {@link org.eclipse.uml2.uml.Generalization}
+ * @param generalClassifier
+ * The '<em><b>General</b></em>' for the new
+ * {@link org.eclipse.uml2.uml.Generalization}
+ * @return the new generalization
+ */
+ public static Generalization createGeneralization(Classifier specificClassifier, Classifier generalClassifier) {
+ Generalization generalization = specificClassifier.createGeneralization(generalClassifier);
+ return generalization;
+ }
+
+ /**
+ * Creates a new UML package inside another package
+ *
+ * @param nestingPackage
+ * The package that will contain the new package
+ * @param name
+ * The name of the new package
+ * @return the new UML package
+ */
+ public static org.eclipse.uml2.uml.Package createPackage(org.eclipse.uml2.uml.Package nestingPackage, String name) {
+ org.eclipse.uml2.uml.Package package_ = nestingPackage.createNestedPackage(name);
+ return package_;
+ }
+
+ /**
+ * Creates a new primitive type inside a Package
+ *
+ * @param package_
+ * The name of the package
+ * @param name
+ * The name of the primitive type
+ * @return the primitive type
+ */
+ public static PrimitiveType createPrimitiveType(org.eclipse.uml2.uml.Package package_, String name) {
+ PrimitiveType primitiveType = package_.createOwnedPrimitiveType(name);
+ return primitiveType;
+ }
+
+ /**
+ * Creates a UML profile with a specific name and nsURI
+ *
+ * @param name
+ * The new of the new profile
+ * @param nsURI
+ * The nsURI of the new package
+ * @return the new UML profile
+ */
+ public static Profile createProfile(String name, String nsURI) {
+ Profile profile = UMLFactory.eINSTANCE.createProfile();
+ profile.setName(name);
+ profile.setURI(nsURI);
+ return profile;
+ }
+
+ /**
+ * Creates a new stereotype in a specific profile
+ *
+ * @param profile
+ * The profile that will contain the stereotype
+ * @param name
+ * The name of the stereotype
+ * @param isAbstract
+ * Whether the stereotype is abstract
+ * @return
+ */
+ public static Stereotype createStereotype(Profile profile, String name, boolean isAbstract) {
+ Stereotype stereotype = profile.createOwnedStereotype(name, isAbstract);
+ return stereotype;
+ }
+
+ /**
+ * Defines a profile
+ *
+ * @param profile
+ * the profile to be defined
+ */
+ public static void defineProfile(Profile profile) {
+ profile.define();
+ }
+
+ /**
+ * Applies a profile to a package
+ *
+ * @param package_
+ * The package where the profile will be applied
+ * @param profile
+ * The profile that will be applied to the package
+ */
+ protected static void applyProfile(org.eclipse.uml2.uml.Package package_, Profile profile) {
+ package_.applyProfile(profile);
+ }
+
+ /**
+ * Creates a property with the specified name, type, lower bound, upper
+ * bound and default value as an owned attribute of a class
+ *
+ * @param class_
+ * The class that will have the attribute
+ * @param name
+ * The name of the attribute
+ * @param type
+ * The type of the attribute
+ * @param lowerBound
+ * The lower bound for the new attribute
+ * @param upperBound
+ * The upper bound for the new attribute
+ * @param defaultValue
+ * The default value of the new attribute
+ * @return the new attribute
+ */
+ public static Property createAttribute(org.eclipse.uml2.uml.Class class_, String name, Type type, int lowerBound,
+ int upperBound, Object defaultValue) {
+ Property attribute = class_.createOwnedAttribute(name, type, lowerBound, upperBound);
+ if (defaultValue instanceof Boolean) {
+ LiteralBoolean literal = (LiteralBoolean) attribute.createDefaultValue(null, null,
+ UMLPackage.Literals.LITERAL_BOOLEAN);
+ literal.setValue(((Boolean) defaultValue).booleanValue());
+ } else if (defaultValue instanceof String) {
+ if (type instanceof Enumeration) {
+ InstanceValue value = (InstanceValue) attribute.createDefaultValue(null, null,
+ UMLPackage.Literals.INSTANCE_VALUE);
+ value.setInstance(((Enumeration) type).getOwnedLiteral((String) defaultValue));
+ } else {
+ LiteralString literal = (LiteralString) attribute.createDefaultValue(null, null,
+ UMLPackage.Literals.LITERAL_STRING);
+ literal.setValue((String) defaultValue);
+ }
+ }
+ return attribute;
+ }
+
+ /**
+ * Obtains a java.io.File in a workspace based on a URI
+ * @param uri The URI
+ * @return the file
+ */
+ public static File getFileFromURI(URI uri) {
+ if (uri != null) {
+ IWorkspaceRoot myWorkspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+ IPath path = new Path(uri.toPlatformString(true));
+ IFile file = myWorkspaceRoot.getFile(path);
+ if (file != null && file.getLocation() != null) {
+ File f = file.getLocation().toFile();
+ return f;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Creates an interface to call the createAssociation method of Type.class.
+ * In other words, it creates a(n) (binary) association between this type
+ * and the specified other type, with the specified navigabilities,
+ * aggregations, names, lower bounds, and upper bounds, and owned by this
+ * type's nearest package.
+ *
+ * @param end1IsNavigable The navigability for the first end of the new
+ * association.
+ *
+ * @param end1Aggregation The aggregation for the first end of the new
+ * association.
+ *
+ * @param end1Name The name for the first end of the new association.
+ *
+ * @param end1Lower The lower bound for the first end of the new
+ * association.
+ *
+ * @param end1Upper The upper bound for the first end of the new
+ * association.
+ *
+ * @param end1Type The type for the first end of the new association.
+ *
+ * @param end2IsNavigable The navigability for the second end of the new
+ * association.
+ *
+ * @param end2Aggregation The aggregation for the second end of the new
+ * association.
+ *
+ * @param end2Name The name for the second end of the new association.
+ *
+ * @param end2Lower The lower bound for the second end of the new
+ * association.
+ *
+ * @param end2Upper The upper bound for the second end of the new
+ * association.
+ */
+ public static Association createAssociation(Type type1,
+ boolean end1IsNavigable, AggregationKind end1Aggregation,
+ String end1Name, int end1LowerBound, int end1UpperBound,
+ Type type2, boolean end2IsNavigable,
+ AggregationKind end2Aggregation, String end2Name,
+ int end2LowerBound, int end2UpperBound) {
+ Association association = type1.createAssociation(end1IsNavigable,
+ end1Aggregation, end1Name, end1LowerBound, end1UpperBound, type2,
+ end2IsNavigable, end2Aggregation, end2Name, end2LowerBound,
+ end2UpperBound);
+ return association;
+ }
+
+
+
+ /**
+ * Obtains the source end of an association
+ * @param association
+ * @return The member end
+ */
+ public static Property getSourceEnd(Association association) {
+ return getMemberEnd(association, true);
+ }
+
+ /**
+ * Obtains the target end of an association
+ * @param association
+ * @return The member end
+ */
+ public static Property getTargetEnd(Association association) {
+ return getMemberEnd(association, false);
+ }
+
+ /**
+ * Obtains the source or target ends of an association
+ * @param association
+ * @param sourceNotTarget
+ * @return
+ */
+ public static Property getMemberEnd(Association association, boolean sourceNotTarget) {
+ if (sourceNotTarget && association.getMemberEnds().size() > 0) {
+ return (Property) association.getMemberEnds().get(0);
+ }
+ if (!sourceNotTarget && association.getMemberEnds().size() > 1) {
+ return (Property) association.getMemberEnds().get(1);
+ }
+ return null;
+ }
+
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/.project
new file mode 100644
index 00000000000..fa2ebd5f6de
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.languagecreationtools.handlers</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..e79966c1ef0
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.languagecreationtools.handlers;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.languagecreationtools.handlers.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.2.0";resolution:=optional,
+ org.eclipse.papyrus.requirements.common;bundle-version="0.7.0",
+ org.eclipse.papyrus.requirements.languagecreationtools.commands;bundle-version="0.7.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.requirements.languagecreationtools.handlers
+Bundle-Localization: plugin
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/build.properties
new file mode 100644
index 00000000000..baa36b183ee
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/plugin.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/plugin.properties
new file mode 100644
index 00000000000..9af99f33e27
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/plugin.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.requirements.languagecreationtools.handlers
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Req Language Creation Tools Handlers (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/plugin.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/plugin.xml
new file mode 100644
index 00000000000..ba8ab4842c8
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/plugin.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.requirements.languagecreationtools.handlers.InitCreateInitialProfileFromDomainModelHandler"
+ commandId="org.eclipse.papyrus.requirements.languagecreationtools.handlers.InitCreateInitialProfileFromDomainModelHandler">
+ </handler>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/pom.xml
new file mode 100644
index 00000000000..2bd2e6fdc4f
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.languagecreationtools.handlers</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/src/org/eclipse/papyrus/requirements/languagecreationtools/handlers/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/src/org/eclipse/papyrus/requirements/languagecreationtools/handlers/Activator.java
new file mode 100644
index 00000000000..a2fe80318cf
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/src/org/eclipse/papyrus/requirements/languagecreationtools/handlers/Activator.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.languagecreationtools.handlers;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.requirements.languagecreationtools.handlers"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/src/org/eclipse/papyrus/requirements/languagecreationtools/handlers/InitCreateInitialProfileFromDomainModelHandler.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/src/org/eclipse/papyrus/requirements/languagecreationtools/handlers/InitCreateInitialProfileFromDomainModelHandler.java
new file mode 100644
index 00000000000..39f4869debd
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.handlers/src/org/eclipse/papyrus/requirements/languagecreationtools/handlers/InitCreateInitialProfileFromDomainModelHandler.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.languagecreationtools.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.requirements.common.PapyrusAbstractHandler;
+import org.eclipse.papyrus.requirements.languagecreationtools.commands.InitCreateProfileFromDomainModelCommand;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * Executes the generation of a profile based on a class diagram according to
+ * the preferences page of Papyrus Req
+ *
+ */
+public class InitCreateInitialProfileFromDomainModelHandler extends PapyrusAbstractHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ super.execute(event);
+ Element selectedElement = getSelection();
+ if (selectedElement != null) {
+ InitCreateProfileFromDomainModelCommand initCreateProfileFromDomainModelCommand = new InitCreateProfileFromDomainModelCommand(
+ transactionalEditingDomain, selectedElement);
+ transactionalEditingDomain.getCommandStack().execute(initCreateProfileFromDomainModelCommand);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+ *
+ * @return true if the handler is possible
+ */
+ @Override
+ public boolean isEnabled() {
+ Element selectedElement = getSelection();
+ if (selectedElement != null) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/.project
new file mode 100644
index 00000000000..4a8b7ed5d85
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.languagecreationtools.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..9988eb1465c
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.languagecreationtools.ui;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.languagecreationtools.ui.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
+ org.eclipse.papyrus.requirements.common.ui;bundle-version="0.7.0"
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: org.eclipse.papyrus.requirements.languagecreationtools.ui
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/build.properties
new file mode 100644
index 00000000000..ad723f0783b
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ images/,\
+ about.html,\
+ plugin.properties
+src.includes = about.html,\
+ images/
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/images/Profile.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/images/Profile.gif
new file mode 100644
index 00000000000..18eed1f5cb9
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/images/Profile.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/plugin.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/plugin.properties
new file mode 100644
index 00000000000..94b150f1062
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/plugin.properties
@@ -0,0 +1,12 @@
+#Properties file for org.eclipse.papyrus.requirements.languagecreationtools.ui
+papyrus.requirements.languagecreationtools.menu.label = Papyrus Req - Language Creation Tools
+papyrus.requirements.languagecreationtools.menu.tooltip = Tools to define requirements languages based on profiles and stereotypes
+
+generateProfileFromADomainModel.command.label = Generate a profile from a domain model
+generateProfileFromADomainModel.command.tooltip = Generate an initial profile from a domain model according to user-defined Papyrus Req preferences
+
+defineOrUpdateStereotypes.command.label = Define or update stereotypes
+defineOrUpdateStereotypes.command.tooltip = Define or update stereotype and profile on demand
+
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Req Profile Creation Tools UI (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/plugin.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/plugin.xml
new file mode 100644
index 00000000000..65b92f3c1ae
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/plugin.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu?after=org.eclipse.papyrus.requirements.common.ui.languagecreation.additions">
+ <menu
+ icon="platform:/plugin/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_16x16.png"
+ id="papyrus.requirements.languagecreationtools.menu"
+ label="%papyrus.requirements.languagecreationtools.menu.label"
+ tooltip="%papyrus.requirements.languagecreationtools.tooltip">
+ <visibleWhen>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </visibleWhen>
+ </menu>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup?after=org.eclipse.papyrus.requirements.common.ui.languagecreation.additions">
+ <menu
+ icon="platform:/plugin/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_16x16.png"
+ id="papyrus.requirements.languagecreationtools.menu"
+ label="%papyrus.requirements.languagecreationtools.menu.label"
+ tooltip="%papyrus.requirements.languagecreationtools.menu.tooltip">
+ </menu>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:papyrus.requirements.languagecreationtools.menu">
+ <command
+ commandId="org.eclipse.papyrus.requirements.languagecreationtools.handlers.InitCreateInitialProfileFromDomainModelHandler"
+ icon="images/Profile.gif"
+ label="%generateProfileFromADomainModel.command.label"
+ style="push"
+ tooltip="%generateProfileFromADomainModel.command.tooltip">
+ </command>
+ </menuContribution>
+ </extension>
+</plugin>
+
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/pom.xml
new file mode 100644
index 00000000000..06e32bb1ff9
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.languagecreationtools.ui</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/src/org/eclipse/papyrus/requirements/languagecreationtools/ui/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/src/org/eclipse/papyrus/requirements/languagecreationtools/ui/Activator.java
new file mode 100644
index 00000000000..1f666986212
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.languagecreationtools.ui/src/org/eclipse/papyrus/requirements/languagecreationtools/ui/Activator.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+* CEA LIST. - initial API and implementation
+*******************************************************************************/
+package org.eclipse.papyrus.requirements.languagecreationtools.ui;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.requirements.languagecreationtools.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/.project
new file mode 100644
index 00000000000..a8d326a0a58
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.preferences</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..da3d8ceb5ae
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui;bundle-version="3.107.0",
+ org.eclipse.core.runtime;bundle-version="3.12.0"
+Export-Package: org.eclipse.papyrus.requirements.preferences
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.7.0.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.requirements.preferences.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.preferences;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/build.properties
new file mode 100644
index 00000000000..653ec3c3daf
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/plugin.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/plugin.properties
new file mode 100644
index 00000000000..4fc20a8ca82
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/plugin.properties
@@ -0,0 +1,4 @@
+#Properties file for org.eclipse.papyrus.requirements.preferences
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Req SysML Preferences (Incubation)
+page.name = Papyrus Req
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/plugin.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/plugin.xml
new file mode 100644
index 00000000000..f7f8c2a46ce
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/plugin.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.papyrus.infra.core.sasheditor.preferences.generalcategory"
+ class="org.eclipse.papyrus.requirements.preferences.PreferencePage"
+ id="org.eclipse.papyrus.requirements.sysml.preferences.PreferencePage"
+ name="%page.name">
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.eclipse.papyrus.requirements.preferences.PreferenceInitializer">
+ </initializer>
+ </extension>
+</plugin>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/pom.xml
new file mode 100644
index 00000000000..61c61934e0f
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.preferences</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/src/org/eclipse/papyrus/requirements/preferences/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/src/org/eclipse/papyrus/requirements/preferences/Activator.java
new file mode 100644
index 00000000000..2d5869d2039
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/src/org/eclipse/papyrus/requirements/preferences/Activator.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+* CEA LIST. - initial API and implementation
+*******************************************************************************/
+package org.eclipse.papyrus.requirements.preferences;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.requirements.preferences"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/src/org/eclipse/papyrus/requirements/preferences/PreferenceConstants.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/src/org/eclipse/papyrus/requirements/preferences/PreferenceConstants.java
new file mode 100644
index 00000000000..277aa7af3a3
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/src/org/eclipse/papyrus/requirements/preferences/PreferenceConstants.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST. - initial API and implementation
+ * Mauricio Alférez (mauricio.alferez@cea.fr) CEA LIST - Bugs 477726, 478595
+ *
+ ******************************************************************************/
+package org.eclipse.papyrus.requirements.preferences;
+
+/**
+ * Constant definitions for plug-in preferences
+ */
+public class PreferenceConstants {
+ //Options for requirements creation
+ public static final String REQUIREMENT_ID_PREFIX = "REQUIREMENT_ID_PREFIX";
+ public static final String REQUIREMENT_ID_DIGIT = "REQUIREMENT_ID_DIGIT";
+ public static final String CHILD_REQUIREMENTS_SEPARATOR = "CHILD_REQUIREMENTS_SEPARATOR";
+ //Options for the generation of a profile based on a domain model
+ public static final String NSURI_PREFIX = "NSURI_PREFIX";
+ public static final String GENERATE_ABSTRACTIONS_MODEL = "GENERATE_ABSTRACTIONS_MODEL";
+ public static final String FROM_ASSOCIATIONS_TO_STEREOTYPES = "FROM_ASSOCIATIONS_TO_STEREOTYPES";
+ public static final String FROM_ASSOCIATIONS_TO_ASSOCIATIONS="FROM_ASSOCIATIONS_TO_ASSOCIATIONS";
+ //public static final String METACLASS_EXTENDED_BY_NODES = "METACLASS_EXTENDED_BY_NODES";
+ //public static final String METACLASS_EXTENDED_BY_EDGES = "METACLASS_EXTENDED_BY_EDGES";
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/src/org/eclipse/papyrus/requirements/preferences/PreferenceInitializer.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/src/org/eclipse/papyrus/requirements/preferences/PreferenceInitializer.java
new file mode 100644
index 00000000000..5a9859faf18
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/src/org/eclipse/papyrus/requirements/preferences/PreferenceInitializer.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST. - initial API and implementation
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Bugs 477726, 478595, 481377, ...
+ *
+ ******************************************************************************/
+package org.eclipse.papyrus.requirements.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+
+/**
+ * Initializes the preferences for the creation of Papyrus REQ SysML
+ * requirements
+ *
+ */
+public class PreferenceInitializer extends AbstractPreferenceInitializer {
+
+ @Override
+ public void initializeDefaultPreferences() {
+ IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+
+ // Options for requirements creation
+ store.setDefault(PreferenceConstants.REQUIREMENT_ID_PREFIX, "REQ_");
+ store.setDefault(PreferenceConstants.REQUIREMENT_ID_DIGIT, 3);
+ store.setDefault(PreferenceConstants.CHILD_REQUIREMENTS_SEPARATOR, "_");
+
+ // Options for the generation of a profile based on a domain model
+ store.setDefault(PreferenceConstants.NSURI_PREFIX, "https://www.eclipse.org/papyrus/");
+ store.setDefault(PreferenceConstants.GENERATE_ABSTRACTIONS_MODEL, false);
+ store.setDefault(PreferenceConstants.FROM_ASSOCIATIONS_TO_STEREOTYPES, false);
+ store.setDefault(PreferenceConstants.FROM_ASSOCIATIONS_TO_ASSOCIATIONS, false);
+ // store.setDefault(PreferenceConstants.METACLASS_EXTENDED_BY_NODES,
+ // "none");
+ // store.setDefault(PreferenceConstants.METACLASS_EXTENDED_BY_EDGES,
+ // "none");
+ }
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/src/org/eclipse/papyrus/requirements/preferences/PreferencePage.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/src/org/eclipse/papyrus/requirements/preferences/PreferencePage.java
new file mode 100644
index 00000000000..2832f6c0976
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.preferences/src/org/eclipse/papyrus/requirements/preferences/PreferencePage.java
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST. - initial API and implementation
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Bugs 477726, 478595, 481377,...
+ *
+ *******************************************************************************/
+
+package org.eclipse.papyrus.requirements.preferences;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.IntegerFieldEditor;
+import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * Preference page related to SysML Papyrus REQ
+ *
+ */
+public class PreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ public PreferencePage() {
+ super(GRID);
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ setDescription("Papyrus SysML Requirements");
+ }
+
+ /**
+ * Creates the field editors. Field editors are abstractions of the common
+ * GUI blocks needed to manipulate various types of preferences. Each field
+ * editor knows how to save and restore itself.
+ */
+ @Override
+ public void createFieldEditors() {
+ Group reqCreationOptions = createGroup("Requirements creation");
+ addField(new StringFieldEditor(PreferenceConstants.REQUIREMENT_ID_PREFIX, "Prefix for requirement ID",
+ reqCreationOptions));
+ addField(new IntegerFieldEditor(PreferenceConstants.REQUIREMENT_ID_DIGIT, "Number of digits for requirement ID",
+ reqCreationOptions));
+ addField(new StringFieldEditor(PreferenceConstants.CHILD_REQUIREMENTS_SEPARATOR,
+ "Separator between parent and child requirements IDs", reqCreationOptions));
+
+ Group profileCreationOptions = createGroup("Generation of a profile based on a domain model");
+ addField(new StringFieldEditor(PreferenceConstants.NSURI_PREFIX, "Ns URI prefix for new profile",
+ profileCreationOptions));
+ addField(new BooleanFieldEditor(PreferenceConstants.GENERATE_ABSTRACTIONS_MODEL,
+ "Generate an abstraction model?", profileCreationOptions));
+ addField(new BooleanFieldEditor(PreferenceConstants.FROM_ASSOCIATIONS_TO_STEREOTYPES,
+ "Transform from associations to stereotypes?", profileCreationOptions));
+ addField(new BooleanFieldEditor(PreferenceConstants.FROM_ASSOCIATIONS_TO_ASSOCIATIONS,
+ "Transform from associations to associations?", profileCreationOptions));
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ public void init(IWorkbench workbench) {
+ }
+
+ private Group createGroup(String text) {
+ Group group = new Group(getFieldEditorParent(), SWT.NONE);
+ // group.setLayout(new GridLayout(1, false));
+
+ GridLayout gridLayout = new GridLayout(2, false);
+ GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.horizontalSpan = 2;
+
+ group.setLayoutData(gridData);
+ group.setLayout(gridLayout);
+
+ group.setText(text);
+
+ return group;
+ }
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/.project
new file mode 100644
index 00000000000..f697fccf40d
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.sysml.assistant.commands</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..79f3cbfb58b
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.sysml.assistant.commands;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.sysml.assistant.commands.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0";resolution:=optional,
+ org.eclipse.papyrus.requirements.preferences;bundle-version="0.7.0",
+ org.eclipse.papyrus.requirements.sysml.common;bundle-version="0.7.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.requirements.sysml.assistant.commands;
+ uses:="org.osgi.framework,
+ org.eclipse.uml2.uml,
+ org.eclipse.ui.plugin,
+ org.eclipse.emf.transaction"
+Bundle-Localization: plugin
+Import-Package: org.eclipse.papyrus.requirements.sysml.common
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/build.properties
new file mode 100644
index 00000000000..baa36b183ee
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/plugin.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/plugin.properties
new file mode 100644
index 00000000000..55175c56150
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/plugin.properties
@@ -0,0 +1,12 @@
+#Properties file for org.eclipse.papyrus.requirements.sysml.assistant.commands
+createNewRequirement.command.name = Create new requirement
+decomposeRequirement.command.name = Decompose requirement
+deriveNewRequirement.command.name = Derive new requirement
+addDerivedLink.command.name = Add derived link
+addSatisfyLink.command.name = Add satisfy Link
+addVerifyLink.command.name = Add verify Link
+createComments.command.name = Create comments
+extractComments.command.name = Extract comments
+
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Req SysML Assistant (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/plugin.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/plugin.xml
new file mode 100644
index 00000000000..6fe30bd9172
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/plugin.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ id="org.eclipse.papyrus.requirements.sysml.assistant.handlers.PapyrusReqSysMLRequirementHandler"
+ name="%createNewRequirement.command.name">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ id="org.eclipse.papyrus.requirements.sysml.assistant.handlers.DecomposeReqHandler"
+ name="%decomposeRequirement.command.name">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ id="org.eclipse.papyrus.requirements.sysml.assistant.handlers.InitDerivedReqHandler"
+ name="%deriveNewRequirement.command.name">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ id="org.eclipse.papyrus.requirements.sysml.assistant.handlers.AddDerivedLinkReqHandler"
+ name="%addDerivedLink.command.name">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ id="org.eclipse.papyrus.requirements.sysml.assistant.handlers.AddSatisfyLinkHandler"
+ name="%addSatisfyLink.command.name">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ id="org.eclipse.papyrus.requirements.sysml.assistant.handlers.AddVerifyLinkHandler"
+ name="%addVerifyLink.command.name">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ id="org.eclipse.papyrus.requirements.sysml.assistant.handlers.CommentReqHandler"
+ name="%createComments.command.name">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ id="org.eclipse.papyrus.requirements.sysml.assistant.handlers.ExtractCommentsHandler"
+ name="%extractComments.command.name">
+ </command>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/pom.xml
new file mode 100644
index 00000000000..44750f8980d
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.sysml.assistant.commands</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/Activator.java
new file mode 100644
index 00000000000..3c658e9b1ab
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/Activator.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+* CEA LIST. - initial API and implementation
+*******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.commands;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.requirements.sysml.assistant.commands"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/AddDerivedLinkReqCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/AddDerivedLinkReqCommand.java
new file mode 100644
index 00000000000..63ebc7b34a1
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/AddDerivedLinkReqCommand.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+* CEA LIST. - initial API and implementation
+*******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.commands;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.widgets.editors.MultipleValueSelectionDialog;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.infra.widgets.selectors.ReferenceSelector;
+import org.eclipse.papyrus.requirements.sysml.common.I_SysMLStereotype;
+import org.eclipse.papyrus.uml.tools.providers.UMLContentProvider;
+import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLPackage;
+/**
+ *
+ * Creates a set of DerivedReq links
+ */
+public class AddDerivedLinkReqCommand extends RecordingCommand {
+ protected Element selectedElement;
+ TransactionalEditingDomain domain;
+
+ public AddDerivedLinkReqCommand(TransactionalEditingDomain domain, Element selectedElement) {
+ super(domain,"AddDerivedReqCommand" );
+ this.selectedElement=selectedElement;
+ this.domain=domain;
+ }
+
+ private Package getToPackage(Element elem){
+ Package tmp= elem.getNearestPackage();
+ while(tmp.getOwner()!=null && (tmp.getOwner()instanceof Package)){
+ tmp= (Package)tmp.getOwner();
+ }
+ return tmp;
+ }
+ @Override
+ protected void doExecute() {
+ if( selectedElement.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE)!=null){
+ Stereotype reqStereotype=selectedElement.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE);
+ //open Tree selection dialog in order to choose the owner of the new requirement
+ final IStaticContentProvider provider =new UMLContentProvider(getToPackage(selectedElement), UMLPackage.eINSTANCE.getPackage_PackagedElement(),reqStereotype);
+ ReferenceSelector selector = new ReferenceSelector();
+ selector.setLabelProvider(new UMLLabelProvider());
+ selector.setContentProvider(provider);
+ MultipleValueSelectionDialog dialog = new MultipleValueSelectionDialog(Display.getDefault().getActiveShell(),selector,"Choose requirements to add DeriveReqt link");
+
+ dialog.setLabelProvider(new UMLLabelProvider());
+ //dialog.setMessage("Choose Requirements to add Derived Link");
+ //dialog.setTitle("Choose Requirements to add Derived Link");
+ dialog.create();
+ if(dialog.open() == org.eclipse.jface.window.Window.OK) {
+ Object[] result = dialog.getResult();
+
+ for (int i = 0; i < result.length; i++) {
+ Element currentElement = (Element) result[i];
+ if( currentElement.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE)!=null){
+ DerivationReqCreateCommand derivationReqCreateCommand= new DerivationReqCreateCommand(domain,(NamedElement) selectedElement,(NamedElement) currentElement);
+ derivationReqCreateCommand.execute();
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/AddSatisfyLinkCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/AddSatisfyLinkCommand.java
new file mode 100644
index 00000000000..31bbfb77367
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/AddSatisfyLinkCommand.java
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.commands;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.widgets.editors.MultipleValueSelectionDialog;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.infra.widgets.selectors.ReferenceSelector;
+import org.eclipse.papyrus.uml.tools.providers.UMLContentProvider;
+import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLPackage;
+/**
+ *
+ * Creates a set of Satisfy links
+ */
+public class AddSatisfyLinkCommand extends RecordingCommand {
+ protected Element selectedElement;
+ TransactionalEditingDomain domain;
+
+ public AddSatisfyLinkCommand(TransactionalEditingDomain domain, Element selectedElement) {
+ super(domain,"Add Satisfy Link Command" );
+ this.selectedElement=selectedElement;
+ this.domain=domain;
+ }
+
+ private Package getToPackage(Element elem){
+ Package tmp= elem.getNearestPackage();
+ while(tmp.getOwner()!=null && (tmp.getOwner()instanceof Package)){
+ tmp= (Package)tmp.getOwner();
+ }
+ return tmp;
+ }
+ @Override
+ protected void doExecute() {
+ //open Tree selection dialog
+ final IStaticContentProvider provider =new UMLContentProvider(getToPackage(selectedElement), UMLPackage.eINSTANCE.getPackage_PackagedElement());
+ ReferenceSelector selector = new ReferenceSelector();
+ selector.setLabelProvider(new UMLLabelProvider());
+ selector.setContentProvider(provider);
+ MultipleValueSelectionDialog dialog = new MultipleValueSelectionDialog(Display.getDefault().getActiveShell(),selector,"Choose the model elements that satisfy the requirement");
+
+ dialog.setLabelProvider(new UMLLabelProvider());
+ //dialog.setMessage("Choose the model elements that satisfy the requirement");
+ //dialog.setTitle("Choose the model elements that satisfy the requirement");
+ dialog.create();
+ if(dialog.open() == org.eclipse.jface.window.Window.OK) {
+ Object[] result = dialog.getResult();
+
+ for (int i = 0; i < result.length; i++) {
+ Element currentElement = (Element) result[i];
+ SatisfyCreateCommand satisfyCreateCommand= new SatisfyCreateCommand(domain,(NamedElement) currentElement,(NamedElement) selectedElement);
+ satisfyCreateCommand.execute();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/AddVerifyLinkCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/AddVerifyLinkCommand.java
new file mode 100644
index 00000000000..31baaa8996c
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/AddVerifyLinkCommand.java
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.commands;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.widgets.editors.MultipleValueSelectionDialog;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.infra.widgets.selectors.ReferenceSelector;
+import org.eclipse.papyrus.uml.tools.providers.UMLContentProvider;
+import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLPackage;
+/**
+ *
+ * Creates a set of Verify links
+ */
+public class AddVerifyLinkCommand extends RecordingCommand {
+ protected Element selectedElement;
+ TransactionalEditingDomain domain;
+
+ public AddVerifyLinkCommand(TransactionalEditingDomain domain, Element selectedElement) {
+ super(domain,"Add Verify Link Command" );
+ this.selectedElement=selectedElement;
+ this.domain=domain;
+ }
+
+ private Package getToPackage(Element elem){
+ Package tmp= elem.getNearestPackage();
+ while(tmp.getOwner()!=null && (tmp.getOwner()instanceof Package)){
+ tmp= (Package)tmp.getOwner();
+ }
+ return tmp;
+ }
+ @Override
+ protected void doExecute() {
+ //open Tree selection dialog
+ final IStaticContentProvider provider =new UMLContentProvider(getToPackage(selectedElement), UMLPackage.eINSTANCE.getPackage_PackagedElement());
+ ReferenceSelector selector = new ReferenceSelector();
+ selector.setLabelProvider(new UMLLabelProvider());
+ selector.setContentProvider(provider);
+ MultipleValueSelectionDialog dialog = new MultipleValueSelectionDialog(Display.getDefault().getActiveShell(),selector,"Choose the model elements that verify the requirement");
+
+ dialog.setLabelProvider(new UMLLabelProvider());
+ //dialog.setMessage("Choose the model elements that verify the requirement");
+ //dialog.setTitle("Choose the model elements that verify the requirement");
+ dialog.create();
+ if(dialog.open() == org.eclipse.jface.window.Window.OK) {
+ Object[] result = dialog.getResult();
+
+ for (int i = 0; i < result.length; i++) {
+ Element currentElement = (Element) result[i];
+ VerifyCreateCommand verifyCreateCommand= new VerifyCreateCommand(domain,(NamedElement) currentElement,(NamedElement) selectedElement);
+ verifyCreateCommand.execute();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/CommentReqCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/CommentReqCommand.java
new file mode 100644
index 00000000000..a7bd4ecedb5
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/CommentReqCommand.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+* CEA LIST. - initial API and implementation
+*******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.commands;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Element;
+/**
+ *
+ * Parses the text of the requirement and move some parts as comment
+ *
+ */
+public class CommentReqCommand extends RecordingCommand {
+ protected ArrayList<Element> selectedElements;
+ public CommentReqCommand(TransactionalEditingDomain domain, ArrayList<Element> selectedElements) {
+ super(domain,"CommentReqCommand" );
+ this.selectedElements=selectedElements;
+ }
+
+ protected void createAnnotatedComment(Element owner,String text){
+ Comment comment=owner.createOwnedComment();
+ comment.getAnnotatedElements().add(owner);
+ comment.setBody(text);
+ }
+
+
+ @Override
+ protected void doExecute() {
+ for (Iterator<Element> iterator = selectedElements.iterator(); iterator.hasNext();) {
+ Element currentElement = (Element) iterator.next();
+ createAnnotatedComment(currentElement, "COMMENTS:\n");
+
+ }
+
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/DecomposeReqCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/DecomposeReqCommand.java
new file mode 100644
index 00000000000..a5a789f0bcd
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/DecomposeReqCommand.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.commands;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+
+/**
+ * This class creates a "Decompose" link between requirements
+ *
+ */
+public class DecomposeReqCommand extends RecordingCommand {
+ private org.eclipse.uml2.uml.Class parent;
+ private org.eclipse.uml2.uml.Class child;
+
+ /**
+ * Makes a decomposition
+ *
+ * @param domain
+ * the domain to execute a transaction
+ * @param child
+ * element that will be nested by the parent
+ * @param parent
+ * element that will nest the child
+ *
+ */
+ public DecomposeReqCommand(TransactionalEditingDomain domain, org.eclipse.uml2.uml.Class child,
+ org.eclipse.uml2.uml.Class parent) {
+ super(domain, "Create a Decompositon");
+ this.parent = parent;
+ this.child = child;
+ }
+
+ @Override
+ protected void doExecute() {
+ parent.getNestedClassifiers().add(child);
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/DerivationReqCreateCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/DerivationReqCreateCommand.java
new file mode 100644
index 00000000000..e1f339e24fe
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/DerivationReqCreateCommand.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Patrick Tessier (patrick.tessier@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.commands;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * Creates a "DerivedReq" link between requirements
+ *
+ */
+public class DerivationReqCreateCommand extends RecordingCommand {
+ private NamedElement source;
+ private NamedElement target;
+ /** Qualified name of the stereotype DeriveReqt */
+ public static final String DERIVEREQT_STEREOTYPE = "SysML::Requirements::DeriveReqt";
+ /**
+ * use to make an abstraction
+ * @param domain the domain to execute a transaction
+ * @param source the source of the abstraction (the more concrete element)
+ * @param target the target of the abstraction (the more abstract element)
+
+ */
+ public DerivationReqCreateCommand(TransactionalEditingDomain domain, NamedElement source, NamedElement target){
+ super(domain,"Create an Abstraction");
+ this.source=source;
+ this.target=target;
+ }
+
+ @Override
+ protected void doExecute() {
+ Abstraction theAbstraction= UMLFactory.eINSTANCE.createAbstraction();
+ source.getNearestPackage().getPackagedElements().add(theAbstraction);
+ theAbstraction.getSuppliers().add(target);
+ theAbstraction.getClients().add(source);
+ theAbstraction.setName("DeriveFrom_"+this.target.getName());
+ Stereotype satisfyStereotype= theAbstraction.getApplicableStereotype(DERIVEREQT_STEREOTYPE);
+ theAbstraction.applyStereotype(satisfyStereotype);
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/ExtractCommentCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/ExtractCommentCommand.java
new file mode 100644
index 00000000000..08c7854b00d
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/ExtractCommentCommand.java
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+* CEA LIST. - initial API and implementation
+*******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.commands;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.requirements.sysml.common.I_SysMLStereotype;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Stereotype;
+/**
+ *
+ * Parses the text of the requirement and move some parts as comments
+ *
+ */
+public class ExtractCommentCommand extends RecordingCommand {
+ protected ArrayList<Element> selectedElements;
+ public ExtractCommentCommand(TransactionalEditingDomain domain, ArrayList<Element> selectedElements) {
+ super(domain,"ExtractCommentCommand" );
+ this.selectedElements=selectedElements;
+ }
+
+ protected void createAnnotatedComment(Element owner,String text){
+ Comment comment=owner.createOwnedComment();
+ comment.getAnnotatedElements().add(owner);
+ comment.setBody(text);
+ }
+
+ /**
+ * example [stakeHolder1, stakeHolder2]
+ *
+ * @param req
+ */
+ protected void parseAndExecute(Class req) {
+ Stereotype reqStereotype = req.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE);
+ String text = (String) req.getValue(reqStereotype, I_SysMLStereotype.REQUIREMENT_TEXT_ATT);
+ if (text == null)
+ return;
+ text = text.trim();
+ if (text.startsWith("[")) {
+ // stakeholders detected
+ int index = text.indexOf("]");
+ String stakeholders = text.substring(0, index + 1);
+ text = text.substring(index + 1);
+ text = text.trim();
+ createAnnotatedComment(req, "Stakeholders:" + stakeholders);
+ req.setValue(reqStereotype, I_SysMLStereotype.REQUIREMENT_TEXT_ATT, text);
+ }
+ }
+
+ @Override
+ protected void doExecute() {
+ for (Iterator<Element> iterator = selectedElements.iterator(); iterator.hasNext();) {
+ Element currentElement = (Element) iterator.next();
+ if (currentElement.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE) != null) {
+ parseAndExecute((Class) currentElement);
+ }
+
+ }
+
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/InitDecomposeReqCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/InitDecomposeReqCommand.java
new file mode 100644
index 00000000000..2c7ee4e3109
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/InitDecomposeReqCommand.java
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.commands;
+
+import java.text.DecimalFormat;
+import java.util.Iterator;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.requirements.preferences.Activator;
+import org.eclipse.papyrus.requirements.preferences.PreferenceConstants;
+import org.eclipse.papyrus.requirements.sysml.common.I_SysMLStereotype;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Stereotype;
+
+/**
+ * Creates a requirement and adds a decomposition link from the selected
+ * requirement to the new requirement. The names are based on the Papyrus Req
+ * preferences.
+ *
+ */
+public class InitDecomposeReqCommand extends RecordingCommand {
+ protected Element selectedElement;
+ TransactionalEditingDomain domain;
+
+ public InitDecomposeReqCommand(TransactionalEditingDomain domain, Element selectedElement) {
+ super(domain, "DecomposeReqCommand");
+ this.selectedElement = selectedElement;
+ this.domain = domain;
+ }
+
+ @Override
+ protected void doExecute() {
+ String concatenedString = "";
+ org.eclipse.uml2.uml.Package owner = null;
+ if (selectedElement.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE) != null) {
+ Stereotype stereotype = selectedElement.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE);
+ concatenedString = concatenedString + "\n"
+ + selectedElement.getValue(stereotype, I_SysMLStereotype.REQUIREMENT_TEXT_ATT);
+ owner = selectedElement.getNearestPackage();
+ String id = getNewIDReq((Class) selectedElement, stereotype);
+ Class req = owner.createOwnedClass(id, false);
+ Stereotype reqStereotype = req.getApplicableStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE);
+ req.applyStereotype(reqStereotype);
+ req.setValue(reqStereotype, I_SysMLStereotype.REQUIREMENT_TEXT_ATT, concatenedString);
+ req.setValue(reqStereotype, I_SysMLStereotype.REQUIREMENT_ID_ATT, id);
+ DecomposeReqCommand decompositionReqCreateCommand = new DecomposeReqCommand(domain, req,
+ (Class) selectedElement);
+ decompositionReqCreateCommand.execute();
+ }
+ }
+
+ /**
+ * get a new name of a Papyrus SysML child requirement based on the Papyrus
+ * req preferences and the Id of the parent Requirement
+ *
+ * @param parent
+ * the parent requirement
+ * @return the name for a potential requirement
+ */
+ public static String getNewIDReq(org.eclipse.uml2.uml.Class parent, Stereotype stereotype) {
+ IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ String prefix = store.getString(PreferenceConstants.REQUIREMENT_ID_PREFIX);// by
+ // default
+ // "REQ_"
+ String separator = store.getString(PreferenceConstants.CHILD_REQUIREMENTS_SEPARATOR); // by
+ // default
+ // "_"
+
+ String parentRequirementId = (String) parent.getValue(stereotype, I_SysMLStereotype.REQUIREMENT_ID_ATT);
+ String parentRequirementIdSuffix = parentRequirementId.replaceAll(prefix, "");
+ int digit = store.getInt(PreferenceConstants.REQUIREMENT_ID_DIGIT);// by
+ // default
+ // 3
+ int i = 0;
+ DecimalFormat df = new DecimalFormat();
+ df.setMinimumIntegerDigits(digit);
+ String value = (df.format(i));
+ boolean IDexist = true;
+ while (IDexist) {
+ IDexist = false;
+ i++;
+ value = (df.format(i));
+ EList<Classifier> classifiers = parent.getNestedClassifiers();
+ for (Iterator<Classifier> iterator = classifiers.iterator(); iterator.hasNext() && (!IDexist);) {
+ Classifier classifier = (Classifier) iterator.next();
+ // current element is a Req?
+ Stereotype reqStereotype = classifier.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE);
+ if (reqStereotype != null) {
+ if (classifier.getValue(reqStereotype, I_SysMLStereotype.REQUIREMENT_ID_ATT) != null) {
+ String existedID = (String) classifier.getValue(reqStereotype,
+ I_SysMLStereotype.REQUIREMENT_ID_ATT);
+ String newID = prefix + parentRequirementIdSuffix + separator + value;
+ // id already exists so increment suffix
+ if (newID.equals(existedID)) {
+ IDexist = true;
+ }
+ }
+ }
+ }
+
+ }
+ return prefix + parentRequirementIdSuffix + separator + value;
+ }
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/InitDerivedReqCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/InitDerivedReqCommand.java
new file mode 100644
index 00000000000..e9436fcf256
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/InitDerivedReqCommand.java
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+* CEA LIST. - initial API and implementation
+*******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.commands;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog;
+import org.eclipse.papyrus.requirements.sysml.common.I_SysMLStereotype;
+import org.eclipse.papyrus.uml.tools.providers.UMLContentProvider;
+import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLPackage;
+/**
+ *
+ * Creates a derived requirement from a set of requirements with concatened text
+ *
+ */
+public class InitDerivedReqCommand extends RecordingCommand {
+ protected ArrayList<Element> selectedElements;
+ TransactionalEditingDomain domain;
+
+ public InitDerivedReqCommand(TransactionalEditingDomain domain, ArrayList<Element> selectedElements) {
+ super(domain,"InitDerivedReqCommand" );
+ this.selectedElements=selectedElements;
+ this.domain=domain;
+ }
+
+ private Package getToPackage(Element elem){
+ Package tmp= elem.getNearestPackage();
+ while(tmp.getOwner()!=null && (tmp.getOwner()instanceof Package)){
+ tmp= (Package)tmp.getOwner();
+ }
+ return tmp;
+ }
+ @Override
+ protected void doExecute() {
+ String concatenedString="";
+ org.eclipse.uml2.uml.Package owner=null;
+ for (Iterator<Element> iterator = selectedElements.iterator(); iterator.hasNext();) {
+ Element currentElement = (Element) iterator.next();
+ if( currentElement.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE)!=null){
+ Stereotype stereotype= currentElement.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE);
+ concatenedString=concatenedString+ "\n"+currentElement.getValue(stereotype, I_SysMLStereotype.REQUIREMENT_TEXT_ATT);
+ owner=currentElement.getNearestPackage();
+ }
+
+ }
+ //open Tree selection dialog in order to choose the owner of the new requirement
+ TreeSelectorDialog dialog = new TreeSelectorDialog(Display.getDefault().getActiveShell());
+ dialog.setContentProvider(new UMLContentProvider(getToPackage(owner), UMLPackage.eINSTANCE.getPackage_NestedPackage()));
+ dialog.setLabelProvider(new UMLLabelProvider());
+ dialog.setMessage("Choose the owner for the new requirement");
+ dialog.setTitle("Choose the owner for the new requirement");
+ dialog.create();
+ dialog.setDescription("Choose the owner for the new requirement");
+ if(dialog.open() == org.eclipse.jface.window.Window.OK) {
+ Object[] result = dialog.getResult();
+ owner= ((org.eclipse.uml2.uml.Package)result[0]);
+ }
+ else return;
+ String ID= PapyrusReqSysMLRequirementCreateCommand.getNewIDReq(owner);
+ Class req=owner.createOwnedClass(ID, false);
+ Stereotype reqStereotype=req.getApplicableStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE);
+ req.applyStereotype(reqStereotype);
+ req.setValue(reqStereotype, I_SysMLStereotype.REQUIREMENT_TEXT_ATT, concatenedString);
+ req.setValue(reqStereotype, I_SysMLStereotype.REQUIREMENT_ID_ATT, ID);
+
+
+ for (Iterator<Element> iterator = selectedElements.iterator(); iterator.hasNext();) {
+ Element currentElement = (Element) iterator.next();
+ if( currentElement.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE)!=null){
+ DerivationReqCreateCommand derivationReqCreateCommand= new DerivationReqCreateCommand(domain, req,(NamedElement) currentElement);
+ derivationReqCreateCommand.execute();
+ }
+
+ }
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/PapyrusReqSysMLRequirementCreateCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/PapyrusReqSysMLRequirementCreateCommand.java
new file mode 100644
index 00000000000..7bae08f3818
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/PapyrusReqSysMLRequirementCreateCommand.java
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+* CEA LIST. - initial API and implementation
+*******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.commands;
+
+import java.text.DecimalFormat;
+import java.util.Iterator;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.requirements.preferences.Activator;
+import org.eclipse.papyrus.requirements.preferences.PreferenceConstants;
+import org.eclipse.papyrus.requirements.sysml.common.I_SysMLStereotype;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.Stereotype;
+
+/**
+ * Creates a new SysML requirements based on the Papyrus Req preferences page.
+ *
+ */
+public class PapyrusReqSysMLRequirementCreateCommand extends RecordingCommand {
+ protected Element selectedElement;
+
+ public PapyrusReqSysMLRequirementCreateCommand(TransactionalEditingDomain domain, Element selectedElements) {
+ super(domain, "PapyrusReqSysMLRequirementCreateCommand");
+ this.selectedElement = selectedElements;
+ }
+
+ protected void createRequirement(org.eclipse.uml2.uml.Package owner, String text) {
+ org.eclipse.uml2.uml.Class requirement = owner.createOwnedClass("tmpName", false);
+ Stereotype reqStereotype = requirement.getApplicableStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE);
+ requirement.applyStereotype(reqStereotype);
+ String id = getNewIDReq(owner);
+ requirement.setName(id);
+ requirement.setValue(reqStereotype, I_SysMLStereotype.REQUIREMENT_ID_ATT, id);
+ }
+
+ /**
+ * get new name of Papyrus SysML requirement
+ *
+ * @param owner
+ * the package that will contain requirement
+ * @return the name for a potential requirement
+ */
+ public static String getNewIDReq(org.eclipse.uml2.uml.Package owner) {
+ IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ String prefix = store.getString(PreferenceConstants.REQUIREMENT_ID_PREFIX);
+ int digit = store.getInt(PreferenceConstants.REQUIREMENT_ID_DIGIT);
+ int i = 0;
+
+ DecimalFormat df = new DecimalFormat();
+ // create suffix
+ df.setMinimumIntegerDigits(digit);
+ String value = (df.format(i));
+ // got through all elements
+ boolean IDexist = true;
+ while (IDexist) {
+ IDexist = false;
+ i++;
+ value = (df.format(i));
+ EList<PackageableElement> packelements = owner.getPackagedElements();
+ for (Iterator<PackageableElement> iterator = packelements.iterator(); iterator.hasNext() && (!IDexist);) {
+ PackageableElement packageableElement = (PackageableElement) iterator.next();
+ // current element is a Req?
+ Stereotype reqStereotype = packageableElement
+ .getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE);
+
+ if (reqStereotype != null) {
+ if (packageableElement.getValue(reqStereotype, I_SysMLStereotype.REQUIREMENT_ID_ATT) != null) {
+ String existedID = (String) packageableElement.getValue(reqStereotype,
+ I_SysMLStereotype.REQUIREMENT_ID_ATT);
+ String newID = prefix + value;
+ // id already exist so increment suffix
+ if (newID.equals(existedID)) {
+ IDexist = true;
+ }
+ }
+ }
+ }
+
+ }
+ return prefix + value;
+
+ }
+
+ @Override
+ protected void doExecute() {
+ if (selectedElement instanceof Package) {
+ createRequirement((Package) selectedElement, "");
+ }
+
+ }
+
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/SatisfyCreateCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/SatisfyCreateCommand.java
new file mode 100644
index 00000000000..f411fe59b14
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/SatisfyCreateCommand.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.commands;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.requirements.sysml.common.I_SysMLStereotype;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * Creates a "Satisfy" link between a requirement and a namedElement
+ *
+ */
+public class SatisfyCreateCommand extends RecordingCommand {
+ private NamedElement source;
+ private NamedElement target;
+
+ /**
+ * use to make an abstraction
+ *
+ * @param domain
+ * the domain to execute a transaction
+ * @param source
+ * the source of the abstraction (the more concrete element)
+ * @param target
+ * the target of the abstraction (the more abstract element)
+ *
+ */
+ public SatisfyCreateCommand(TransactionalEditingDomain domain, NamedElement source, NamedElement target) {
+ super(domain, "Create an Abstraction");
+ this.source = source;
+ this.target = target;
+ }
+
+ @Override
+ protected void doExecute() {
+ Abstraction theAbstraction = UMLFactory.eINSTANCE.createAbstraction();
+ source.getNearestPackage().getPackagedElements().add(theAbstraction);
+ theAbstraction.getSuppliers().add(target);
+ theAbstraction.getClients().add(source);
+ theAbstraction.setName("Satisfies_" + this.target.getName());
+ Stereotype satisfyStereotype = theAbstraction.getApplicableStereotype(I_SysMLStereotype.SATISFY_STEREOTYPE);
+ theAbstraction.applyStereotype(satisfyStereotype);
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/VerifyCreateCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/VerifyCreateCommand.java
new file mode 100644
index 00000000000..29c481c95e4
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.commands/src/org/eclipse/papyrus/requirements/sysml/assistant/commands/VerifyCreateCommand.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.commands;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.requirements.sysml.common.I_SysMLStereotype;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * Creates a "Verify" link between a requirement and a namedElement
+ *
+ */
+public class VerifyCreateCommand extends RecordingCommand {
+ private NamedElement source;
+ private NamedElement target;
+
+ /**
+ * use to make an abstraction
+ *
+ * @param domain
+ * the domain to execute a transaction
+ * @param source
+ * the source of the abstraction (the more concrete element)
+ * @param target
+ * the target of the abstraction (the more abstract element)
+ *
+ */
+ public VerifyCreateCommand(TransactionalEditingDomain domain, NamedElement source, NamedElement target) {
+ super(domain, "Create an Abstraction");
+ this.source = source;
+ this.target = target;
+ }
+
+ @Override
+ protected void doExecute() {
+ Abstraction theAbstraction = UMLFactory.eINSTANCE.createAbstraction();
+ source.getNearestPackage().getPackagedElements().add(theAbstraction);
+ theAbstraction.getSuppliers().add(target);
+ theAbstraction.getClients().add(source);
+ theAbstraction.setName("Verifies_" + this.target.getName());
+ Stereotype verifyStereotype = theAbstraction.getApplicableStereotype(I_SysMLStereotype.VERIFY_STEREOTYPE);
+ theAbstraction.applyStereotype(verifyStereotype);
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/.project
new file mode 100644
index 00000000000..8cc8b158b5a
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.sysml.assistant.handlers</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..b79d562e1a5
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.sysml.assistant.handlers;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.sysml.assistant.handlers.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.2.0";resolution:=optional,
+ org.eclipse.papyrus.requirements.common,
+ org.eclipse.papyrus.requirements.sysml.assistant.commands;bundle-version="0.7.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.requirements.sysml.assistant.handlers
+Bundle-Localization: plugin
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/build.properties
new file mode 100644
index 00000000000..baa36b183ee
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/plugin.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/plugin.properties
new file mode 100644
index 00000000000..2f5af080fd9
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/plugin.properties
@@ -0,0 +1,40 @@
+#Properties file for org.eclipse.papyrus.requirements.sysml.assistant
+menu.label = Papyrus Req
+menu.tooltip = Assistants to manage SysML requirements
+menu.label.0 = Tools to Define Requirements Profile
+menu.tooltip.0 = Tools to Define Requirements Language
+
+command.label = Create New Requirement
+command.tooltip = Create New Requirement
+command.label.0 = Add Derived Link
+command.tooltip.0 = Add Derived Link
+command.label.1 = Derive New Requirement
+command.tooltip.1 = Derive New Requirement
+command.label.2 = Create Comments for Elements
+command.tooltip.2 = Create Comments for Elements
+command.label.3 = Extract Comments
+command.tooltip.3 = Extract Comments
+command.label.4 = Decompose Requirement
+command.tooltip.4 = Decompose Requirement
+command.label.5 = Add Satisfy Link
+command.tooltip.5 = Add Satisfy Link
+command.label.6 = Add Verify Link
+command.tooltip.6 = Add Verify Link
+command.label.7 = Define or Update Stereotype and Profile on Demand
+command.tooltip.7 = Define or Update Stereotype and Profile on Demand
+command.label.8 = Generate Profile from Domain Model
+command.tooltip.8 = Generates an initial profile from a domain model according to user-defined Papyrus Req preferences
+
+command.name = Extract Comments Assistant
+command.name.0 = InitDerivedRequirement Assistant
+command.name.1 = Create Comments
+command.name.2 = Create New Papyrus SysML Requirement
+command.name.3 = Add Derived Link
+command.name.4 = Decompose Requirement
+command.name.5 = Add Satisfy Link
+command.name.6 = Add Verify Link
+command.name.7 = Generate Profile from a Domain Model
+command.name.8 = Define or Update Stereotypes
+
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Req SysML Assistant Handlers (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/plugin.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/plugin.xml
new file mode 100644
index 00000000000..fd523858c5a
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/plugin.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.requirements.sysml.assistant.handlers.PapyrusReqSysMLRequirementHandler"
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.PapyrusReqSysMLRequirementHandler">
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.requirements.sysml.assistant.handlers.ExtractCommentsHandler"
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.ExtractCommentsHandler">
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.requirements.sysml.assistant.handlers.InitDerivedReqHandler"
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.InitDerivedReqHandler">
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.requirements.sysml.assistant.handlers.AddVerifyLinkHandler"
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.AddVerifyLinkHandler">
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.requirements.sysml.assistant.handlers.AddSatisfyLinkHandler"
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.AddSatisfyLinkHandler">
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.requirements.sysml.assistant.handlers.DecomposeReqHandler"
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.DecomposeReqHandler">
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.requirements.sysml.assistant.handlers.AddDerivedLinkReqHandler"
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.AddDerivedLinkReqHandler">
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.requirements.sysml.assistant.handlers.CommentReqHandler"
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.CommentReqHandler">
+ </handler>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/pom.xml
new file mode 100644
index 00000000000..02dd245c65a
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.sysml.assistant.handlers</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/Activator.java
new file mode 100644
index 00000000000..9e33e296975
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/Activator.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+* CEA LIST. - initial API and implementation
+*******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.handlers;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.requirements.sysml.assistant.handlers"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/AddDerivedLinkReqHandler.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/AddDerivedLinkReqHandler.java
new file mode 100644
index 00000000000..a39495d168f
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/AddDerivedLinkReqHandler.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (patrick.tessier@cea.fr) CEA LIST. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.handlers;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.requirements.sysml.assistant.commands.AddDerivedLinkReqCommand;
+import org.eclipse.papyrus.requirements.sysml.assistant.commands.DerivationReqCreateCommand;
+import org.eclipse.papyrus.requirements.common.PapyrusAbstractHandler;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ * Executes the addition of DerivedReqt links
+ *
+ */
+public class AddDerivedLinkReqHandler extends PapyrusAbstractHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ super.execute(event);
+ ArrayList<Element> selectedElements = getSelectionSet();
+ if (selectedElements.size() == 2) {
+ DerivationReqCreateCommand addDerivedLinkReqCommand = new DerivationReqCreateCommand(
+ transactionalEditingDomain, (NamedElement) selectedElements.get(1),
+ (NamedElement) selectedElements.get(0));
+ transactionalEditingDomain.getCommandStack().execute(addDerivedLinkReqCommand);
+ } else {
+
+ Element selectedElement = getSelection();
+ if (selectedElement != null) {
+ AddDerivedLinkReqCommand addDerivedLinkReqCommand = new AddDerivedLinkReqCommand(
+ transactionalEditingDomain, selectedElement);
+ transactionalEditingDomain.getCommandStack().execute(addDerivedLinkReqCommand);
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+ *
+ * @return true if the handler is possible
+ */
+ @Override
+ public boolean isEnabled() {
+ Element selectedElement = getSelection();
+ if (selectedElement != null) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/AddSatisfyLinkHandler.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/AddSatisfyLinkHandler.java
new file mode 100644
index 00000000000..2939f46de75
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/AddSatisfyLinkHandler.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.handlers;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.requirements.sysml.assistant.commands.AddSatisfyLinkCommand;
+import org.eclipse.papyrus.requirements.sysml.assistant.commands.SatisfyCreateCommand;
+import org.eclipse.papyrus.requirements.common.PapyrusAbstractHandler;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ * Executes the addition of Satisfy links
+ *
+ */
+public class AddSatisfyLinkHandler extends PapyrusAbstractHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ super.execute(event);
+ ArrayList<Element> selectedElements = getSelectionSet();
+ if (selectedElements.size() == 2) {
+ SatisfyCreateCommand addSatisfyCreateCommand = new SatisfyCreateCommand(transactionalEditingDomain,
+ (NamedElement) selectedElements.get(1), (NamedElement) selectedElements.get(0));
+ transactionalEditingDomain.getCommandStack().execute(addSatisfyCreateCommand);
+ } else {
+
+ Element selectedElement = getSelection();
+ if (selectedElement != null) {
+ AddSatisfyLinkCommand addAddSatisfyLinkCommand = new AddSatisfyLinkCommand(transactionalEditingDomain,
+ selectedElement);
+ transactionalEditingDomain.getCommandStack().execute(addAddSatisfyLinkCommand);
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+ *
+ * @return true if the handler is possible
+ */
+ @Override
+ public boolean isEnabled() {
+ Element selectedElement = getSelection();
+ if (selectedElement != null) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/AddVerifyLinkHandler.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/AddVerifyLinkHandler.java
new file mode 100644
index 00000000000..ea24f1c19f5
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/AddVerifyLinkHandler.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.handlers;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.requirements.sysml.assistant.commands.AddVerifyLinkCommand;
+import org.eclipse.papyrus.requirements.sysml.assistant.commands.VerifyCreateCommand;
+import org.eclipse.papyrus.requirements.common.PapyrusAbstractHandler;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ * Executes the addition of Verify links
+ *
+ */
+public class AddVerifyLinkHandler extends PapyrusAbstractHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ super.execute(event);
+ ArrayList<Element> selectedElements = getSelectionSet();
+ if (selectedElements.size() == 2) {
+ VerifyCreateCommand addVerifyCreateCommand = new VerifyCreateCommand(transactionalEditingDomain,
+ (NamedElement) selectedElements.get(1), (NamedElement) selectedElements.get(0));
+ transactionalEditingDomain.getCommandStack().execute(addVerifyCreateCommand);
+ } else {
+
+ Element selectedElement = getSelection();
+ if (selectedElement != null) {
+ AddVerifyLinkCommand addAddVerifyLinkCommand = new AddVerifyLinkCommand(transactionalEditingDomain,
+ selectedElement);
+ transactionalEditingDomain.getCommandStack().execute(addAddVerifyLinkCommand);
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+ *
+ * @return true if the handler is possible
+ */
+ @Override
+ public boolean isEnabled() {
+ Element selectedElement = getSelection();
+ if (selectedElement != null) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/CommentReqHandler.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/CommentReqHandler.java
new file mode 100644
index 00000000000..2275821e0f9
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/CommentReqHandler.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (patrick.tessier@cea.fr) CEA LIST. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.handlers;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.requirements.sysml.assistant.commands.CommentReqCommand;
+import org.eclipse.papyrus.requirements.common.PapyrusAbstractHandler;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * Executes the creation of a comment with the annotated element filled
+ *
+ */
+public class CommentReqHandler extends PapyrusAbstractHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ super.execute(event);
+ ArrayList<Element> selectedElement = getSelectionSet();
+ if (selectedElement.size() != 0) {
+ CommentReqCommand commentReqCommand = new CommentReqCommand(transactionalEditingDomain, selectedElement);
+ transactionalEditingDomain.getCommandStack().execute(commentReqCommand);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+ *
+ * @return true if the handler is possible
+ */
+ @Override
+ public boolean isEnabled() {
+ ArrayList<Element> selectedElement = getSelectionSet();
+ if (selectedElement.size() != 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/DecomposeReqHandler.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/DecomposeReqHandler.java
new file mode 100644
index 00000000000..e11850be09d
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/DecomposeReqHandler.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.requirements.sysml.assistant.commands.InitDecomposeReqCommand;
+import org.eclipse.papyrus.requirements.common.PapyrusAbstractHandler;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * Executes the decomposition of a parent requirement to create a new child
+ * requirement with a name based on its ancestors as defined in the Papyrus Req
+ * preferences page.
+ *
+ */
+public class DecomposeReqHandler extends PapyrusAbstractHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ super.execute(event);
+ Element selectedElement = getSelection();
+ if (selectedElement != null) {
+ InitDecomposeReqCommand decomposeReqCommand = new InitDecomposeReqCommand(transactionalEditingDomain,
+ selectedElement);
+ transactionalEditingDomain.getCommandStack().execute(decomposeReqCommand);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+ *
+ * @return true if the handler is possible
+ */
+ @Override
+ public boolean isEnabled() {
+ Element selectedElement = getSelection();
+ if (selectedElement != null) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/ExtractCommentsHandler.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/ExtractCommentsHandler.java
new file mode 100644
index 00000000000..5214584c1fc
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/ExtractCommentsHandler.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (patrick.tessier@cea.fr) CEA LIST. - initial API and implementation
+ *
+ *******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.handlers;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.requirements.sysml.assistant.commands.ExtractCommentCommand;
+import org.eclipse.papyrus.requirements.common.PapyrusAbstractHandler;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * Executes the parsing of a requirement to extract comments
+ */
+
+public class ExtractCommentsHandler extends PapyrusAbstractHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ super.execute(event);
+ ArrayList<Element> selectedElement = getSelectionSet();
+ if (selectedElement.size() != 0) {
+ ExtractCommentCommand extractCommentCommand = new ExtractCommentCommand(transactionalEditingDomain,
+ selectedElement);
+ transactionalEditingDomain.getCommandStack().execute(extractCommentCommand);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+ *
+ * @return true if the handler is possible
+ */
+ @Override
+ public boolean isEnabled() {
+ ArrayList<Element> selectedElement = getSelectionSet();
+ if (selectedElement.size() != 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/InitDerivedReqHandler.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/InitDerivedReqHandler.java
new file mode 100644
index 00000000000..f34febc0cc4
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/InitDerivedReqHandler.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (patrick.tessier@cea.fr) CEA LIST. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.handlers;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.requirements.sysml.assistant.commands.InitDerivedReqCommand;
+import org.eclipse.papyrus.requirements.common.PapyrusAbstractHandler;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * Executes the creation of a derived requirement
+ *
+ */
+public class InitDerivedReqHandler extends PapyrusAbstractHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ super.execute(event);
+ ArrayList<Element> selectedElement = getSelectionSet();
+ if (selectedElement.size() != 0) {
+ InitDerivedReqCommand initDerivedReqCommand = new InitDerivedReqCommand(transactionalEditingDomain,
+ selectedElement);
+ transactionalEditingDomain.getCommandStack().execute(initDerivedReqCommand);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+ *
+ * @return true if the handler is possible
+ */
+ @Override
+ public boolean isEnabled() {
+ ArrayList<Element> selectedElement = getSelectionSet();
+ if (selectedElement.size() != 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/PapyrusReqSysMLRequirementHandler.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/PapyrusReqSysMLRequirementHandler.java
new file mode 100644
index 00000000000..b28ef3cd13b
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.handlers/src/org/eclipse/papyrus/requirements/sysml/assistant/handlers/PapyrusReqSysMLRequirementHandler.java
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mauricio Alférez(mauricio.alferez@cea.fr) CEA LIST. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.requirements.sysml.assistant.commands.PapyrusReqSysMLRequirementCreateCommand;
+import org.eclipse.papyrus.requirements.common.PapyrusAbstractHandler;
+import org.eclipse.uml2.uml.Element;
+/**
+ * Executes the creation of a new SysML requirement based on the Papyrus Req
+ * preferences page.
+ *
+ */
+public class PapyrusReqSysMLRequirementHandler extends PapyrusAbstractHandler {
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ super.execute(event);
+ Element selectedElement = getSelection();
+ if (selectedElement != null) {
+ PapyrusReqSysMLRequirementCreateCommand papyrusReqSysMLRequirementCreateCommand = new PapyrusReqSysMLRequirementCreateCommand(
+ transactionalEditingDomain, selectedElement);
+ transactionalEditingDomain.getCommandStack().execute(papyrusReqSysMLRequirementCreateCommand);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+ *
+ * @return true if the handler is possible
+ */
+ @Override
+ public boolean isEnabled() {
+ Element selectedElement = getSelection();
+ if (selectedElement != null) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/.project
new file mode 100644
index 00000000000..f51e34733cc
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.sysml.assistant.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..3e946ee81e4
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.sysml.assistant.ui;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.sysml.assistant.ui.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
+ org.eclipse.papyrus.requirements.common.ui;bundle-version="0.7.0"
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: org.eclipse.papyrus.requirements.sysml.assistant.ui
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/build.properties
new file mode 100644
index 00000000000..ad723f0783b
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ images/,\
+ about.html,\
+ plugin.properties
+src.includes = about.html,\
+ images/
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Comment.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Comment.gif
new file mode 100644
index 00000000000..c495731c682
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Comment.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/ContainmentConnection.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/ContainmentConnection.gif
new file mode 100644
index 00000000000..8b2a7a39d82
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/ContainmentConnection.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Copy.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Copy.gif
new file mode 100644
index 00000000000..47caa0b1671
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Copy.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/DeriveReqt.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/DeriveReqt.gif
new file mode 100644
index 00000000000..62177483fec
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/DeriveReqt.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Link.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Link.gif
new file mode 100644
index 00000000000..13fb22e4bfe
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Link.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Profile.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Profile.gif
new file mode 100644
index 00000000000..18eed1f5cb9
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Profile.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Refine.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Refine.gif
new file mode 100644
index 00000000000..c8d1d8c2f8f
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Refine.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Requirement.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Requirement.gif
new file mode 100644
index 00000000000..50618e0067a
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Requirement.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Satisfy.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Satisfy.gif
new file mode 100644
index 00000000000..00848d83b70
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Satisfy.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/TestCase.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/TestCase.gif
new file mode 100644
index 00000000000..ac296118622
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/TestCase.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Trace.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Trace.gif
new file mode 100644
index 00000000000..f4cb0d328fe
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Trace.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Verify.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Verify.gif
new file mode 100644
index 00000000000..2d54efc4f84
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/images/Verify.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/plugin.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/plugin.properties
new file mode 100644
index 00000000000..669b5c11e89
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/plugin.properties
@@ -0,0 +1,30 @@
+#Properties file for org.eclipse.papyrus.requirements.sysml.assistant.ui
+papyrus.requirements.sysml.assistant.menu.label = Papyrus Req - Editing Tools
+papyrus.requirements.sysml.assistant.menu.tooltip = Assistants to edit SysML requirements models
+
+createNewRequirement.command.label = Create new requirement
+createNewRequirement.command.tooltip = Create new requirement in the selected package
+
+decomposeRequirement.command.label = Decompose requirement
+decomposeRequirement.command.tooltip = Create new requirement that decomposes the selected requirement
+
+deriveNewRequirement.command.label = Derive new requirement
+deriveNewRequirement.command.tooltip = Create new derived requirement from the set of selected requirements
+
+addDerivedLink.command.label = Add derived links
+addDerivedLink.command.tooltip = Add derivedReqt links
+
+addSatisfyLink.command.label = Add satisfy links
+addSatisfyLink.command.tooltip = Add satisfy links
+
+addVerifyLink.command.label = Add verify links
+addVerifyLink.command.tooltip = Add verify links
+
+createComments.command.label = Create comments
+createComments.command.tooltip = Create Comments
+
+extractComments.command.label = Extract annotations as comments
+extractComments.command.tooltip = Extract stakeholders names written as annotations between "[" and "]" to a new comment.
+
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Req SysML Editing Assistant (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/plugin.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/plugin.xml
new file mode 100644
index 00000000000..eb0f8274d54
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/plugin.xml
@@ -0,0 +1,235 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu?after=org.eclipse.papyrus.requirements.common.ui.sysml.assistant.additions">
+ <menu
+ icon="platform:/plugin/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_16x16.png"
+ id="papyrus.requirements.sysml.assistant.menu"
+ label="%papyrus.requirements.sysml.assistant.menu.label"
+ tooltip="%papyrus.requirements.sysml.assistant.menu.tooltip">
+ <visibleWhen>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </visibleWhen>
+ </menu>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup?after=org.eclipse.papyrus.requirements.common.ui.sysml.assistant.additions">
+ <menu
+ icon="platform:/plugin/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_16x16.png"
+ id="papyrus.requirements.sysml.assistant.menu"
+ label="%papyrus.requirements.sysml.assistant.menu.label"
+ tooltip="%papyrus.requirements.sysml.assistant.menu.tooltip">
+ </menu>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:papyrus.requirements.sysml.assistant.menu">
+ <command
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.PapyrusReqSysMLRequirementHandler"
+ icon="images/Requirement.gif"
+ label="%createNewRequirement.command.label"
+ style="push"
+ tooltip="%createNewRequirement.command.tooltip">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.requirements.sysml.testers.appliesSysMLRequirementsProfile"
+ value="true">
+ </test>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.DecomposeReqHandler"
+ icon="images/ContainmentConnection.gif"
+ label="%decomposeRequirement.command.label"
+ style="push"
+ tooltip="%decomposeRequirement.command.tooltip">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.requirements.sysml.testers.isRequirementElement"
+ value="true">
+ </test>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.InitDerivedReqHandler"
+ icon="images/DeriveReqt.gif"
+ label="%deriveNewRequirement.command.label"
+ style="push"
+ tooltip="%deriveNewRequirement.command.tooltip">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.requirements.sysml.testers.isRequirementElement"
+ value="true">
+ </test>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.AddDerivedLinkReqHandler"
+ icon="images/DeriveReqt.gif"
+ label="%addDerivedLink.command.label"
+ style="push"
+ tooltip="%addDerivedLink.command.tooltip">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.requirements.sysml.testers.isRequirementElement"
+ value="true">
+ </test>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.AddSatisfyLinkHandler"
+ icon="images/Satisfy.gif"
+ label="%addSatisfyLink.command.label"
+ style="push"
+ tooltip="%addSatisfyLink.command.tooltip">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.requirements.sysml.testers.isRequirementElement"
+ value="true">
+ </test>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.AddVerifyLinkHandler"
+ icon="images/Verify.gif"
+ label="%addVerifyLink.command.label"
+ style="push"
+ tooltip="%addVerifyLink.command.tooltip">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.requirements.sysml.testers.isRequirementElement"
+ value="true">
+ </test>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.CommentReqHandler"
+ icon="images/Comment.gif"
+ label="%createComments.command.label"
+ style="push"
+ tooltip="%createComments.command.tooltip">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.requirements.sysml.testers.isRequirementElement"
+ value="true">
+ </test>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.ExtractCommentsHandler"
+ icon="images/Link.gif"
+ label="%extractComments.command.label"
+ style="push"
+ tooltip="%extractComments.command.tooltip">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.requirements.sysml.testers.isRequirementElement"
+ value="true">
+ </test>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.PapyrusReqSysMLRequirementHandler"
+ contextId="org.eclipse.ui.contexts.window"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+1">
+ </key>
+ <key
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.DecomposeReqHandler"
+ contextId="org.eclipse.ui.contexts.window"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+2">
+ </key>
+ <key
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.InitDerivedReqHandler"
+ contextId="org.eclipse.ui.contexts.window"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+9">
+ </key>
+ <key
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.AddDerivedLinkReqHandler"
+ contextId="org.eclipse.ui.contexts.window"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+4">
+ </key>
+ <key
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.AddSatisfyLinkHandler"
+ contextId="org.eclipse.ui.contexts.window"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+5">
+ </key>
+ <key
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.AddVerifyLinkHandler"
+ contextId="org.eclipse.ui.contexts.window"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+6">
+ </key>
+ <key
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.CommentReqHandler"
+ contextId="org.eclipse.ui.contexts.window"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+7">
+ </key>
+ <key
+ commandId="org.eclipse.papyrus.requirements.sysml.assistant.handlers.ExtractCommentsHandler"
+ contextId="org.eclipse.ui.contexts.window"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+8">
+ </key>
+ </extension>
+</plugin>
+
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/pom.xml
new file mode 100644
index 00000000000..387e88e313c
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.sysml.assistant.ui</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/src/org/eclipse/papyrus/requirements/sysml/assistant/ui/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/src/org/eclipse/papyrus/requirements/sysml/assistant/ui/Activator.java
new file mode 100644
index 00000000000..c705d1ae702
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.assistant.ui/src/org/eclipse/papyrus/requirements/sysml/assistant/ui/Activator.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+* CEA LIST. - initial API and implementation
+*******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.assistant.ui;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.requirements.sysml.assistant.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/.gitignore b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/.gitignore
new file mode 100644
index 00000000000..ae3c1726048
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/.project
new file mode 100644
index 00000000000..a0a35661ad6
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.sysml.common</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..e70259943d2
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.sysml.common
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.sysml.common.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.8.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.requirements.sysml.common;uses:="org.osgi.framework"
+Bundle-Localization: bundle
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/build.properties
new file mode 100644
index 00000000000..334ad934a2b
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ bundle.properties
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/bundle.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/bundle.properties
new file mode 100644
index 00000000000..774b3fe2752
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.requirements.sysml.common
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = SysML Common (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/pom.xml
new file mode 100644
index 00000000000..627c46c5000
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.sysml.common</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/src/org/eclipse/papyrus/requirements/sysml/common/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/src/org/eclipse/papyrus/requirements/sysml/common/Activator.java
new file mode 100644
index 00000000000..d142aad30aa
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/src/org/eclipse/papyrus/requirements/sysml/common/Activator.java
@@ -0,0 +1,30 @@
+package org.eclipse.papyrus.requirements.sysml.common;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/src/org/eclipse/papyrus/requirements/sysml/common/I_SysMLStereotype.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/src/org/eclipse/papyrus/requirements/sysml/common/I_SysMLStereotype.java
new file mode 100644
index 00000000000..f861b793514
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.common/src/org/eclipse/papyrus/requirements/sysml/common/I_SysMLStereotype.java
@@ -0,0 +1,248 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+* CEA LIST. - initial API and implementation
+*******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.common;
+
+/**
+ * list of constants for SysML
+ *
+ */
+public interface I_SysMLStereotype {
+ /** Qualified name of the stereotype Conform */
+ public static final String CONFORM_STEREOTYPE = "SysML::ModelElements::Conform";
+ /** name of property base_Dependency of the stereotype Conform */
+ public static final String CONFORM_BASE_DEPENDENCY_ATT = "base_Dependency";
+ /** Qualified name of the stereotype View */
+ public static final String VIEW_STEREOTYPE = "SysML::ModelElements::View";
+ /** name of property viewPoint of the stereotype View */
+ public static final String VIEW_VIEWPOINT_ATT = "viewPoint";
+ /** name of property base_Package of the stereotype View */
+ public static final String VIEW_BASE_PACKAGE_ATT = "base_Package";
+ /** Qualified name of the stereotype ViewPoint */
+ public static final String VIEWPOINT_STEREOTYPE = "SysML::ModelElements::ViewPoint";
+ /** name of property base_Class of the stereotype ViewPoint */
+ public static final String VIEWPOINT_BASE_CLASS_ATT = "base_Class";
+ /** name of property stakeHolders of the stereotype ViewPoint */
+ public static final String VIEWPOINT_STAKEHOLDERS_ATT = "stakeHolders";
+ /** name of property purpose of the stereotype ViewPoint */
+ public static final String VIEWPOINT_PURPOSE_ATT = "purpose";
+ /** name of property concerns of the stereotype ViewPoint */
+ public static final String VIEWPOINT_CONCERNS_ATT = "concerns";
+ /** name of property languages of the stereotype ViewPoint */
+ public static final String VIEWPOINT_LANGUAGES_ATT = "languages";
+ /** name of property methods of the stereotype ViewPoint */
+ public static final String VIEWPOINT_METHODS_ATT = "methods";
+ /** Qualified name of the stereotype Rationale */
+ public static final String RATIONALE_STEREOTYPE = "SysML::ModelElements::Rationale";
+ /** name of property base_Comment of the stereotype Rationale */
+ public static final String RATIONALE_BASE_COMMENT_ATT = "base_Comment";
+ /** Qualified name of the stereotype Problem */
+ public static final String PROBLEM_STEREOTYPE = "SysML::ModelElements::Problem";
+ /** name of property base_Comment of the stereotype Problem */
+ public static final String PROBLEM_BASE_COMMENT_ATT = "base_Comment";
+ /** Qualified name of the stereotype Block */
+ public static final String BLOCK_STEREOTYPE = "SysML::Blocks::Block";
+ /** name of property isEncapsulated of the stereotype Block */
+ public static final String BLOCK_ISENCAPSULATED_ATT = "isEncapsulated";
+ /** name of property base_Class of the stereotype Block */
+ public static final String BLOCK_BASE_CLASS_ATT = "base_Class";
+ /** Qualified name of the stereotype DistributedProperty */
+ public static final String DISTRIBUTEDPROPERTY_STEREOTYPE = "SysML::Blocks::DistributedProperty";
+ /** name of property base_Property of the stereotype DistributedProperty */
+ public static final String DISTRIBUTEDPROPERTY_BASE_PROPERTY_ATT = "base_Property";
+ /** Qualified name of the stereotype Dimension */
+ public static final String DIMENSION_STEREOTYPE = "SysML::Blocks::Dimension";
+ /** name of property base_InstanceSpecification of the stereotype Dimension */
+ public static final String DIMENSION_BASE_INSTANCESPECIFICATION_ATT = "base_InstanceSpecification";
+ /** Qualified name of the stereotype Unit */
+ public static final String UNIT_STEREOTYPE = "SysML::Blocks::Unit";
+ /** name of property base_InstanceSpecification of the stereotype Unit */
+ public static final String UNIT_BASE_INSTANCESPECIFICATION_ATT = "base_InstanceSpecification";
+ /** name of property dimension of the stereotype Unit */
+ public static final String UNIT_DIMENSION_ATT = "dimension";
+ /** Qualified name of the stereotype ValueType */
+ public static final String VALUETYPE_STEREOTYPE = "SysML::Blocks::ValueType";
+ /** name of property base_DataType of the stereotype ValueType */
+ public static final String VALUETYPE_BASE_DATATYPE_ATT = "base_DataType";
+ /** name of property unit of the stereotype ValueType */
+ public static final String VALUETYPE_UNIT_ATT = "unit";
+ /** name of property dimension of the stereotype ValueType */
+ public static final String VALUETYPE_DIMENSION_ATT = "dimension";
+ /** Qualified name of the stereotype NestedConnectorEnd */
+ public static final String NESTEDCONNECTOREND_STEREOTYPE = "SysML::Blocks::NestedConnectorEnd";
+ /** name of property propertyPath of the stereotype NestedConnectorEnd */
+ public static final String NESTEDCONNECTOREND_PROPERTYPATH_ATT = "propertyPath";
+ /** name of property base_ConnectorEnd of the stereotype NestedConnectorEnd */
+ public static final String NESTEDCONNECTOREND_BASE_CONNECTOREND_ATT = "base_ConnectorEnd";
+ /** Qualified name of the stereotype ParticipantProperty */
+ public static final String PARTICIPANTPROPERTY_STEREOTYPE = "SysML::Blocks::ParticipantProperty";
+ /** name of property base_Property of the stereotype ParticipantProperty */
+ public static final String PARTICIPANTPROPERTY_BASE_PROPERTY_ATT = "base_Property";
+ /** name of property end of the stereotype ParticipantProperty */
+ public static final String PARTICIPANTPROPERTY_END_ATT = "end";
+ /** Qualified name of the stereotype ConnectorProperty */
+ public static final String CONNECTORPROPERTY_STEREOTYPE = "SysML::Blocks::ConnectorProperty";
+ /** name of property base_Property of the stereotype ConnectorProperty */
+ public static final String CONNECTORPROPERTY_BASE_PROPERTY_ATT = "base_Property";
+ /** name of property connector of the stereotype ConnectorProperty */
+ public static final String CONNECTORPROPERTY_CONNECTOR_ATT = "connector";
+ /** Qualified name of the stereotype BindingConnector */
+ public static final String BINDINGCONNECTOR_STEREOTYPE = "SysML::Blocks::BindingConnector";
+ /** name of property base_Connector of the stereotype BindingConnector */
+ public static final String BINDINGCONNECTOR_BASE_CONNECTOR_ATT = "base_Connector";
+ /** Qualified name of the stereotype PropertySpecificType */
+ public static final String PROPERTYSPECIFICTYPE_STEREOTYPE = "SysML::Blocks::PropertySpecificType";
+ /** name of property base_Classifier of the stereotype PropertySpecificType */
+ public static final String PROPERTYSPECIFICTYPE_BASE_CLASSIFIER_ATT = "base_Classifier";
+ /** Qualified name of the stereotype FlowPort */
+ public static final String FLOWPORT_STEREOTYPE = "SysML::PortAndFlows::FlowPort";
+ /** name of property base_Port of the stereotype FlowPort */
+ public static final String FLOWPORT_BASE_PORT_ATT = "base_Port";
+ /** name of property isAtomic of the stereotype FlowPort */
+ public static final String FLOWPORT_ISATOMIC_ATT = "isAtomic";
+ /** name of property isConjugated of the stereotype FlowPort */
+ public static final String FLOWPORT_ISCONJUGATED_ATT = "isConjugated";
+ /** name of property direction of the stereotype FlowPort */
+ public static final String FLOWPORT_DIRECTION_ATT = "direction";
+ /** Qualified name of the stereotype FlowProperty */
+ public static final String FLOWPROPERTY_STEREOTYPE = "SysML::PortAndFlows::FlowProperty";
+ /** name of property base_Property of the stereotype FlowProperty */
+ public static final String FLOWPROPERTY_BASE_PROPERTY_ATT = "base_Property";
+ /** name of property direction of the stereotype FlowProperty */
+ public static final String FLOWPROPERTY_DIRECTION_ATT = "direction";
+ /** Qualified name of the stereotype FlowSpecification */
+ public static final String FLOWSPECIFICATION_STEREOTYPE = "SysML::PortAndFlows::FlowSpecification";
+ /** name of property base_Interface of the stereotype FlowSpecification */
+ public static final String FLOWSPECIFICATION_BASE_INTERFACE_ATT = "base_Interface";
+ /** name of literal in of the Enumeration FlowDirection */
+ public static final String FLOWDIRECTION_IN_ENUM = "in";
+ /** name of literal out of the Enumeration FlowDirection */
+ public static final String FLOWDIRECTION_OUT_ENUM = "out";
+ /** name of literal inout of the Enumeration FlowDirection */
+ public static final String FLOWDIRECTION_INOUT_ENUM = "inout";
+ /** Qualified name of the stereotype ItemFlow */
+ public static final String ITEMFLOW_STEREOTYPE = "SysML::PortAndFlows::ItemFlow";
+ /** name of property base_InformationFlow of the stereotype ItemFlow */
+ public static final String ITEMFLOW_BASE_INFORMATIONFLOW_ATT = "base_InformationFlow";
+ /** name of property itemProperty of the stereotype ItemFlow */
+ public static final String ITEMFLOW_ITEMPROPERTY_ATT = "itemProperty";
+ /** Qualified name of the stereotype ConstraintBlock */
+ public static final String CONSTRAINTBLOCK_STEREOTYPE = "SysML::Constraints::ConstraintBlock";
+ /** Qualified name of the stereotype ConstraintProperty */
+ public static final String CONSTRAINTPROPERTY_STEREOTYPE = "SysML::Constraints::ConstraintProperty";
+ /** name of property base_Property of the stereotype ConstraintProperty */
+ public static final String CONSTRAINTPROPERTY_BASE_PROPERTY_ATT = "base_Property";
+ /** Qualified name of the stereotype Optional */
+ public static final String OPTIONAL_STEREOTYPE = "SysML::Activities::Optional";
+ /** name of property base_Parameter of the stereotype Optional */
+ public static final String OPTIONAL_BASE_PARAMETER_ATT = "base_Parameter";
+ /** Qualified name of the stereotype Rate */
+ public static final String RATE_STEREOTYPE = "SysML::Activities::Rate";
+ /** name of property base_Parameter of the stereotype Rate */
+ public static final String RATE_BASE_PARAMETER_ATT = "base_Parameter";
+ /** name of property base_ActivityEdge of the stereotype Rate */
+ public static final String RATE_BASE_ACTIVITYEDGE_ATT = "base_ActivityEdge";
+ /** name of property rate of the stereotype Rate */
+ public static final String RATE_RATE_ATT = "rate";
+ /** Qualified name of the stereotype Probability */
+ public static final String PROBABILITY_STEREOTYPE = "SysML::Activities::Probability";
+ /** name of property base_ActivityEdge of the stereotype Probability */
+ public static final String PROBABILITY_BASE_ACTIVITYEDGE_ATT = "base_ActivityEdge";
+ /** name of property base_ParameterSet of the stereotype Probability */
+ public static final String PROBABILITY_BASE_PARAMETERSET_ATT = "base_ParameterSet";
+ /** name of property probability of the stereotype Probability */
+ public static final String PROBABILITY_PROBABILITY_ATT = "probability";
+ /** Qualified name of the stereotype Continuous */
+ public static final String CONTINUOUS_STEREOTYPE = "SysML::Activities::Continuous";
+ /** Qualified name of the stereotype Discrete */
+ public static final String DISCRETE_STEREOTYPE = "SysML::Activities::Discrete";
+ /** Qualified name of the stereotype ControlOperator */
+ public static final String CONTROLOPERATOR_STEREOTYPE = "SysML::Activities::ControlOperator";
+ /** name of property base_Operation of the stereotype ControlOperator */
+ public static final String CONTROLOPERATOR_BASE_OPERATION_ATT = "base_Operation";
+ /** name of property base_Behavior of the stereotype ControlOperator */
+ public static final String CONTROLOPERATOR_BASE_BEHAVIOR_ATT = "base_Behavior";
+ /** Qualified name of the stereotype NoBuffer */
+ public static final String NOBUFFER_STEREOTYPE = "SysML::Activities::NoBuffer";
+ /** name of property base_ObjectNode of the stereotype NoBuffer */
+ public static final String NOBUFFER_BASE_OBJECTNODE_ATT = "base_ObjectNode";
+ /** Qualified name of the stereotype Overwrite */
+ public static final String OVERWRITE_STEREOTYPE = "SysML::Activities::Overwrite";
+ /** name of property base_ObjectNode of the stereotype Overwrite */
+ public static final String OVERWRITE_BASE_OBJECTNODE_ATT = "base_ObjectNode";
+ /** Qualified name of the stereotype Allocate */
+ public static final String ALLOCATE_STEREOTYPE = "SysML::Allocations::Allocate";
+ /** name of property base_Abstraction of the stereotype Allocate */
+ public static final String ALLOCATE_BASE_ABSTRACTION_ATT = "base_Abstraction";
+ /** Qualified name of the stereotype Allocated */
+ public static final String ALLOCATED_STEREOTYPE = "SysML::Allocations::Allocated";
+ /** name of property base_NamedElement of the stereotype Allocated */
+ public static final String ALLOCATED_BASE_NAMEDELEMENT_ATT = "base_NamedElement";
+ /** name of property allocatedFrom of the stereotype Allocated */
+ public static final String ALLOCATED_ALLOCATEDFROM_ATT = "allocatedFrom";
+ /** name of property allocatedTo of the stereotype Allocated */
+ public static final String ALLOCATED_ALLOCATEDTO_ATT = "allocatedTo";
+ /** Qualified name of the stereotype AllocateActivityPartition */
+ public static final String ALLOCATEACTIVITYPARTITION_STEREOTYPE = "SysML::Allocations::AllocateActivityPartition";
+ /** name of property base_ActivityPartition of the stereotype AllocateActivityPartition */
+ public static final String ALLOCATEACTIVITYPARTITION_BASE_ACTIVITYPARTITION_ATT = "base_ActivityPartition";
+ /** Qualified name of the stereotype DeriveReqt */
+ public static final String DERIVEREQT_STEREOTYPE = "SysML::Requirements::DeriveReqt";
+ /** Qualified name of the stereotype Verify */
+ public static final String VERIFY_STEREOTYPE = "SysML::Requirements::Verify";
+ /** Qualified name of the stereotype Copy */
+ public static final String COPY_STEREOTYPE = "SysML::Requirements::Copy";
+ /** Qualified name of the stereotype Satisfy */
+ public static final String SATISFY_STEREOTYPE = "SysML::Requirements::Satisfy";
+ /** Qualified name of the stereotype TestCase */
+ public static final String TESTCASE_STEREOTYPE = "SysML::Requirements::TestCase";
+ /** name of property base_Behavior of the stereotype TestCase */
+ public static final String TESTCASE_BASE_BEHAVIOR_ATT = "base_Behavior";
+ /** name of property base_Operation of the stereotype TestCase */
+ public static final String TESTCASE_BASE_OPERATION_ATT = "base_Operation";
+ /** name of property verifies of the stereotype TestCase */
+ public static final String TESTCASE_VERIFIES_ATT = "verifies";
+ /** Qualified name of the stereotype Requirement */
+ public static final String REQUIREMENT_STEREOTYPE = "SysML::Requirements::Requirement";
+ /** name of property text of the stereotype Requirement */
+ public static final String REQUIREMENT_TEXT_ATT = "text";
+ /** name of property id of the stereotype Requirement */
+ public static final String REQUIREMENT_ID_ATT = "id";
+ /** name of property derived of the stereotype Requirement */
+ public static final String REQUIREMENT_DERIVED_ATT = "derived";
+ /** name of property derivedFrom of the stereotype Requirement */
+ public static final String REQUIREMENT_DERIVEDFROM_ATT = "derivedFrom";
+ /** name of property satisfiedBy of the stereotype Requirement */
+ public static final String REQUIREMENT_SATISFIEDBY_ATT = "satisfiedBy";
+ /** name of property refinedBy of the stereotype Requirement */
+ public static final String REQUIREMENT_REFINEDBY_ATT = "refinedBy";
+ /** name of property tracedTo of the stereotype Requirement */
+ public static final String REQUIREMENT_TRACEDTO_ATT = "tracedTo";
+ /** name of property verifiedBy of the stereotype Requirement */
+ public static final String REQUIREMENT_VERIFIEDBY_ATT = "verifiedBy";
+ /** name of property master of the stereotype Requirement */
+ public static final String REQUIREMENT_MASTER_ATT = "master";
+ /** name of property base_Class of the stereotype Requirement */
+ public static final String REQUIREMENT_BASE_CLASS_ATT = "base_Class";
+ /** Qualified name of the stereotype RequirementRelated */
+ public static final String REQUIREMENTRELATED_STEREOTYPE = "SysML::Requirements::RequirementRelated";
+ /** name of property base_NamedElement of the stereotype RequirementRelated */
+ public static final String REQUIREMENTRELATED_BASE_NAMEDELEMENT_ATT = "base_NamedElement";
+ /** name of property tracedFrom of the stereotype RequirementRelated */
+ public static final String REQUIREMENTRELATED_TRACEDFROM_ATT = "tracedFrom";
+ /** name of property satisfies of the stereotype RequirementRelated */
+ public static final String REQUIREMENTRELATED_SATISFIES_ATT = "satisfies";
+ /** name of property refines of the stereotype RequirementRelated */
+ public static final String REQUIREMENTRELATED_REFINES_ATT = "refines";
+ /** name of property verifies of the stereotype RequirementRelated */
+ public static final String REQUIREMENTRELATED_VERIFIES_ATT = "verifies";
+ }
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/.project
new file mode 100644
index 00000000000..5996e77c468
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.sysml.testers</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/.settings/org.eclipse.core.resources.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 00000000000..cf6feb8cb1e
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding//src/org/eclipse/papyrus/requirements/sysml/testers/PackageTester.java=UTF-8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..9ffea7e49d8
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.sysml.testers;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.sysml.testers.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.core.expressions;bundle-version="3.5.0",
+ org.eclipse.uml2.uml;bundle-version="5.1.100",
+ org.eclipse.papyrus.requirements.sysml.common;bundle-version="0.7.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.8.0"
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.requirements.sysml.testers;uses:="org.osgi.framework,org.eclipse.core.expressions,org.eclipse.ui.plugin"
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: org.eclipse.papyrus.sysml.requirements
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/build.properties
new file mode 100644
index 00000000000..baa36b183ee
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/plugin.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/plugin.properties
new file mode 100644
index 00000000000..099719e20af
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/plugin.properties
@@ -0,0 +1,40 @@
+#Properties file for org.eclipse.papyrus.requirements.sysml.assistant.ui
+menu.label = Papyrus Req
+menu.tooltip = Assistants to manage SysML requirements
+menu.label.0 = Tools to Define Requirements Profile
+menu.tooltip.0 = Tools to Define Requirements Language
+
+command.label = Create New Requirement
+command.tooltip = Create New Requirement
+command.label.0 = Add Derived Link
+command.tooltip.0 = Add Derived Link
+command.label.1 = Derive New Requirement
+command.tooltip.1 = Derive New Requirement
+command.label.2 = Create Comments for Elements
+command.tooltip.2 = Create Comments for Elements
+command.label.3 = Extract Comments
+command.tooltip.3 = Extract Comments
+command.label.4 = Decompose Requirement
+command.tooltip.4 = Decompose Requirement
+command.label.5 = Add Satisfy Link
+command.tooltip.5 = Add Satisfy Link
+command.label.6 = Add Verify Link
+command.tooltip.6 = Add Verify Link
+command.label.7 = Define or Update Stereotype and Profile on Demand
+command.tooltip.7 = Define or Update Stereotype and Profile on Demand
+command.label.8 = Generate Profile from Domain Model
+command.tooltip.8 = Generates an initial profile from a domain model according to user-defined Papyrus Req preferences
+
+command.name = Extract Comments Assistant
+command.name.0 = InitDerivedRequirement Assistant
+command.name.1 = Create Comments
+command.name.2 = Create New Papyrus SysML Requirement
+command.name.3 = Add Derived Link
+command.name.4 = Decompose Requirement
+command.name.5 = Add Satisfy Link
+command.name.6 = Add Verify Link
+command.name.7 = Generate Profile from a Domain Model
+command.name.8 = Define or Update Stereotypes
+
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Req SysML Assistant (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/plugin.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/plugin.xml
new file mode 100644
index 00000000000..1eb5df9fb76
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/plugin.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.papyrus.requirements.sysml.testers.RequirementTester"
+ id="org.eclipse.papyrus.requirements.sysml.testers.RequirementTester"
+ namespace="org.eclipse.papyrus.requirements.sysml.testers"
+ properties="isRequirementElement"
+ type="org.eclipse.jface.viewers.IStructuredSelection">
+ </propertyTester>
+ <propertyTester
+ class="org.eclipse.papyrus.requirements.sysml.testers.PackageTester"
+ id="org.eclipse.papyrus.requirements.sysml.testers.PackageTester"
+ namespace="org.eclipse.papyrus.requirements.sysml.testers"
+ properties="isUMLPackage"
+ type="org.eclipse.jface.viewers.IStructuredSelection">
+ </propertyTester>
+ <propertyTester
+ class="org.eclipse.papyrus.requirements.sysml.testers.ProfileTester"
+ id="org.eclipse.papyrus.requirements.sysml.testers.ProfileTester"
+ namespace="org.eclipse.papyrus.requirements.sysml.testers"
+ properties="isUMLProfile"
+ type="org.eclipse.jface.viewers.IStructuredSelection">
+ </propertyTester>
+ <propertyTester
+ class="org.eclipse.papyrus.requirements.sysml.testers.SysMLRequirementsProfileTester"
+ id="org.eclipse.papyrus.requirements.sysml.testers.SysMLRequirementsProfileTester"
+ namespace="org.eclipse.papyrus.requirements.sysml.testers"
+ properties="appliesSysMLRequirementsProfile"
+ type="org.eclipse.jface.viewers.IStructuredSelection">
+ </propertyTester>
+ <propertyTester
+ class="org.eclipse.papyrus.requirements.sysml.testers.ModelTester"
+ id="org.eclipse.papyrus.requirements.sysml.testers.Model"
+ namespace="org.eclipse.papyrus.requirements.sysml.testers"
+ properties="isModel"
+ type="org.eclipse.jface.viewers.IStructuredSelection">
+ </propertyTester>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/pom.xml
new file mode 100644
index 00000000000..4684985876b
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.sysml.testers</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/Activator.java
new file mode 100644
index 00000000000..f46f304fa35
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/Activator.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+* CEA LIST. - initial API and implementation
+*******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.testers;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.requirements.sysml.testers"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/ModelTester.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/ModelTester.java
new file mode 100644
index 00000000000..2da1ad731f8
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/ModelTester.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.testers;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.uml2.uml.Model;
+
+/**
+ * This class helps to test if the selected element is a UML Model or not
+ */
+public class ModelTester extends PropertyTester {
+
+ public static final String isModel = "isModel";//NLS
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ if (isModel.equals(property)) {
+ boolean testResult = isExpected((IStructuredSelection) receiver);
+
+ return expectedValue.equals(testResult);
+ }
+ return false;
+ }
+ private boolean isExpected(IStructuredSelection receiver) {
+ for (Object current : receiver.toArray()) {
+ // Adapt current selection to EObject
+ if (current instanceof IAdaptable) {
+ EObject eObj = (EObject) ((IAdaptable) current)
+ .getAdapter(EObject.class);
+ if (eObj instanceof Model)
+ return true;
+ }
+ return false;
+ }
+ return false;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/PackageTester.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/PackageTester.java
new file mode 100644
index 00000000000..ae6db6eca0a
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/PackageTester.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mauricio Alf�rez (mauricio.alferez@cea.fr) CEA LIST. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.testers;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * This class helps to test if the selected element is a UML Package or not
+ */
+public class PackageTester extends PropertyTester {
+
+ public static final String isUMLPackage = "isUMLPackage";//NLS
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ if (isUMLPackage.equals(property)) {
+ boolean testResult = isExpected((IStructuredSelection) receiver);
+
+ return expectedValue.equals(testResult);
+ }
+ return false;
+ }
+ private boolean isExpected(IStructuredSelection receiver) {
+ for (Object current : receiver.toArray()) {
+ // Adapt current selection to EObject
+ if (current instanceof IAdaptable) {
+ EObject eObj = (EObject) ((IAdaptable) current)
+ .getAdapter(EObject.class);
+ if (eObj instanceof UMLPackage)
+ return true;
+ }
+ return false;
+ }
+ return false;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/ProfileTester.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/ProfileTester.java
new file mode 100644
index 00000000000..2c9cfa4241c
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/ProfileTester.java
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mauricio Alférez (mauricio.alferez@cea.fr) CEA LIST. - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.papyrus.requirements.sysml.testers;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.uml2.uml.Profile;
+
+/**
+ * This class helps to test if the selected element is a UML Profile or not
+ */
+public class ProfileTester extends PropertyTester {
+
+ public static final String appliesSysMLRequirementsProfile = "appliesSysMLRequirementsProfile";//NLS
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ if (appliesSysMLRequirementsProfile.equals(property)) {
+ boolean testResult = isExpected((IStructuredSelection) receiver);
+
+ return expectedValue.equals(testResult);
+ }
+ return false;
+ }
+ private boolean isExpected(IStructuredSelection receiver) {
+ for (Object current : receiver.toArray()) {
+ // Adapt current selection to EObject
+ if (current instanceof IAdaptable) {
+ EObject eObj = (EObject) ((IAdaptable) current)
+ .getAdapter(EObject.class);
+ if (eObj instanceof Profile)
+ return true;
+ }
+ return false;
+ }
+ return false;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/RequirementTester.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/RequirementTester.java
new file mode 100644
index 00000000000..62987f4628f
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/RequirementTester.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+* CEA LIST. - initial API and implementation
+* Trung-Truc Nguyen - Bug 473610
+*
+*******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.testers;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.requirements.sysml.common.I_SysMLStereotype;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Stereotype;
+
+/**
+ * This class helps to test if the selected element is a SysML Requirement or not
+ */
+public class RequirementTester extends PropertyTester {
+
+ public static final String isRequirementElement = "isRequirementElement";//NSL
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ if (isRequirementElement.equals(property)) {
+ boolean testResult = isExpected((IStructuredSelection) receiver);
+
+ return expectedValue.equals(testResult);
+ }
+ return false;
+ }
+ private boolean isExpected(IStructuredSelection receiver) {
+ for (Object current : receiver.toArray()) {
+ // Adapt current selection to EObject
+ if (current instanceof IAdaptable) {
+ EObject eObj = (EObject) ((IAdaptable) current)
+ .getAdapter(EObject.class);
+ if (!(eObj instanceof Element))
+ return false;
+ for (Stereotype st : ((Element)eObj).getAppliedStereotypes()) {
+ if(st.getQualifiedName().equals(I_SysMLStereotype.REQUIREMENT_STEREOTYPE))
+ return true;
+ }
+ }
+ return false;
+ }
+ return false;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/SysMLRequirementsProfileTester.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/SysMLRequirementsProfileTester.java
new file mode 100644
index 00000000000..c9431436789
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.testers/src/org/eclipse/papyrus/requirements/sysml/testers/SysMLRequirementsProfileTester.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.testers;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * This class helps to test if the selected element is a UML Package or not
+ */
+public class SysMLRequirementsProfileTester extends PropertyTester {
+
+ public static final String propertyToTest = "appliesSysMLRequirementsProfile";//NLS
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ if (propertyToTest.equals(property)) {
+ boolean testResult = isExpected((IStructuredSelection) receiver);
+
+ return expectedValue.equals(testResult);
+ }
+ return false;
+ }
+ private boolean isExpected(IStructuredSelection receiver) {
+ for (Object current : receiver.toArray()) {
+ // Adapt current selection to EObject
+ if (current instanceof IAdaptable) {
+ EObject eObj = (EObject) ((IAdaptable) current)
+ .getAdapter(EObject.class);
+ if (eObj instanceof Package){
+ final String packageQN = UMLUtil.getProfile(RequirementsPackage.eINSTANCE, eObj).getQualifiedName();
+ return (((Package)eObj).getAppliedProfile(packageQN, true) != null);
+ }
+ }
+ return false;
+ }
+ return false;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/.project
new file mode 100644
index 00000000000..3c5240307b4
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.sysml.traceability.assistant</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..f51dda03223
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.sysml.traceability.assistant;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.sysml.traceability.assistant.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.ui;bundle-version="3.107.0",
+ org.eclipse.emf.transaction;bundle-version="1.9.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.2.0",
+ org.eclipse.papyrus.requirements.sysml.common;bundle-version="0.7.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.requirements.sysml.traceability.commands
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.requirements.sysml.traceability.assistant;uses:="org.osgi.framework,org.eclipse.ui.plugin",
+ org.eclipse.papyrus.requirements.sysml.traceability.assistant.analysis;uses:="org.eclipse.uml2.uml,org.eclipse.emf.transaction"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-Localization: plugin
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/build.properties
new file mode 100644
index 00000000000..1b08f841b5e
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/plugin.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/plugin.properties
new file mode 100644
index 00000000000..2d85b2319df
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/plugin.properties
@@ -0,0 +1,4 @@
+#Properties file for org.eclipse.papyrus.requirements.sysml.traceability.assistant
+
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus SysML Traceability Assistant (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/pom.xml
new file mode 100644
index 00000000000..b281958fbea
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.sysml.traceability.assistant</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/Activator.java
new file mode 100644
index 00000000000..09285cc960e
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/Activator.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Patrick Tessier (patrick.tessier@cea.fr) CEA LIST - Initial API and implementation
+ *
+ * *******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.traceability.assistant;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ /** The plug-in ID**/
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.requirements.sysml.traceability.assistant"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/AbstractionRule.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/AbstractionRule.java
new file mode 100644
index 00000000000..4f2d375d45b
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/AbstractionRule.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Patrick Tessier (patrick.tessier@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.traceability.assistant.analysis;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog;
+import org.eclipse.papyrus.requirements.sysml.common.I_SysMLStereotype;
+import org.eclipse.papyrus.requirements.sysml.traceability.commands.AbstractionCreateCommand;
+import org.eclipse.papyrus.uml.tools.providers.UMLContentProvider;
+import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.UseCase;
+/**
+ *Rule of tracability for abstraction
+ *
+ */
+public class AbstractionRule implements ITracabilityRule {
+
+ public boolean canApplyTracability(Element element) {
+ //this is not a requirement not a usecase
+ if( element instanceof Class && (!(element instanceof UseCase))){
+ if(element.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE)==null){
+ Class currentClass= (Class)element;
+ boolean containsAnAbstraction=false;
+ Iterator<Dependency> dependencyIterator=currentClass.getClientDependencies().iterator();
+ while (dependencyIterator.hasNext()) {
+ Dependency dependency = (Dependency) dependencyIterator.next();
+ if( dependency instanceof Abstraction){
+ containsAnAbstraction=true;
+ }
+ if( dependency.getAppliedStereotype(I_SysMLStereotype.SATISFY_STEREOTYPE)!=null){
+ containsAnAbstraction=true;
+ }
+
+ }
+ if(containsAnAbstraction){
+ return false;
+ }
+ else{
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ public boolean applyTracability(Element element, TransactionalEditingDomain domain) {
+ //look for target of the abstraction
+ TreeSelectorDialog dialog = new TreeSelectorDialog(Display.getDefault().getActiveShell());
+ dialog.setContentProvider(new UMLContentProvider(element.getNearestPackage(), UMLPackage.eINSTANCE.getPackage_PackagedElement()));
+ dialog.setLabelProvider(new UMLLabelProvider());
+ dialog.setMessage("Choose abstraction for "+((NamedElement)element).getQualifiedName());
+ dialog.setTitle("Choose abstraction for "+((NamedElement)element).getName());
+ dialog.create();
+ dialog.setDescription("Choose abstraction for "+((NamedElement)element).getQualifiedName());
+ if(dialog.open() == org.eclipse.jface.window.Window.OK) {
+ Object[] result = dialog.getResult();
+ AbstractionCreateCommand cmd= new AbstractionCreateCommand(domain, ((NamedElement)result[0]),((NamedElement)element) );
+ domain.getCommandStack().execute(cmd);
+ }
+ return false;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/DeriveReqRule.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/DeriveReqRule.java
new file mode 100644
index 00000000000..29d49399980
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/DeriveReqRule.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Patrick Tessier (patrick.tessier@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.traceability.assistant.analysis;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog;
+import org.eclipse.papyrus.requirements.sysml.common.I_SysMLStereotype;
+import org.eclipse.papyrus.requirements.sysml.traceability.commands.DerivationReqCreateCommand;
+import org.eclipse.papyrus.uml.tools.providers.UMLContentProvider;
+import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+/**
+ *Rule of DeriveReqt
+ */
+public class DeriveReqRule implements ITracabilityRule {
+
+ public boolean canApplyTracability(Element element) {
+ //this must be a usecase
+ if( (element instanceof Class)){
+ if(element.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE)!=null){
+ Class currentClass= (Class)element;
+ boolean containsAnAbstraction=false;
+ Iterator<Dependency> dependencyIterator=currentClass.getClientDependencies().iterator();
+ while (dependencyIterator.hasNext()) {
+ Dependency dependency = (Dependency) dependencyIterator.next();
+ if( dependency instanceof Abstraction){
+ if( dependency.getAppliedStereotype(I_SysMLStereotype.SATISFY_STEREOTYPE)!=null){
+ containsAnAbstraction=true;
+ }
+ if( dependency.getAppliedStereotype(I_SysMLStereotype.DERIVEREQT_STEREOTYPE)!=null){
+ containsAnAbstraction=true;
+ }
+ if( dependency instanceof Abstraction){
+ containsAnAbstraction=true;
+ }
+ }
+
+ }
+ if(containsAnAbstraction){
+ return false;
+ }
+ else{
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ public boolean applyTracability(Element element, TransactionalEditingDomain domain) {
+ //look for target of the abstraction
+ TreeSelectorDialog dialog = new TreeSelectorDialog(Display.getDefault().getActiveShell());
+ dialog.setContentProvider(new UMLContentProvider(element.getNearestPackage(), UMLPackage.eINSTANCE.getPackage_PackagedElement()));
+ dialog.setLabelProvider(new UMLLabelProvider());
+ dialog.setMessage("Choose DeriveReq Link for "+((NamedElement)element).getQualifiedName());
+ dialog.setTitle("Choose DeriveReq Link for "+((NamedElement)element).getName());
+ dialog.create();
+ dialog.setDescription("Choose DeriveReq Link for "+((NamedElement)element).getQualifiedName());
+ if(dialog.open() == org.eclipse.jface.window.Window.OK) {
+ Object[] result = dialog.getResult();
+ DerivationReqCreateCommand cmd= new DerivationReqCreateCommand(domain, ((NamedElement)result[0]),((NamedElement)element) );
+ domain.getCommandStack().execute(cmd);
+ }
+ return false;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/ITracabilityRule.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/ITracabilityRule.java
new file mode 100644
index 00000000000..53685fb27cf
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/ITracabilityRule.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Patrick Tessier (patrick.tessier@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.traceability.assistant.analysis;
+
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.uml2.uml.Element;
+/**
+ * this interface defines the contract to apply tracability
+ *
+ */
+public interface ITracabilityRule {
+ /**
+ *
+ * @param element the current element
+ * @return true if the rules is interesting for this element
+ */
+ public boolean canApplyTracability(Element element);
+
+ /**
+ * if the element is interesting we can apply tracability defined in this Rules
+ * @param element the current element
+ * @param domain use to execute command
+ * @return true if the user has accepted to apply this rules.
+ */
+ public boolean applyTracability(Element element, TransactionalEditingDomain domain);
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/SatisfyRule.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/SatisfyRule.java
new file mode 100644
index 00000000000..e959e9bf45b
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/SatisfyRule.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Patrick Tessier (patrick.tessier@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.traceability.assistant.analysis;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog;
+import org.eclipse.papyrus.requirements.sysml.common.I_SysMLStereotype;
+import org.eclipse.papyrus.requirements.sysml.traceability.commands.SatisfactionCreateCommand;
+import org.eclipse.papyrus.uml.tools.providers.UMLContentProvider;
+import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.UseCase;
+/**
+ *Rule of tracability for abstraction
+ *
+ */
+public class SatisfyRule implements ITracabilityRule {
+
+ public boolean canApplyTracability(Element element) {
+ //this must be a usecase
+ if( (element instanceof UseCase)){
+ if(element.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE)==null){
+ UseCase currentClass= (UseCase)element;
+ boolean containsAnAbstraction=false;
+ Iterator<Dependency> dependencyIterator=currentClass.getClientDependencies().iterator();
+ while (dependencyIterator.hasNext()) {
+ Dependency dependency = (Dependency) dependencyIterator.next();
+ if( dependency instanceof Abstraction){
+ if( dependency.getAppliedStereotype(I_SysMLStereotype.SATISFY_STEREOTYPE)!=null){
+ containsAnAbstraction=true;
+ }
+ if( dependency instanceof Abstraction){
+ containsAnAbstraction=true;
+ }
+ }
+
+ }
+ if(containsAnAbstraction){
+ return false;
+ }
+ else{
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ public boolean applyTracability(Element element, TransactionalEditingDomain domain) {
+ //look for target of the abstraction
+ TreeSelectorDialog dialog = new TreeSelectorDialog(Display.getDefault().getActiveShell());
+ dialog.setContentProvider(new UMLContentProvider(element.getNearestPackage(), UMLPackage.eINSTANCE.getPackage_PackagedElement()));
+ dialog.setLabelProvider(new UMLLabelProvider());
+ dialog.setMessage("Choose Satisfy Link for "+((NamedElement)element).getQualifiedName());
+ dialog.setTitle("Choose Satisfy Link for "+((NamedElement)element).getName());
+ dialog.create();
+ dialog.setDescription("Choose Satisfy Link for "+((NamedElement)element).getQualifiedName());
+ if(dialog.open() == org.eclipse.jface.window.Window.OK) {
+ Object[] result = dialog.getResult();
+ SatisfactionCreateCommand cmd= new SatisfactionCreateCommand(domain, ((NamedElement)result[0]),((NamedElement)element) );
+ domain.getCommandStack().execute(cmd);
+ }
+ return false;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/TracabilityAnalyzer.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/TracabilityAnalyzer.java
new file mode 100644
index 00000000000..8986e77097d
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.assistant/src/org/eclipse/papyrus/requirements/sysml/traceability/assistant/analysis/TracabilityAnalyzer.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Patrick Tessier (patrick.tessier@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.traceability.assistant.analysis;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * the purpose of this class us to analyze the model
+ * and to propose to set the tracability
+ *
+ */
+public class TracabilityAnalyzer {
+ /**list of element for which question must not be asked**/
+ private ArrayList<Element> blackbox= new ArrayList<Element>();
+ /** list of tracability rules**/
+ private ArrayList<ITracabilityRule> tracabilityRules= new ArrayList<ITracabilityRule>();
+
+ /**
+ * Constructor
+ */
+ public TracabilityAnalyzer() {
+ super();
+ tracabilityRules.add(new AbstractionRule());
+ tracabilityRules.add(new SatisfyRule());
+ tracabilityRules.add(new DeriveReqRule());
+ }
+
+ /**
+ * apply tracability rules on the model
+ * @param model the package to analyze
+ * @param domain the domain to execute command
+ */
+ public void runAnalysis(org.eclipse.uml2.uml.Package model, TransactionalEditingDomain domain){
+ HashMap<Element, ArrayList<ITracabilityRule>> interestingElement= new HashMap<Element, ArrayList<ITracabilityRule>>();
+ Iterator<Element> modelIterator= model.allOwnedElements().iterator();
+
+ //go through the model in order to know the list of element where we apply the tracability rules.
+ while (modelIterator.hasNext()) {
+
+ Element currentElement = (Element) modelIterator.next();
+ //test if the element is not referenced in the blackbox
+ if( !blackbox.contains(currentElement)){
+ //look for if a trace rules can be applied
+ Iterator<ITracabilityRule> tracabilityIterator= tracabilityRules.iterator();
+ while (tracabilityIterator.hasNext()) {
+ ITracabilityRule tracabilityRule = (ITracabilityRule) tracabilityIterator.next();
+ if( tracabilityRule.canApplyTracability(currentElement)){
+ if( interestingElement.containsKey(currentElement)){
+ interestingElement.get(currentElement).add(tracabilityRule);
+ }
+ else{
+ interestingElement.put(currentElement, new ArrayList<ITracabilityRule>());
+ interestingElement.get(currentElement).add(tracabilityRule);
+ }
+ }
+ }
+ }
+ }
+ //for each element execute the rules
+ Iterator<Element> elementKeyiterator=interestingElement.keySet().iterator();
+ while (elementKeyiterator.hasNext()) {
+ Element currentKey = (Element) elementKeyiterator.next();
+ Iterator<ITracabilityRule> tracabilityIterator= interestingElement.get(currentKey).iterator();
+ while (tracabilityIterator.hasNext()) {
+ ITracabilityRule iTracabilityRule = (ITracabilityRule) tracabilityIterator.next();
+ iTracabilityRule.applyTracability(currentKey, domain);
+ }
+ }
+ }
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/.project
new file mode 100644
index 00000000000..58a56fa7ab5
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.sysml.traceability.commands</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..91eb3595d00
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.sysml.traceability.commands;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.sysml.traceability.commands.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="0.9.1";resolution:=optional,
+ org.eclipse.papyrus.requirements.sysml.common;bundle-version="0.7.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.requirements.sysml.traceability.commands;
+ uses:="org.osgi.framework,
+ org.eclipse.uml2.uml,
+ org.eclipse.emf.transaction,
+ org.eclipse.ui.plugin"
+Bundle-Localization: plugin
+Import-Package: org.eclipse.papyrus.requirements.sysml.common
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/build.properties
new file mode 100644
index 00000000000..baa36b183ee
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/plugin.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/plugin.properties
new file mode 100644
index 00000000000..4ba65efdf31
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/plugin.properties
@@ -0,0 +1,6 @@
+#Properties file for org.eclipse.papyrus.requirements.sysml.traceability.commands
+
+applyTraceabilityAssistant.command.name = Apply Traceability Assistant
+
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Traceability Assistant Commands (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/plugin.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/plugin.xml
new file mode 100644
index 00000000000..450786151d4
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/plugin.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ id="org.eclipse.papyrus.requirements.sysml.traceability.handlers.ApplyTracabilityHandler"
+ name="%applyTraceabilityAssistant.command.name">
+ </command>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/pom.xml
new file mode 100644
index 00000000000..b6afd46ef1b
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.sysml.traceability.commands</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/AbstractionCreateCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/AbstractionCreateCommand.java
new file mode 100644
index 00000000000..a99f56c9a53
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/AbstractionCreateCommand.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Patrick Tessier (patrick.tessier@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.traceability.commands;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLFactory;
+
+
+/**
+ * this command is used to create a abstraction
+ *
+ */
+public class AbstractionCreateCommand extends RecordingCommand {
+ private NamedElement source;
+ private NamedElement target;
+ /**
+ * use to make an abstraction
+ * @param domain the domain to execute a transaction
+ * @param source the source of the abstraction (the more concrete element)
+ * @param target the target of the abstraction (the more abstract element)
+
+ */
+ public AbstractionCreateCommand(TransactionalEditingDomain domain, NamedElement source, NamedElement target){
+ super(domain,"Create an Abstraction");
+ this.source=source;
+ this.target=target;
+ }
+
+ @Override
+ protected void doExecute() {
+ Abstraction theAbstraction= UMLFactory.eINSTANCE.createAbstraction();
+ target.getNearestPackage().getPackagedElements().add(theAbstraction);
+ theAbstraction.getSuppliers().add(source);
+ theAbstraction.getClients().add(target);
+ theAbstraction.setName("RefinementOf_"+this.source.getName());
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/Activator.java
new file mode 100644
index 00000000000..4ee88725209
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/Activator.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.traceability.commands;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.requirements.sysml.traceability.commands"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/DerivationReqCreateCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/DerivationReqCreateCommand.java
new file mode 100644
index 00000000000..5252a9020ec
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/DerivationReqCreateCommand.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Patrick Tessier (patrick.tessier@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.traceability.commands;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.requirements.sysml.common.I_SysMLStereotype;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLFactory;
+
+
+/**
+ * this command is used to create a link "satisfyBy" between requirement and namedElement
+ *
+ */
+public class DerivationReqCreateCommand extends RecordingCommand {
+ private NamedElement source;
+ private NamedElement target;
+ /**
+ * use to make an abstraction
+ * @param domain the domain to execute a transaction
+ * @param source the source of the abstraction (the more concrete element)
+ * @param target the target of the abstraction (the more abstract element)
+
+ */
+ public DerivationReqCreateCommand(TransactionalEditingDomain domain, NamedElement source, NamedElement target){
+ super(domain,"Create an Abstraction");
+ this.source=source;
+ this.target=target;
+ }
+
+ @Override
+ protected void doExecute() {
+ Abstraction theAbstraction= UMLFactory.eINSTANCE.createAbstraction();
+ target.getNearestPackage().getPackagedElements().add(theAbstraction);
+ theAbstraction.getSuppliers().add(source);
+ theAbstraction.getClients().add(target);
+ theAbstraction.setName("DeriveFrom_"+this.source.getName());
+ Stereotype satisfyStereotype= theAbstraction.getApplicableStereotype(I_SysMLStereotype.DERIVEREQT_STEREOTYPE);
+ theAbstraction.applyStereotype(satisfyStereotype);
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/RefinementCreateCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/RefinementCreateCommand.java
new file mode 100644
index 00000000000..1cb2e171be3
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/RefinementCreateCommand.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Patrick Tessier (patrick.tessier@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.traceability.commands;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UseCase;
+
+
+/**
+ * this command is used to create a link "Refine" between requirement and UseCase
+ *
+ */
+public class RefinementCreateCommand extends RecordingCommand {
+ private UseCase source;
+ private NamedElement target;
+ /**
+ * use to make an abstraction
+ * @param domain the domain to execute a transaction
+ * @param source the source of the abstraction (the more concrete element)
+ * @param target the target of the abstraction (the more abstract element)
+
+ */
+ public RefinementCreateCommand(TransactionalEditingDomain domain, UseCase source, NamedElement target){
+ super(domain,"Create an Abstraction");
+ this.source=source;
+ this.target=target;
+ }
+
+ @Override
+ protected void doExecute() {
+ Abstraction theAbstraction= UMLFactory.eINSTANCE.createAbstraction();
+ target.getNearestPackage().getPackagedElements().add(theAbstraction);
+ theAbstraction.getSuppliers().add(source);
+ theAbstraction.getClients().add(target);
+ theAbstraction.setName("SatisfactionOf_"+this.source.getName());
+ Stereotype satisfyStereotype= theAbstraction.getApplicableStereotype("StandardProfileL2::Refine");
+ theAbstraction.applyStereotype(satisfyStereotype);
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/SatisfactionCreateCommand.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/SatisfactionCreateCommand.java
new file mode 100644
index 00000000000..f2b8456cde6
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.commands/src/org/eclipse/papyrus/requirements/sysml/traceability/commands/SatisfactionCreateCommand.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Patrick Tessier (patrick.tessier@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.traceability.commands;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.requirements.sysml.common.I_SysMLStereotype;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLFactory;
+
+
+/**
+ * this command is used to create a link "satisfyBy" between requirement and namedElement
+ *
+ */
+public class SatisfactionCreateCommand extends RecordingCommand {
+ private NamedElement source;
+ private NamedElement target;
+ /**
+ * use to make an abstraction
+ * @param domain the domain to execute a transaction
+ * @param source the source of the abstraction (the more concrete element)
+ * @param target the target of the abstraction (the more abstract element)
+
+ */
+ public SatisfactionCreateCommand(TransactionalEditingDomain domain, NamedElement source, NamedElement target){
+ super(domain,"Create an Abstraction");
+ this.source=source;
+ this.target=target;
+ }
+
+ @Override
+ protected void doExecute() {
+ Abstraction theAbstraction= UMLFactory.eINSTANCE.createAbstraction();
+ target.getNearestPackage().getPackagedElements().add(theAbstraction);
+ theAbstraction.getSuppliers().add(source);
+ theAbstraction.getClients().add(target);
+ theAbstraction.setName("SatisfactionOf_"+this.source.getName());
+ Stereotype satisfyStereotype= theAbstraction.getApplicableStereotype(I_SysMLStereotype.SATISFY_STEREOTYPE);
+ theAbstraction.applyStereotype(satisfyStereotype);
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/.project
new file mode 100644
index 00000000000..14011d2ddbd
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.sysml.traceability.handlers</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..1e58de51698
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.sysml.traceability.handlers;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.sysml.traceability.handlers.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0";resolution:=optional,
+ org.eclipse.papyrus.uml.tools;bundle-version="1.2.0";resolution:=optional,
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.requirements.sysml.traceability.assistant;bundle-version="0.7.0",
+ org.eclipse.papyrus.uml.extensionpoints;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.2.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.requirements.sysml.traceability.handlers
+Bundle-Localization: plugin
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/build.properties
new file mode 100644
index 00000000000..baa36b183ee
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/plugin.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/plugin.properties
new file mode 100644
index 00000000000..f9459933320
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/plugin.properties
@@ -0,0 +1,40 @@
+#Properties file for org.eclipse.papyrus.requirements.sysml.assistant
+menu.label = Papyrus Req
+menu.tooltip = Assistants to manage SysML requirements
+menu.label.0 = Tools to Define Requirements Profile
+menu.tooltip.0 = Tools to Define Requirements Language
+
+command.label = Create New Requirement
+command.tooltip = Create New Requirement
+command.label.0 = Add Derived Link
+command.tooltip.0 = Add Derived Link
+command.label.1 = Derive New Requirement
+command.tooltip.1 = Derive New Requirement
+command.label.2 = Create Comments for Elements
+command.tooltip.2 = Create Comments for Elements
+command.label.3 = Extract Comments
+command.tooltip.3 = Extract Comments
+command.label.4 = Decompose Requirement
+command.tooltip.4 = Decompose Requirement
+command.label.5 = Add Satisfy Link
+command.tooltip.5 = Add Satisfy Link
+command.label.6 = Add Verify Link
+command.tooltip.6 = Add Verify Link
+command.label.7 = Define or Update Stereotype and Profile on Demand
+command.tooltip.7 = Define or Update Stereotype and Profile on Demand
+command.label.8 = Generate Profile from Domain Model
+command.tooltip.8 = Generates an initial profile from a domain model according to user-defined Papyrus Req preferences
+
+command.name = Extract Comments Assistant
+command.name.0 = InitDerivedRequirement Assistant
+command.name.1 = Create Comments
+command.name.2 = Create New Papyrus SysML Requirement
+command.name.3 = Add Derived Link
+command.name.4 = Decompose Requirement
+command.name.5 = Add Satisfy Link
+command.name.6 = Add Verify Link
+command.name.7 = Generate Profile from a Domain Model
+command.name.8 = Define or Update Stereotypes
+
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Req SysML Assistant (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/plugin.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/plugin.xml
new file mode 100644
index 00000000000..8ed36d174c7
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/plugin.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.requirements.sysml.traceability.handlers.ApplyTracabilityHandler"
+ commandId="org.eclipse.papyrus.requirements.sysml.traceability.handlers.ApplyTracabilityHandler">
+ </handler>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/pom.xml
new file mode 100644
index 00000000000..257f59126e1
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.sysml.traceability.handlers</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/src/org/eclipse/papyrus/requirements/sysml/traceability/handlers/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/src/org/eclipse/papyrus/requirements/sysml/traceability/handlers/Activator.java
new file mode 100644
index 00000000000..36a9e347757
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/src/org/eclipse/papyrus/requirements/sysml/traceability/handlers/Activator.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.traceability.handlers;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.requirements.sysml.traceability.handlers"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/src/org/eclipse/papyrus/requirements/sysml/traceability/handlers/ApplyTracabilityHandler.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/src/org/eclipse/papyrus/requirements/sysml/traceability/handlers/ApplyTracabilityHandler.java
new file mode 100644
index 00000000000..91434299a22
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.handlers/src/org/eclipse/papyrus/requirements/sysml/traceability/handlers/ApplyTracabilityHandler.java
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Patrick Tessier (patrick.tessier@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.traceability.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.ui.util.EditorUtils;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers;
+import org.eclipse.papyrus.requirements.sysml.traceability.assistant.analysis.TracabilityAnalyzer;
+import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile;
+import org.eclipse.papyrus.uml.extensionpoints.utils.Util;
+import org.eclipse.ui.ISelectionService;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+
+/**
+ * this class launch the application of the SysML profile
+ */
+
+public class ApplyTracabilityHandler extends AbstractHandler {
+
+ protected TransactionalEditingDomain transactionalEditingDomain=null;
+ protected org.eclipse.uml2.uml.Package selectedElement=null;
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ ISelection selection = selectionService.getSelection();
+ try {
+ transactionalEditingDomain =ServiceUtilsForHandlers.getInstance().getService(TransactionalEditingDomain.class, event);
+ } catch (Exception e) {
+ System.err.println("impossible to get the Transactional Editing Domain "+e);
+ }
+
+
+
+ if(selection instanceof IStructuredSelection) {
+ Object selectedobject = ((IStructuredSelection)selection).getFirstElement();
+ EObject selectedEObject = (EObject)EMFHelper.getEObject(selectedobject);
+ if (selectedEObject instanceof Model){
+ selectedElement=(Package)selectedEObject;
+ }
+
+
+ if(selectedElement!=null){
+
+ @SuppressWarnings("deprecation")
+ TransactionalEditingDomain editingDomain = EditorUtils.getTransactionalEditingDomain();
+ if (editingDomain != null && selectedElement!=null) {
+ Command command = new RecordingCommand(editingDomain) {
+
+ @Override
+ protected void doExecute() {
+ changeStructure(selectedElement);
+
+ }
+ };
+ editingDomain.getCommandStack().execute(command);
+ TracabilityAnalyzer analyzer= new TracabilityAnalyzer();
+ analyzer.runAnalysis(getToPackage(selectedElement), editingDomain);
+ }
+
+ }
+ }
+ return null;
+ }
+
+ private Package getToPackage(Element elem){
+ Package tmp= elem.getNearestPackage();
+ while(tmp.getOwner()!=null && (tmp.getOwner()instanceof Package)){
+ tmp= (Package)tmp.getOwner();
+ }
+ return tmp;
+ }
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+ *
+ * @return true if the handler is possible
+ */
+ @Override
+ public boolean isEnabled() {
+ return true;
+ }
+
+ protected void changeStructure(Package currentPackage) {
+ Package topPackage= getToPackage(currentPackage);
+ //apply SysML profile
+ RegisteredProfile SysMLregisteredProfile=(RegisteredProfile)RegisteredProfile.getRegisteredProfile("SysML");
+ URI SysMLmodelUri = SysMLregisteredProfile.uri;
+ @SuppressWarnings("deprecation")
+ final Resource SysMLResource = Util.getResourceSet(topPackage).getResource(SysMLmodelUri, true);
+ Profile sysMLprofile=(Profile) SysMLResource.getContents().get(0);
+ topPackage.applyProfile(sysMLprofile);
+
+ URI standardL2URI = URI.createURI("pathmap://UML_PROFILES/StandardL2.profile.uml");
+ @SuppressWarnings("deprecation")
+ final Resource standardL2Resource = Util.getResourceSet(topPackage).getResource(standardL2URI, true);
+ Profile standardL2Profile=(Profile) standardL2Resource.getContents().get(0);
+ topPackage.applyProfile(standardL2Profile);
+ }
+
+} \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/.project
new file mode 100644
index 00000000000..3ed16943a73
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.sysml.traceability.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..67ffd799305
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.sysml.traceability.ui;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.sysml.traceability.ui.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="0.10.0";resolution:=optional,
+ org.eclipse.papyrus.infra.widgets;bundle-version="0.9.1";resolution:=optional,
+ org.eclipse.papyrus.infra.core;bundle-version="0.9.0";resolution:=optional,
+ org.eclipse.core.expressions;bundle-version="3.5.0",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.requirements.common.ui;bundle-version="0.7.0"
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/build.properties
new file mode 100644
index 00000000000..ad723f0783b
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ images/,\
+ about.html,\
+ plugin.properties
+src.includes = about.html,\
+ images/
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Comment.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Comment.gif
new file mode 100644
index 00000000000..c495731c682
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Comment.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/ContainmentConnection.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/ContainmentConnection.gif
new file mode 100644
index 00000000000..8b2a7a39d82
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/ContainmentConnection.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Copy.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Copy.gif
new file mode 100644
index 00000000000..47caa0b1671
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Copy.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/DeriveReqt.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/DeriveReqt.gif
new file mode 100644
index 00000000000..62177483fec
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/DeriveReqt.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Link.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Link.gif
new file mode 100644
index 00000000000..13fb22e4bfe
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Link.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Profile.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Profile.gif
new file mode 100644
index 00000000000..18eed1f5cb9
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Profile.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Refine.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Refine.gif
new file mode 100644
index 00000000000..c8d1d8c2f8f
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Refine.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Requirement.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Requirement.gif
new file mode 100644
index 00000000000..50618e0067a
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Requirement.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Satisfy.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Satisfy.gif
new file mode 100644
index 00000000000..00848d83b70
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Satisfy.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/TestCase.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/TestCase.gif
new file mode 100644
index 00000000000..ac296118622
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/TestCase.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Trace.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Trace.gif
new file mode 100644
index 00000000000..f4cb0d328fe
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Trace.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Verify.gif b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Verify.gif
new file mode 100644
index 00000000000..2d54efc4f84
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/images/Verify.gif
Binary files differ
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/plugin.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/plugin.properties
new file mode 100644
index 00000000000..646c08b1625
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/plugin.properties
@@ -0,0 +1,9 @@
+#Properties file for org.eclipse.papyrus.requirements.sysml.traceability.ui
+papyrus.requirements.sysml.traceability.menu.label = Papyrus Req - Traceability Tools
+papyrus.requirements.sysml.traceability.menu.tooltip = Traceability assistants and tables for SysML requirements models
+
+applyTraceabilityAssistant.command.label = Apply Traceability Assistant
+applyTraceabilityAssistant.command.tooltip = Apply Traceability Assistant
+
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Req SysML Traceability UI (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/plugin.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/plugin.xml
new file mode 100644
index 00000000000..b6ab4c6435e
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/plugin.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu?after=org.eclipse.papyrus.requirements.common.ui.traceability.additions">
+ <menu
+ icon="platform:/plugin/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_16x16.png"
+ id="papyrus.requirements.sysml.traceability.menu"
+ label="%papyrus.requirements.sysml.traceability.menu.label"
+ tooltip="%papyrus.requirements.sysml.traceability.tooltip">
+ <visibleWhen>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </visibleWhen>
+ </menu>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup?after=org.eclipse.papyrus.requirements.common.ui.traceability.additions">
+ <menu
+ icon="platform:/plugin/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_16x16.png"
+ id="papyrus.requirements.sysml.traceability.menu"
+ label="%papyrus.requirements.sysml.traceability.menu.label"
+ tooltip="%papyrus.requirements.sysml.traceability.menu.tooltip">
+ </menu>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:papyrus.requirements.sysml.traceability.menu">
+ <command
+ commandId="org.eclipse.papyrus.requirements.sysml.traceability.handlers.ApplyTracabilityHandler"
+ label="%applyTraceabilityAssistant.command.label"
+ style="push"
+ tooltip="%applyTraceabilityAssistant.command.tooltip">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.requirements.sysml.testers.isModel"
+ value="true">
+ </test>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+</plugin>
+
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/pom.xml
new file mode 100644
index 00000000000..b76b77dfe09
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.sysml.traceability.ui</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/src/org/eclipse/papyrus/requirements/sysml/traceability/ui/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/src/org/eclipse/papyrus/requirements/sysml/traceability/ui/Activator.java
new file mode 100644
index 00000000000..31393f22a61
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.traceability.ui/src/org/eclipse/papyrus/requirements/sysml/traceability/ui/Activator.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+* CEA LIST. - initial API and implementation
+*******************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.traceability.ui;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.requirements.sysml.traceability.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}

Back to the top