initial commit in accordance with CQ 3784
diff --git a/plugins/org.eclipse.objectteams.eclipse.monitor/.classpath b/plugins/org.eclipse.objectteams.eclipse.monitor/.classpath
new file mode 100644
index 0000000..987380a
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.eclipse.monitor/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="OTRE"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.objectteams.eclipse.monitor/.project b/plugins/org.eclipse.objectteams.eclipse.monitor/.project
new file mode 100644
index 0000000..81c3ceb
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.eclipse.monitor/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.objectteams.eclipse.monitor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.objectteams.otdt.builder.OTJBuilder</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>
+ <nature>org.objectteams.otdt.OTJavaNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.objectteams.eclipse.monitor/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.objectteams.eclipse.monitor/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..4fafd63
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.eclipse.monitor/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Sun Apr 08 14:46:15 CEST 2007
+eclipse.preferences.version=1
+encoding//src/org/objectteams/eclipse/monitor/MonitorMessages.properties=8859_1
diff --git a/plugins/org.eclipse.objectteams.eclipse.monitor/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.objectteams.eclipse.monitor/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..12e9c3e
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.eclipse.monitor/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Thu Mar 12 15:22:18 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/org.eclipse.objectteams.eclipse.monitor/META-INF/MANIFEST.MF b/plugins/org.eclipse.objectteams.eclipse.monitor/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b9b7c48
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.eclipse.monitor/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: OT/Equinox Monitor Plug-in
+Bundle-SymbolicName: org.eclipse.objectteams.eclipse.monitor;singleton:=true
+Bundle-Version: 1.3.0.qualifier
+Bundle-Vendor: objectteams.org
+Bundle-Activator: org.eclipse.objectteams.eclipse.monitor.Activator
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.objectteams.otequinox
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.objectteams.eclipse.monitor/build.properties b/plugins/org.eclipse.objectteams.eclipse.monitor/build.properties
new file mode 100644
index 0000000..0d3d3a7
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.eclipse.monitor/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ icons/
diff --git a/plugins/org.eclipse.objectteams.eclipse.monitor/icons/auto_refresh.png b/plugins/org.eclipse.objectteams.eclipse.monitor/icons/auto_refresh.png
new file mode 100644
index 0000000..1de43d5
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.eclipse.monitor/icons/auto_refresh.png
Binary files differ
diff --git a/plugins/org.eclipse.objectteams.eclipse.monitor/icons/monitor.png b/plugins/org.eclipse.objectteams.eclipse.monitor/icons/monitor.png
new file mode 100644
index 0000000..d9295e6
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.eclipse.monitor/icons/monitor.png
Binary files differ
diff --git a/plugins/org.eclipse.objectteams.eclipse.monitor/icons/refresh_nav.gif b/plugins/org.eclipse.objectteams.eclipse.monitor/icons/refresh_nav.gif
new file mode 100644
index 0000000..3ca04d0
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.eclipse.monitor/icons/refresh_nav.gif
Binary files differ
diff --git a/plugins/org.eclipse.objectteams.eclipse.monitor/icons/refresh_nav_dis.gif b/plugins/org.eclipse.objectteams.eclipse.monitor/icons/refresh_nav_dis.gif
new file mode 100644
index 0000000..478cff5
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.eclipse.monitor/icons/refresh_nav_dis.gif
Binary files differ
diff --git a/plugins/org.eclipse.objectteams.eclipse.monitor/plugin.xml b/plugins/org.eclipse.objectteams.eclipse.monitor/plugin.xml
new file mode 100644
index 0000000..b678063
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.eclipse.monitor/plugin.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.views">
+ <category
+ name="Object Teams"
+ id="org.eclipse.objectteams.otdt.ui">
+ </category>
+ <view
+ name="OT/Equinox Monitor"
+ icon="icons/monitor.png"
+ category="org.eclipse.objectteams.otdt.ui"
+ class="org.eclipse.objectteams.eclipse.monitor.MonitorView"
+ id="org.eclipse.objectteams.eclipse.monitor.MonitorView">
+ <description>
+ Presentation of all teams instantiated by OT/Equinox.
+Allows to interactively (de)activate a selected team.
+ </description>
+ </view>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.eclipse.ui.resourcePerspective">
+ <view
+ ratio="0.5"
+ relative="org.eclipse.ui.views.TaskList"
+ relationship="right"
+ id="org.eclipse.objectteams.eclipse.monitor.MonitorView">
+ </view>
+ </perspectiveExtension>
+ <perspectiveExtension
+ targetID="org.eclipse.objectteams.otdt.ui.OTJavaPerspective">
+ <viewShortcut
+ id="org.eclipse.objectteams.eclipse.monitor.MonitorView">
+ </viewShortcut>
+ </perspectiveExtension>
+ </extension>
+</plugin>
diff --git a/plugins/org.eclipse.objectteams.eclipse.monitor/src/org/eclipse/objectteams/eclipse/monitor/Activator.java b/plugins/org.eclipse.objectteams.eclipse.monitor/src/org/eclipse/objectteams/eclipse/monitor/Activator.java
new file mode 100644
index 0000000..b574633
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.eclipse.monitor/src/org/eclipse/objectteams/eclipse/monitor/Activator.java
@@ -0,0 +1,82 @@
+/**********************************************************************
+ * This file is part of "Object Teams Development Tooling"-Software
+ *
+ * Copyright 2004, 2005, 2006 Fraunhofer Gesellschaft, Munich, Germany,
+ * for its Fraunhofer Institute and Computer Architecture and Software
+ * Technology (FIRST), Berlin, Germany and Technical University Berlin,
+ * Germany.
+ *
+ * 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
+ * $Id: Activator.java 23468 2010-02-04 22:34:27Z stephan $
+ *
+ * Please visit http://www.objectteams.org for updates and contact.
+ *
+ * Contributors:
+ * Fraunhofer FIRST - Initial API and implementation
+ * Technical University Berlin - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.objectteams.eclipse.monitor;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ * (only used for access to local icons).
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.objectteams.eclipse.monitor"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /*
+ * (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;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path
+ *
+ * @param path the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+}
diff --git a/plugins/org.eclipse.objectteams.eclipse.monitor/src/org/eclipse/objectteams/eclipse/monitor/MonitorMessages.java b/plugins/org.eclipse.objectteams.eclipse.monitor/src/org/eclipse/objectteams/eclipse/monitor/MonitorMessages.java
new file mode 100644
index 0000000..61386d0
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.eclipse.monitor/src/org/eclipse/objectteams/eclipse/monitor/MonitorMessages.java
@@ -0,0 +1,46 @@
+/**********************************************************************
+ * This file is part of "Object Teams Development Tooling"-Software
+ *
+ * Copyright 2004, 2010 Technical University Berlin, Germany.
+ *
+ * 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
+ * $Id: MonitorMessages.java 23462 2010-02-04 22:13:22Z stephan $
+ *
+ * Please visit http://www.objectteams.org for updates and contact.
+ *
+ * Contributors:
+ * Technical University Berlin - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.objectteams.eclipse.monitor;
+
+import org.eclipse.osgi.util.NLS;
+
+public class MonitorMessages extends NLS {
+ private static final String BUNDLE_NAME = MonitorMessages.class.getName();
+
+ public static String button_text_refresh;
+ public static String button_tooltip_refresh;
+
+ public static String button_text_auto_refresh;
+ public static String button_tooltip_auto_refresh;
+
+ public static String job_name_refresh;
+
+ public static String heading_team_class;
+ public static String heading_num_roles;
+
+ public static String tooltip_not_computed;
+ public static String tooltip_roles_of;
+ public static String tooltip_no_roles;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, MonitorMessages.class);
+ }
+
+ private MonitorMessages() {
+ }
+}
diff --git a/plugins/org.eclipse.objectteams.eclipse.monitor/src/org/eclipse/objectteams/eclipse/monitor/MonitorMessages.properties b/plugins/org.eclipse.objectteams.eclipse.monitor/src/org/eclipse/objectteams/eclipse/monitor/MonitorMessages.properties
new file mode 100644
index 0000000..1fedab6
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.eclipse.monitor/src/org/eclipse/objectteams/eclipse/monitor/MonitorMessages.properties
@@ -0,0 +1,14 @@
+heading_team_class=Team class
+heading_num_roles=\# roles
+
+button_text_refresh=Refresh
+button_tooltip_refresh=Recompute all table data
+
+button_text_auto_refresh=Auto Refresh
+button_tooltip_auto_refresh=Periodically update the number of roles
+
+job_name_refresh=OT/Equinox Monitor Refresher
+
+tooltip_not_computed=no data computed, please select row to compute its details.
+tooltip_roles_of=Roles of
+tooltip_no_roles=No roles.
diff --git a/plugins/org.eclipse.objectteams.eclipse.monitor/src/org/eclipse/objectteams/eclipse/monitor/MonitorView.java b/plugins/org.eclipse.objectteams.eclipse.monitor/src/org/eclipse/objectteams/eclipse/monitor/MonitorView.java
new file mode 100644
index 0000000..e7b4854
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.eclipse.monitor/src/org/eclipse/objectteams/eclipse/monitor/MonitorView.java
@@ -0,0 +1,261 @@
+/**********************************************************************
+ * This file is part of "Object Teams Development Tooling"-Software
+ *
+ * Copyright 2004, 2010 Technical University Berlin, Germany.
+ *
+ * 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
+ * $Id: MonitorView.java 23462 2010-02-04 22:13:22Z stephan $
+ *
+ * Please visit http://www.objectteams.org for updates and contact.
+ *
+ * Contributors:
+ * Technical University Berlin - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.objectteams.eclipse.monitor;
+
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map.Entry;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.Action;
+import org.eclipse.objectteams.otequinox.TransformerPlugin;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseTrackAdapter;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.part.ViewPart;
+import org.objectteams.Team;
+
+// Copy&Paste: the GUI-stuff is partly inspired by the AboutPluginsDialog.
+public class MonitorView extends ViewPart {
+
+ private static final String IMG_AUTO_REFRESH = "icons/auto_refresh.png"; //$NON-NLS-1$
+ private static final String IMG_REFRESH = "icons/refresh_nav.gif"; //$NON-NLS-1$
+ private static final String IMG_REFRESH_DISABLED = "icons/refresh_nav_dis.gif"; //$NON-NLS-1$
+
+ /** The main widget: */
+ private Table table;
+ // actions:
+ private Action refreshAction;
+ private Action toggleAutoRefreshAction;
+ private boolean autoRefresh = true;
+
+ /** Stored texts for tooltips: */
+ private HashMap<Widget, String> hoverTexts = new HashMap<Widget, String>();
+
+ /**
+ * Setup the GUI.
+ */
+ public void createPartControl(Composite parent) {
+ table = new Table(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CHECK);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+ table.setFont(parent.getFont());
+
+
+ // create table headers
+ String[] columnTitles = { MonitorMessages.heading_team_class, MonitorMessages.heading_num_roles };
+ int [] columnWidths = { 500, 50 };
+ for (int i = 0; i < columnTitles.length; i++) {
+ TableColumn column = new TableColumn(table, SWT.NULL);
+ column.setWidth(columnWidths[i]);
+ column.setText(columnTitles[i]);
+ }
+
+ readTeams();
+
+ table.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ printDetails(e.item);
+ }
+ });
+ table.addMouseTrackListener(new MouseTrackAdapter() {
+ @Override
+ public void mouseHover(MouseEvent e) {
+ TableItem item = table.getItem(new Point(e.x, e.y));
+ String hoverText = hoverTexts.get(item);
+ if (hoverText != null)
+ table.setToolTipText(hoverText);
+ else
+ table.setToolTipText(MonitorMessages.tooltip_not_computed);
+ }
+ });
+
+ GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ table.setLayoutData(gridData);
+
+ final Display display = parent.getDisplay();
+ makeActions(display);
+ contributeToActionBars();
+ }
+
+ private void makeActions(final Display display) {
+ refreshAction = new Action() {
+ public void run() {
+ refreshAll();
+ }
+ };
+ refreshAction.setText(MonitorMessages.button_text_refresh);
+ refreshAction.setToolTipText(MonitorMessages.button_tooltip_refresh);
+ refreshAction.setDisabledImageDescriptor(Activator.getImageDescriptor(IMG_REFRESH_DISABLED));
+ refreshAction.setImageDescriptor(Activator.getImageDescriptor(IMG_REFRESH));
+
+ toggleAutoRefreshAction = new Action() {
+ public void run() {
+ autoRefresh = !autoRefresh;
+ if (autoRefresh)
+ startAutoRefreshJob(display);
+ }
+ };
+ toggleAutoRefreshAction.setChecked(true); // make this a checkbox.
+ toggleAutoRefreshAction.setText(MonitorMessages.button_text_auto_refresh);
+ toggleAutoRefreshAction.setToolTipText(MonitorMessages.button_tooltip_auto_refresh);
+ toggleAutoRefreshAction.setImageDescriptor(Activator.getImageDescriptor(IMG_AUTO_REFRESH));
+
+ startAutoRefreshJob(display); // on by default.
+ }
+
+ private void contributeToActionBars() {
+ IActionBars bars = getViewSite().getActionBars();
+ bars.getToolBarManager().add(refreshAction);
+ bars.getToolBarManager().add(toggleAutoRefreshAction);
+ }
+
+ /**
+ * Start a background job that will call back into the UI every second for refresh.
+ */
+ void startAutoRefreshJob(final Display display) {
+ Job job = new Job(MonitorMessages.job_name_refresh) {
+ protected IStatus run(IProgressMonitor monitor) {
+ // need asyncExec to call GUI code from a non-GUI thread:
+ display.asyncExec(new Runnable() {
+ public void run() {
+ refreshTableData();
+ }
+ });
+ if (autoRefresh)
+ this.schedule(1000); // keep going.
+ return Status.OK_STATUS;
+ }
+ };
+ job.setPriority(Job.SHORT);
+ job.schedule(1000);
+ }
+
+ /**
+ * Passing the focus request to the viewer's control.
+ */
+ public void setFocus() {
+ table.setFocus();
+ }
+
+ // ==== contents computations only below: ====
+
+ void readTeams() {
+ // fetch instantiated teams:
+ List<Team> teamList = new ArrayList<Team>();
+ TransformerPlugin.getTeamInstances(teamList);
+
+ // create rows and fill with data:
+ for (int i = 0; i < teamList.size(); ++i) {
+ Team aTeam = teamList.get(i);
+ TableItem item = new TableItem(table, SWT.NULL);
+ item.setData(aTeam);
+ item.setChecked(aTeam.isActive(Team.ALL_THREADS));
+ setupData(item);
+ }
+ }
+
+ void refreshAll() {
+ this.table.removeAll();
+ readTeams();
+ refreshTableData();
+ }
+
+ /** Set the texts from the contained Team instance. */
+ private boolean setupData(TableItem item) {
+ Team aTeam = (Team)item.getData();
+ item.setText(0, aTeam.getClass().getName());
+ String oldLength = item.getText(1);
+ String newLength = String.valueOf(aTeam.getAllRoles().length);
+ item.setText(1, newLength);
+ return oldLength == null || !oldLength.equals(newLength);
+ }
+
+ /** re-read the role statistics from all known teams
+ */
+ void refreshTableData() {
+ if (table.isDisposed()) {
+ autoRefresh = false;
+ return;
+ }
+ for(TableItem item : table.getItems()) {
+ if (setupData(item))
+ hoverTexts.remove(item);
+ }
+ }
+
+ /** Print to std out details about the selected team:
+ * How many roles of which class are registered?
+ * Also store these infos for display in tooltips.
+ */
+ void printDetails(Widget item) {
+ StringBuilder buf = new StringBuilder();
+
+ Team aTeam = (Team)item.getData();
+ String teamName = aTeam.getClass().getName();
+ buf.append(MonitorMessages.tooltip_roles_of+teamName);
+
+ Object[] allRoles = aTeam.getAllRoles();
+ if (allRoles.length == 0) {
+ buf.append('\n');
+ buf.append(MonitorMessages.tooltip_no_roles);
+ } else {
+ // sort roles by class:
+ HashMap<Class<?>, Integer> stats = new HashMap<Class<?>, Integer>();
+ for (Object aRole : allRoles) {
+ Integer i = stats.get(aRole.getClass());
+ if (i != null)
+ i = i+1;
+ else
+ i = 1;
+ stats.put(aRole.getClass(), i);
+ }
+ // append stats per class:
+ for (Entry<Class<?>, Integer> stat: stats.entrySet()) {
+ int prefixLen = teamName.length() + "$__OT__".length(); // single name for roles //$NON-NLS-1$
+ String roleName = stat.getKey().getName().substring(prefixLen);
+ buf.append("\n"+stat.getValue()+"\t"+roleName); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ System.out.println(buf.toString());
+ hoverTexts.put(item, buf.toString());
+
+ boolean checked = ((TableItem)item).getChecked();
+ if (checked != aTeam.isActive(Team.ALL_THREADS)) {
+ if (checked)
+ aTeam.activate(Team.ALL_THREADS);
+ else
+ aTeam.deactivate(Team.ALL_THREADS);
+ }
+ }
+}
\ No newline at end of file