summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/views
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2009-06-05 19:31:29 +0000
committerSilenio Quarti <silenio>2009-06-05 19:31:29 +0000
commit13cf175614a59a705b2ef8332f124490c5b9b416 (patch)
treec9fd09e1410ab4a321a979cec02d4a707859a27b /bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/views
parent0703a9912c898e83f45f1f28ce19bf5d8476df19 (diff)
downloadeclipse.platform.swt-13cf175614a59a705b2ef8332f124490c5b9b416.tar.gz
eclipse.platform.swt-13cf175614a59a705b2ef8332f124490c5b9b416.tar.xz
eclipse.platform.swt-13cf175614a59a705b2ef8332f124490c5b9b416.zip
adding sleak tool
Diffstat (limited to 'bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/views')
-rw-r--r--bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/views/SleakView.java64
1 files changed, 64 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/views/SleakView.java b/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/views/SleakView.java
new file mode 100644
index 0000000000..100c4e43e6
--- /dev/null
+++ b/bundles/org.eclipse.swt.tools/src/org/eclipse/swt/tools/views/SleakView.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.tools.views;
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.tools.internal.*;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.part.*;
+
+/**
+ * This sample class demonstrates how to plug-in a new
+ * workbench view. The view shows data obtained from the
+ * model. The sample creates a dummy model on the fly,
+ * but a real implementation would connect to the model
+ * available either in this or another plug-in (e.g. the workspace).
+ * The view is connected to the model using a content provider.
+ * <p>
+ * The view uses a label provider to define how model
+ * objects should be presented in the view. Each
+ * view can present the same model objects using
+ * different labels and icons, if needed. Alternatively,
+ * a single label provider can be shared between views
+ * in order to ensure that objects of the same type are
+ * presented in the same way everywhere.
+ * <p>
+ */
+
+public class SleakView extends ViewPart {
+
+ Composite parent = null;
+ Sleak sleak = null;
+
+ /**
+ * The constructor.
+ */
+ public SleakView() {
+ }
+
+ /**
+ * This is a callback that will allow us
+ * to create the viewer and initialize it.
+ */
+ public void createPartControl(Composite parent) {
+ this.parent = new Composite(parent, SWT.NONE);
+ sleak = new Sleak ();
+ sleak.create(this.parent);
+ }
+
+ /**
+ * Passing the focus request to the viewer's control.
+ */
+ public void setFocus() {
+ parent.setFocus();
+ }
+
+} \ No newline at end of file