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 284630 Details for
Bug 552208
[Keybindings] umbrella bug to track current keybinding problems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Snippet on how to reparent E4 in E3 BC's and JFace listing
reparent_and_list.snippet (text/plain), 1.71 KB, created by
Wim Jongman
on 2020-11-01 18:59:57 EST
(
hide
)
Description:
Snippet on how to reparent E4 in E3 BC's and JFace listing
Filename:
MIME Type:
Creator:
Wim Jongman
Created:
2020-11-01 18:59:57 EST
Size:
1.71 KB
patch
obsolete
> private void retargetBindingContexts(ContextManager pContextManager) { > for (Context context : pContextManager.getDefinedContexts()) { > try { > if(context.getId().startsWith("miw") && context.getParentId() == null) { > context.define(context.getName(), context.getDescription(), "org.eclipse.ui.contexts.window"); > logger.log(LogService.LOG_ERROR, context.getId() + " context reparented"); > System.out.println(); > } > } catch (NotDefinedException e) { > logger.log(LogService.LOG_ERROR, e.getMessage(), e); > } > } > > Map<String, List<Context>> contexts = new HashMap<>(); > for (Context context : pContextManager.getDefinedContexts()) { > try { > if(context.getParentId() != null) { > List<Context> list = contexts.get(context.getParentId()); > if(list == null) { > list = new ArrayList<Context>(); > contexts.put(context.getParentId(), list); > } > list.add(context); > } > } catch (NotDefinedException e) { > } > } > > for (Context context : pContextManager.getDefinedContexts()) { > try { > if(context.getParentId() == null) { > printContext(contexts, context, 0); > } > } catch (NotDefinedException e) { > } > } > > > } > > private void printContext(Map<String, List<Context>> pContexts, Context pContext, int pIndent) throws NotDefinedException { > printSpaces(pIndent); > System.out.println(pContext.getName()); > pIndent++; > List<Context> children = pContexts.get(pContext.getId()); > if(children != null) { > for (Context context : children) { > printContext(pContexts, context, pIndent); > } > } > } > > private void printSpaces(int pIndent) { > for(int ix=0; ix<pIndent; ix++) { > System.out.print(" "); > } > }
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 Raw
Actions:
View
Attachments on
bug 552208
:
284629
| 284630