| <?xml version="1.0" encoding="UTF-8"?> |
| <?eclipse version="3.4"?> |
| <!-- |
| Copyright (c) 2019 CEA LIST. |
| All rights reserved. This program and the accompanying materials |
| are made available under the terms of the Eclipse Public License v2.0 |
| which accompanies this distribution, and is available at |
| http://www.eclipse.org/legal/epl-v20.html |
| |
| Contributors: |
| Shuai Li (CEA LIST) <shuai.li@cea.fr> - initial API and implementation |
| --> |
| |
| <plugin> |
| <extension |
| point="org.eclipse.ui.menus"> |
| <menuContribution |
| allPopups="false" |
| locationURI="popup:org.eclipse.papyrus.designer.popup?after=codegen"> |
| <command |
| commandId="org.eclipse.papyrus.iotml.wot.td.codegen.ui.command" |
| label="%td.codegen.uml.command.name" |
| style="push"> |
| <visibleWhen |
| checkEnabled="true"> |
| </visibleWhen> |
| </command> |
| </menuContribution> |
| </extension> |
| <extension |
| point="org.eclipse.ui.commands"> |
| <command |
| categoryId="org.eclipse.papyrus.editor.category" |
| description="%command.description" |
| id="org.eclipse.papyrus.iotml.wot.td.codegen.ui.command" |
| name="%td.codegen.uml.command.name"> |
| </command> |
| </extension> |
| <extension |
| point="org.eclipse.ui.handlers"> |
| <handler |
| class="org.eclipse.papyrus.iotml.wot.td.codegen.ui.handlers.GenerateTDHandler" |
| commandId="org.eclipse.papyrus.iotml.wot.td.codegen.ui.command"> |
| <activeWhen> |
| <and> |
| <with |
| variable="selection"> |
| <iterate> |
| <adapt |
| type="org.eclipse.emf.ecore.EObject"> |
| <instanceof |
| value="org.eclipse.uml2.uml.PackageableElement"> |
| </instanceof> |
| </adapt> |
| </iterate> |
| </with> |
| <count |
| value="1"> |
| </count> |
| </and> |
| </activeWhen> |
| </handler> |
| </extension> |
| |
| </plugin> |