Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.emf.refactor.metrics.papyrus/bin/org/eclipse/emf/refactor/metrics/papyrus/ui/PapyrusHighlighting.classbin761 -> 1100 bytes
-rw-r--r--org.eclipse.emf.refactor.metrics.papyrus/build.properties3
-rw-r--r--org.eclipse.emf.refactor.metrics.papyrus/icons/metric.PNGbin0 -> 419 bytes
-rw-r--r--org.eclipse.emf.refactor.metrics.papyrus/plugin.xml4
-rw-r--r--org.eclipse.emf.refactor.metrics.papyrus/src/org/eclipse/emf/refactor/metrics/papyrus/ui/PapyrusHighlighting.java1
-rw-r--r--org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView$1.classbin5369 -> 1092 bytes
-rw-r--r--org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView$2.classbin0 -> 5415 bytes
-rw-r--r--org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView$ColumnSortListener.classbin2104 -> 2104 bytes
-rw-r--r--org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView.classbin7500 -> 7671 bytes
-rw-r--r--org.eclipse.emf.refactor.metrics.runtime/src/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView.java14
-rw-r--r--org.eclipse.emf.refactor.metrics.xtext/bin/org/eclipse/emf/refactor/metrics/xtext/managers/XtextHighlightManager.classbin3055 -> 3069 bytes
-rw-r--r--org.eclipse.emf.refactor.metrics.xtext/src/org/eclipse/emf/refactor/metrics/xtext/managers/XtextHighlightManager.java14
12 files changed, 29 insertions, 7 deletions
diff --git a/org.eclipse.emf.refactor.metrics.papyrus/bin/org/eclipse/emf/refactor/metrics/papyrus/ui/PapyrusHighlighting.class b/org.eclipse.emf.refactor.metrics.papyrus/bin/org/eclipse/emf/refactor/metrics/papyrus/ui/PapyrusHighlighting.class
index b53a28d..f5c6c63 100644
--- a/org.eclipse.emf.refactor.metrics.papyrus/bin/org/eclipse/emf/refactor/metrics/papyrus/ui/PapyrusHighlighting.class
+++ b/org.eclipse.emf.refactor.metrics.papyrus/bin/org/eclipse/emf/refactor/metrics/papyrus/ui/PapyrusHighlighting.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.metrics.papyrus/build.properties b/org.eclipse.emf.refactor.metrics.papyrus/build.properties
index 316d0b2..17acfd9 100644
--- a/org.eclipse.emf.refactor.metrics.papyrus/build.properties
+++ b/org.eclipse.emf.refactor.metrics.papyrus/build.properties
@@ -4,4 +4,5 @@ bin.includes = META-INF/,\
.,\
plugin.xml,\
bin/,\
- src/
+ src/,\
+ icons/
diff --git a/org.eclipse.emf.refactor.metrics.papyrus/icons/metric.PNG b/org.eclipse.emf.refactor.metrics.papyrus/icons/metric.PNG
new file mode 100644
index 0000000..c8a71db
--- /dev/null
+++ b/org.eclipse.emf.refactor.metrics.papyrus/icons/metric.PNG
Binary files differ
diff --git a/org.eclipse.emf.refactor.metrics.papyrus/plugin.xml b/org.eclipse.emf.refactor.metrics.papyrus/plugin.xml
index 693b15f..f6f5831 100644
--- a/org.eclipse.emf.refactor.metrics.papyrus/plugin.xml
+++ b/org.eclipse.emf.refactor.metrics.papyrus/plugin.xml
@@ -20,6 +20,7 @@
label="EMF Quality Assurance (use existing techniques)">
<command
commandId="org.eclipse.emf.refactor.metrics.papyrus.calculateMetricsOnElementCommand"
+ icon="icons/metric.PNG"
label="Calculate Configured Metrics (on element)"
style="push">
<visibleWhen
@@ -39,6 +40,7 @@
</command>
<command
commandId="org.eclipse.emf.refactor.metrics.papyrus.calculateMetricsTransitivelyCommand"
+ icon="icons/metric.PNG"
label="Calculate Configured Metrics (transitively)"
style="push">
<visibleWhen
@@ -62,6 +64,7 @@
label="EMF Quality Assurance (define new techniques)">
<command
commandId="org.eclipse.emf.refactor.metrics.papyrus.generateNewMetricJavaCommand"
+ icon="icons/metric.PNG"
label="Generate New Metric (specified in Java)"
style="push">
<visibleWhen
@@ -81,6 +84,7 @@
</command>
<command
commandId="org.eclipse.emf.refactor.metrics.papyrus.generateNewMetricCompositeCommand"
+ icon="icons/metric.PNG"
label="Generate New Metric (compositional)"
style="push">
<visibleWhen
diff --git a/org.eclipse.emf.refactor.metrics.papyrus/src/org/eclipse/emf/refactor/metrics/papyrus/ui/PapyrusHighlighting.java b/org.eclipse.emf.refactor.metrics.papyrus/src/org/eclipse/emf/refactor/metrics/papyrus/ui/PapyrusHighlighting.java
index 9902901..f1a333a 100644
--- a/org.eclipse.emf.refactor.metrics.papyrus/src/org/eclipse/emf/refactor/metrics/papyrus/ui/PapyrusHighlighting.java
+++ b/org.eclipse.emf.refactor.metrics.papyrus/src/org/eclipse/emf/refactor/metrics/papyrus/ui/PapyrusHighlighting.java
@@ -7,6 +7,7 @@ public class PapyrusHighlighting implements IHighlighting {
@Override
public void highlight(Object selection) {
+ System.out.println("==>> highlight selection: " + selection);
HighlightManager.getInstance().highlight(selection);
}
diff --git a/org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView$1.class b/org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView$1.class
index 8cf2644..203456c 100644
--- a/org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView$1.class
+++ b/org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView$1.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView$2.class b/org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView$2.class
new file mode 100644
index 0000000..01ecc10
--- /dev/null
+++ b/org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView$2.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView$ColumnSortListener.class b/org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView$ColumnSortListener.class
index c7fb672..4070024 100644
--- a/org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView$ColumnSortListener.class
+++ b/org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView$ColumnSortListener.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView.class b/org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView.class
index cb34f8a..05814f0 100644
--- a/org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView.class
+++ b/org.eclipse.emf.refactor.metrics.runtime/bin/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.metrics.runtime/src/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView.java b/org.eclipse.emf.refactor.metrics.runtime/src/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView.java
index 2b7e7cb..7716142 100644
--- a/org.eclipse.emf.refactor.metrics.runtime/src/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView.java
+++ b/org.eclipse.emf.refactor.metrics.runtime/src/org/eclipse/emf/refactor/metrics/runtime/ui/MetricResultsView.java
@@ -25,6 +25,8 @@ import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
@@ -112,6 +114,17 @@ public class MetricResultsView extends ViewPart {
table.setHeaderVisible(true);
table.setLinesVisible(true);
+ table.addFocusListener(new FocusListener() {
+
+ @Override
+ public void focusLost(FocusEvent e) {
+ doAdditionalHighlightings(null);
+ }
+
+ @Override
+ public void focusGained(FocusEvent e) {
+ }
+ });
viewer.setContentProvider(new MetricResultsViewContentProvider());
viewer.setLabelProvider(new MetricResultsViewLabelProvider());
@@ -120,6 +133,7 @@ public class MetricResultsView extends ViewPart {
@Override
public void selectionChanged(SelectionChangedEvent event) {
+ System.out.println("===>>> event: " + event);
if(event.getSelection().isEmpty()) {
return;
}
diff --git a/org.eclipse.emf.refactor.metrics.xtext/bin/org/eclipse/emf/refactor/metrics/xtext/managers/XtextHighlightManager.class b/org.eclipse.emf.refactor.metrics.xtext/bin/org/eclipse/emf/refactor/metrics/xtext/managers/XtextHighlightManager.class
index 05301a4..93ee6d8 100644
--- a/org.eclipse.emf.refactor.metrics.xtext/bin/org/eclipse/emf/refactor/metrics/xtext/managers/XtextHighlightManager.class
+++ b/org.eclipse.emf.refactor.metrics.xtext/bin/org/eclipse/emf/refactor/metrics/xtext/managers/XtextHighlightManager.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.metrics.xtext/src/org/eclipse/emf/refactor/metrics/xtext/managers/XtextHighlightManager.java b/org.eclipse.emf.refactor.metrics.xtext/src/org/eclipse/emf/refactor/metrics/xtext/managers/XtextHighlightManager.java
index 3f8a148..3f297a7 100644
--- a/org.eclipse.emf.refactor.metrics.xtext/src/org/eclipse/emf/refactor/metrics/xtext/managers/XtextHighlightManager.java
+++ b/org.eclipse.emf.refactor.metrics.xtext/src/org/eclipse/emf/refactor/metrics/xtext/managers/XtextHighlightManager.java
@@ -51,12 +51,14 @@ public class XtextHighlightManager {
for (EObject eObject : selected) {
XtextEditor xEditor = EditorUtils.getActiveXtextEditor();
ICompositeNode node = NodeModelUtils.findActualNodeFor(eObject);
- int offset = node.getOffset();
- int length = node.getLength();
- ISourceViewer textViewer = xEditor.getInternalSourceViewer();
- textViewer.setRangeIndication(offset, length, true);
- textViewer.revealRange(offset, length);
- textViewer.setSelectedRange(offset, length);
+ if (node != null && xEditor != null) {
+ int offset = node.getOffset();
+ int length = node.getLength();
+ ISourceViewer textViewer = xEditor.getInternalSourceViewer();
+ textViewer.setRangeIndication(offset, length, true);
+ textViewer.revealRange(offset, length);
+ textViewer.setSelectedRange(offset, length);
+ }
}
}

Back to the top