Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2013-02-16 02:47:15 -0500
committerPawel Piech2013-02-16 02:47:15 -0500
commitd1266ec9849c38667bc4f517dc728d8b085c0a83 (patch)
tree6f35e59742fc7d77077455df7bb27c798f2f5eb6
parent63c1614833ad2e2e5c27b1e6bb6c0538868478f5 (diff)
downloadeclipse.platform.debug-d1266ec9849c38667bc4f517dc728d8b085c0a83.tar.gz
eclipse.platform.debug-d1266ec9849c38667bc4f517dc728d8b085c0a83.tar.xz
eclipse.platform.debug-d1266ec9849c38667bc4f517dc728d8b085c0a83.zip
Bug 145635 - Support for debug view pin & cloneppiech/Bug145635
- Changed background of breadcrumb in pinned view, vs. in Debug view.
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDetails.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java15
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/AbstractLaunchViewBreadcrumb.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewBreadcrumb.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/NewViewInstanceAction.java2
5 files changed, 23 insertions, 9 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDetails.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDetails.java
index 2e8a4b0d9..548dabdd8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDetails.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDetails.java
@@ -199,10 +199,10 @@ class BreadcrumbItemDetails {
}
public void setBackground(Color color) {
- if (color == null) {
+ if (color != null) {
color = fTextComposite.getBackground();
+ fElementText.setBackground(color);
}
- fElementText.setBackground(color);
}
public Color getForeground() {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java
index 324309a16..cff8d4146 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java
@@ -825,10 +825,15 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
GC gc= new GC(result);
- Color colorC= createColor(SWT.COLOR_WIDGET_BACKGROUND, SWT.COLOR_LIST_BACKGROUND, 35, display);
- Color colorD= createColor(SWT.COLOR_WIDGET_BACKGROUND, SWT.COLOR_LIST_BACKGROUND, 45, display);
- Color colorE= createColor(SWT.COLOR_WIDGET_BACKGROUND, SWT.COLOR_LIST_BACKGROUND, 80, display);
- Color colorF= createColor(SWT.COLOR_WIDGET_BACKGROUND, SWT.COLOR_LIST_BACKGROUND, 70, display);
+ boolean flat = (getStyle() & SWT.FLAT) != 0;
+
+ int blendForeground = flat ? SWT.COLOR_LIST_BACKGROUND : SWT.COLOR_WIDGET_BACKGROUND;
+ int blendBackground = flat ? SWT.COLOR_WIDGET_BACKGROUND : SWT.COLOR_WIDGET_NORMAL_SHADOW;
+
+ Color colorC= createColor(blendBackground, blendForeground, 35, display);
+ Color colorD= createColor(blendBackground, blendForeground, 45, display);
+ Color colorE= createColor(blendBackground, blendForeground, 80, display);
+ Color colorF= createColor(blendBackground, blendForeground, 70, display);
Color colorG= createColor(SWT.COLOR_WIDGET_BACKGROUND, SWT.COLOR_WHITE, 45, display);
Color colorH= createColor(SWT.COLOR_WIDGET_NORMAL_SHADOW, SWT.COLOR_LIST_BACKGROUND, 35, display);
@@ -857,7 +862,7 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
colorG.dispose();
colorH.dispose();
}
-
+
return result;
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/AbstractLaunchViewBreadcrumb.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/AbstractLaunchViewBreadcrumb.java
index 6b1afb7d3..6a8394fa8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/AbstractLaunchViewBreadcrumb.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/AbstractLaunchViewBreadcrumb.java
@@ -516,8 +516,12 @@ abstract public class AbstractLaunchViewBreadcrumb extends AbstractBreadcrumb im
}
}
+ protected int getStyle() {
+ return SWT.NONE;
+ }
+
protected BreadcrumbViewer createViewer(Composite parent) {
- fViewer = new BreadcrumbViewer(parent, SWT.NONE) {
+ fViewer = new BreadcrumbViewer(parent, getStyle()) {
protected Control createDropDown(Composite dropDownParent, IBreadcrumbDropDownSite site, TreePath path) {
return createDropDownControl(dropDownParent, site, path);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewBreadcrumb.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewBreadcrumb.java
index 4cb32fae1..39ce4a41a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewBreadcrumb.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewBreadcrumb.java
@@ -15,6 +15,7 @@ import org.eclipse.debug.ui.contexts.IDebugContextProvider;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MenuDetectEvent;
import org.eclipse.swt.events.MenuDetectListener;
import org.eclipse.swt.widgets.Menu;
@@ -46,6 +47,10 @@ public class LaunchViewBreadcrumb extends AbstractLaunchViewBreadcrumb {
return getLaunchView().isBreadcrumbVisible();
}
+ protected int getStyle() {
+ return SWT.FLAT;
+ }
+
protected void createMenuManager() {
MenuManager menuMgr = new MenuManager("#PopUp"); //$NON-NLS-1$
menuMgr.setRemoveAllWhenShown(true);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/NewViewInstanceAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/NewViewInstanceAction.java
index 7636fe302..8d53a8987 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/NewViewInstanceAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/NewViewInstanceAction.java
@@ -58,7 +58,7 @@ public class NewViewInstanceAction extends Action {
if (fView instanceof IPinnablePart) {
createNewPart(fView);
}
- fView.getSite().getPage().showView(viewId, secondaryId, IWorkbenchPage.VIEW_VISIBLE);
+ fView.getSite().getPage().showView(viewId, secondaryId, IWorkbenchPage.VIEW_ACTIVATE);
} catch (PartInitException e) {
DebugUIPlugin.log(e);
}

Back to the top