extension points served
diff --git a/org.eclipse.emf.refactor.metrics.ocl/plugin.xml b/org.eclipse.emf.refactor.metrics.ocl/plugin.xml
index cbf6b3a..43f1e24 100644
--- a/org.eclipse.emf.refactor.metrics.ocl/plugin.xml
+++ b/org.eclipse.emf.refactor.metrics.ocl/plugin.xml
@@ -5,11 +5,51 @@
point="org.eclipse.ui.newWizards">
<wizard
category="org.eclipse.emf.refactor.newwizards.category"
- class="org.eclipse.emf.refactor.metrics.henshin.ui.NewMetricWizardOCL"
+ class="org.eclipse.emf.refactor.metrics.ocl.ui.NewMetricWizardOCL"
icon="icons/newmetric.PNG"
id="org.eclipse.emf.refactor.metrics.newwizard"
- name="Metric (specified in Henshin)">
+ name="Metric (specified in OCL)">
</wizard>
</extension>
+ <extension
+ id="org.eclipse.emf.refactor.qa.menu"
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="true"
+ locationURI="popup:org.eclipse.ui.popup.any?after=additions">
+ <menu
+ id="org.eclipse.emf.refactor.runtime.menu"
+ label="EMF Quality Assurance">
+ <command
+ commandId="org.eclipse.emf.refactor.metrics.henshin.generateNewMetricOCLCommand"
+ label="Generate New Metric (specified in OCL)"
+ style="push">
+ <visibleWhen
+ checkEnabled="true">
+ <iterate
+ ifEmpty="false">
+ <instanceof
+ value="org.eclipse.emf.ecore.EObject">
+ </instanceof>
+ </iterate>
+ </visibleWhen>
+ </command>
+ </menu>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ id="org.eclipse.emf.refactor.metrics.henshin.generateNewMetricOCLCommand"
+ name="GenerateNewMetricOCLCommand">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.emf.refactor.metrics.ocl.handler.GenerateNewMetricOCLCommandHandler"
+ commandId="org.eclipse.emf.refactor.metrics.henshin.generateNewMetricOCLCommand">
+ </handler>
+ </extension>
</plugin>
diff --git a/org.eclipse.emf.refactor.metrics.ocl/src/org/eclipse/emf/refactor/metrics/ocl/ui/OCLDataWizardPage.java b/org.eclipse.emf.refactor.metrics.ocl/src/org/eclipse/emf/refactor/metrics/ocl/ui/OCLDataWizardPage.java
index 459300a..eec7b67 100644
--- a/org.eclipse.emf.refactor.metrics.ocl/src/org/eclipse/emf/refactor/metrics/ocl/ui/OCLDataWizardPage.java
+++ b/org.eclipse.emf.refactor.metrics.ocl/src/org/eclipse/emf/refactor/metrics/ocl/ui/OCLDataWizardPage.java
@@ -34,7 +34,6 @@
layout.numColumns = 1;
container.setLayout(layout);
createTextFields(container);
-// initContents();
setControl(container);
this.setPageComplete(false);
@@ -49,7 +48,7 @@
GridData gridData;
Group group;
GridLayout layout;
- // - Metric Data -
+ // - OCL Data -
group = new Group(container, SWT.NONE);
group.setText("OCL");
layout = new GridLayout();
@@ -60,12 +59,10 @@
// - Name -
// col:1
label = new Label(group, SWT.NONE);
- label.setText("OCL Expression:");
+ label.setText("OCL expression: ");
label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_BEGINNING));
// col:2
oclExpressionTextField = new StyledText(group, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- //new Text(group, SWT.BORDER);
-// oclExpressionTextField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
oclExpressionTextField.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL));
oclExpressionTextField.addListener(SWT.Modify, this);
oclExpressionTextField.setText("self.");