Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 156265 Details for
Bug 299379
Activation of a newly added view does not work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
StackRenderer patch v2
bug299379-patch-v2.txt (text/plain), 3.81 KB, created by
Remy Suen
on 2010-01-15 14:19:40 EST
(
hide
)
Description:
StackRenderer patch v2
Filename:
MIME Type:
Creator:
Remy Suen
Created:
2010-01-15 14:19:40 EST
Size:
3.81 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.e4.ui.workbench >Index: src/org/eclipse/e4/workbench/ui/internal/PartServiceImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/PartServiceImpl.java,v >retrieving revision 1.12 >diff -u -r1.12 PartServiceImpl.java >--- src/org/eclipse/e4/workbench/ui/internal/PartServiceImpl.java 12 Jan 2010 15:32:14 -0000 1.12 >+++ src/org/eclipse/e4/workbench/ui/internal/PartServiceImpl.java 15 Jan 2010 19:17:04 -0000 >@@ -288,7 +288,7 @@ > // 3) make it visible / active / re-layout > > // bug with activation - need to deactivate first: >- deactivate(part); >+ // deactivate(part); > activate(part); > return part; > } >#P org.eclipse.e4.ui.workbench.renderers.swt >Index: src/org/eclipse/e4/workbench/ui/renderers/swt/StackRenderer.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/workbench/ui/renderers/swt/StackRenderer.java,v >retrieving revision 1.28 >diff -u -r1.28 StackRenderer.java >--- src/org/eclipse/e4/workbench/ui/renderers/swt/StackRenderer.java 13 Jan 2010 19:05:16 -0000 1.28 >+++ src/org/eclipse/e4/workbench/ui/renderers/swt/StackRenderer.java 15 Jan 2010 19:17:04 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2008, 2009 IBM Corporation and others. >+ * Copyright (c) 2008, 2010 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 >@@ -10,6 +10,7 @@ > *******************************************************************************/ > package org.eclipse.e4.workbench.ui.renderers.swt; > >+import java.util.List; > import javax.inject.Inject; > import org.eclipse.e4.core.services.annotations.PostConstruct; > import org.eclipse.e4.core.services.annotations.PreDestroy; >@@ -63,6 +64,8 @@ > > private EventHandler dirtyUpdater; > >+ private EventHandler activeChildUpdater; >+ > public StackRenderer() { > super(); > } >@@ -159,6 +162,43 @@ > > eventBroker.subscribe(UIEvents.buildTopic(UIEvents.Dirtyable.TOPIC, > UIEvents.Dirtyable.DIRTY), dirtyUpdater); >+ >+ activeChildUpdater = new EventHandler() { >+ public void handleEvent(Event event) { >+ Object objElement = event >+ .getProperty(UIEvents.EventTags.ELEMENT); >+ MElementContainer<?> uiElement = (MElementContainer<?>) objElement; >+ >+ // This listener only updates stacks -it- rendered >+ if (!(uiElement.getRenderer() == StackRenderer.this)) { >+ return; >+ } >+ >+ CTabFolder folder = (CTabFolder) uiElement.getWidget(); >+ Object activeChild = uiElement.getActiveChild(); >+ if (activeChild == null) { >+ List<?> children = uiElement.getChildren(); >+ if (children.isEmpty()) { >+ return; >+ } >+ >+ // FIXME: should be based on activation list >+ activeChild = children.get(0); >+ } >+ >+ CTabItem[] items = folder.getItems(); >+ for (int i = 0; i < items.length; i++) { >+ if (items[i].getData(OWNING_ME) == activeChild) { >+ folder.setSelection(i); >+ return; >+ } >+ } >+ } >+ }; >+ >+ eventBroker.subscribe(UIEvents.buildTopic( >+ UIEvents.ElementContainer.TOPIC, >+ UIEvents.ElementContainer.ACTIVECHILD), activeChildUpdater); > } > > @PreDestroy >@@ -167,6 +207,7 @@ > > eventBroker.unsubscribe(itemUpdater); > eventBroker.unsubscribe(dirtyUpdater); >+ eventBroker.unsubscribe(activeChildUpdater); > } > > private String getLabel(MUILabel itemPart, String newName) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 299379
:
155868
| 156265 |
156398