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 237031 Details for
Bug 420650
Mini-nav does not reveal resource always since tree parent is empty
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]
fix
PR420650.patch (text/plain), 5.32 KB, created by
Silenio Quarti
on 2013-10-29 12:47:04 EDT
(
hide
)
Description:
fix
Filename:
MIME Type:
Creator:
Silenio Quarti
Created:
2013-10-29 12:47:04 EDT
Size:
5.32 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer-table.js b/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer-table.js >index 79b6407..a1e4e43 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer-table.js >+++ b/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer-table.js >@@ -84,6 +84,7 @@ define(['i18n!orion/navigate/nls/messages', 'require', 'orion/Deferred', 'orion/ > var progress = this.registry.getService("orion.page.progress"); > progress.progress(this.fileClient.fetchChildren(parentItem.ChildrenLocation), "Fetching children of " + parentItem.Name).then( > function(children) { >+ if (self.destroyed) { return; } > onComplete(self.processParent(parentItem, children)); > } > ); >@@ -193,6 +194,7 @@ define(['i18n!orion/navigate/nls/messages', 'require', 'orion/Deferred', 'orion/ > Object.keys(this._modelListeners).forEach(function(eventType) { > _self.modelEventDispatcher.removeEventListener(eventType, _self._modelListeners[eventType]); > }); >+ mExplorer.Explorer.prototype.destroy.call(this); > }; > > /** >@@ -484,16 +486,17 @@ define(['i18n!orion/navigate/nls/messages', 'require', 'orion/Deferred', 'orion/ > return this.loadResourceList(this.treeRoot, forceExpand); > } > var that = this; >- var progress = this.registry.getService("orion.page.progress"); >- return progress.progress(this.fileClient.fetchChildren(parent.ChildrenLocation), "Fetching children of " + parent.Name).then(function(children) { >- children = that.model.processParent(parent, children); >+ var deferred = new Deferred(); >+ parent.children = null; >+ this.model.getChildren(parent, function(children) { > //If a key board navigator is hooked up, we need to sync up the model > if(that.getNavHandler()){ > //that._initSelModel(); > } > that.myTree.refresh.bind(that.myTree)(parent, children, forceExpand); >- return new Deferred().resolve(children); >+ deferred.resolve(children); > }); >+ return deferred; > }; > > FileExplorer.prototype.isExpanded = function(item) { >@@ -601,8 +604,9 @@ define(['i18n!orion/navigate/nls/messages', 'require', 'orion/Deferred', 'orion/ > var self = this; > return Deferred.when(root, > function(root) { >- self.treeRoot = {}; > clearTimeout(progressTimeout); >+ if (self.destroyed) { return; } >+ self.treeRoot = {}; > // copy properties from root json to our object > for (var property in root) { > self.treeRoot[property] = root[property]; >diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js b/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js >index 26e50ae..3a39535 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js >+++ b/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js >@@ -38,6 +38,16 @@ exports.Explorer = (function() { > this.myTree = null; > } > Explorer.prototype = /** @lends orion.explorer.Explorer.prototype */ { >+ >+ destroy: function() { >+ if (this.model) { >+ this.model.destroy(); >+ } >+ if (this.myTree) { >+ this.myTree.destroy(); >+ } >+ this.destroyed = true; >+ }, > > // we have changed an item on the server at the specified parent node > changedItem: function(parent, children) { >@@ -311,6 +321,7 @@ exports.ExplorerModel = (function() { > } > ExplorerModel.prototype = /** @lends orion.explorer.ExplorerModel.prototype */{ > destroy: function(){ >+ this.destroyed = true; > }, > getRoot: function(onItem){ > var self = this; >@@ -826,9 +837,6 @@ exports.SimpleFlatModel = (function() { > onItem(this.root); > }; > >- SimpleFlatModel.prototype.destroy = function() { >- }; >- > SimpleFlatModel.prototype.getId = function(/* item */ item){ > var key = this.getKey(item); > // this might be a path, so strip slashes >diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/webui/treetable.js b/bundles/org.eclipse.orion.client.ui/web/orion/webui/treetable.js >index b374ac5..bd868fe 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/orion/webui/treetable.js >+++ b/bundles/org.eclipse.orion.client.ui/web/orion/webui/treetable.js >@@ -84,12 +84,17 @@ define(['i18n!orion/nls/messages', 'orion/webui/littlelib'], function(messages, > } > else { > tree._treeModel.getChildren(root, function(children) { >+ if (tree.destroyed) { return; } > tree._generate(children, 0); > }); > } > }); > }, > >+ destroy: function() { >+ this.destroyed = true; >+ }, >+ > _generate: function(children, indentLevel) { > lib.empty(this._parent); > var wrapper = document.createElement("div"); //$NON-NLS-0$ >@@ -184,6 +189,7 @@ define(['i18n!orion/nls/messages', 'orion/webui/littlelib'], function(messages, > } else { > tree = this; > children = this._treeModel.getChildren(row._item, function(children) { >+ if (tree.destroyed) { return; } > if (!row._expanded) { > row._expanded = true; > tree._generateChildren(children, row._depth+1, row); //$NON-NLS-0$ >@@ -243,6 +249,7 @@ define(['i18n!orion/nls/messages', 'orion/webui/littlelib'], function(messages, > var tree = this; > this._renderer.updateExpandVisuals(row, true); > this._treeModel.getChildren(row._item, function(children) { >+ if (tree.destroyed) { return; } > if (!row._expanded) { > row._expanded = true; > tree._generateChildren(children, row._depth+1, row); //$NON-NLS-0$
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 420650
: 237031