Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwilk2011-01-11 15:40:39 -0500
committerRyan D. Brooks2011-01-11 15:40:39 -0500
commite2214eee6e3126d291381989234dd6f92c157d12 (patch)
tree109889b99cbaeffeda38887c8b155bb288308986 /plugins/org.eclipse.osee.coverage
parent65da98278455193b5f4dfd5664371015e3e48c44 (diff)
downloadorg.eclipse.osee-e2214eee6e3126d291381989234dd6f92c157d12.tar.gz
org.eclipse.osee-e2214eee6e3126d291381989234dd6f92c157d12.tar.xz
org.eclipse.osee-e2214eee6e3126d291381989234dd6f92c157d12.zip
bug[bgz_333909]: Fix for setFocus() problem in widgets inheriting from XWidget and ViewPart
Diffstat (limited to 'plugins/org.eclipse.osee.coverage')
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/XCoverageViewer.java31
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/navigate/CoverageNavigateView.java10
2 files changed, 9 insertions, 32 deletions
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/XCoverageViewer.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/XCoverageViewer.java
index b4aa0a6038..cac0c41a5a 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/XCoverageViewer.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/XCoverageViewer.java
@@ -14,8 +14,6 @@ package org.eclipse.osee.coverage.editor.xcover;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.osee.coverage.model.CoverageOptionManager;
import org.eclipse.osee.coverage.model.ICoverage;
@@ -26,7 +24,7 @@ import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
-import org.eclipse.osee.framework.ui.skynet.widgets.XWidget;
+import org.eclipse.osee.framework.ui.skynet.widgets.GenericXWidget;
import org.eclipse.osee.framework.ui.swt.ALayout;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.swt.SWT;
@@ -40,7 +38,7 @@ import org.eclipse.ui.forms.widgets.ScrolledForm;
/**
* @author Donald G. Dunne
*/
-public class XCoverageViewer extends XWidget {
+public class XCoverageViewer extends GenericXWidget {
protected CoverageXViewer xViewer;
public final static String normalColor = "#EEEEEE";
@@ -177,11 +175,6 @@ public class XCoverageViewer extends XWidget {
}
@Override
- public void setFocus() {
- xViewer.getTree().setFocus();
- }
-
- @Override
public void refresh() {
if (xViewer == null || xViewer.getTree() == null || xViewer.getTree().isDisposed()) {
return;
@@ -190,21 +183,6 @@ public class XCoverageViewer extends XWidget {
}
@Override
- public IStatus isValid() {
- return Status.OK_STATUS;
- }
-
- @Override
- public void setXmlData(String str) {
- // do nothing
- }
-
- @Override
- public String getXmlData() {
- return null;
- }
-
- @Override
public String toHTML(String labelFont) {
if (getXViewer().getTree().getItemCount() == 0) {
return "";
@@ -214,11 +192,6 @@ public class XCoverageViewer extends XWidget {
return html.toString();
}
- @Override
- public String getReportData() {
- return null;
- }
-
public CoverageXViewer getXViewer() {
return xViewer;
}
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/navigate/CoverageNavigateView.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/navigate/CoverageNavigateView.java
index 439a05cd98..6955cb2271 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/navigate/CoverageNavigateView.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/navigate/CoverageNavigateView.java
@@ -54,9 +54,13 @@ public class CoverageNavigateView extends ViewPart implements IActionable {
private XNavigateComposite xNavComp;
private XBranchSelectWidget xBranchSelectWidget;
+ private Composite comp;
+
@Override
public void setFocus() {
- // do nothing
+ if (comp != null) {
+ comp.setFocus();
+ }
}
@Override
@@ -67,7 +71,7 @@ public class CoverageNavigateView extends ViewPart implements IActionable {
OseeStatusContributionItemFactory.addTo(this, false);
- Composite comp = new Composite(parent, SWT.None);
+ comp = new Composite(parent, SWT.None);
comp.setLayout(ALayout.getZeroMarginLayout());
comp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
@@ -196,4 +200,4 @@ public class CoverageNavigateView extends ViewPart implements IActionable {
});
}
-} \ No newline at end of file
+}

Back to the top