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 206756 Details for
Bug 350019
[client] Refresh button
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]
Updated patch
bug350019.patch (text/plain), 3.38 KB, created by
Jay Arthanareeswaran
on 2011-11-10 00:56:27 EST
(
hide
)
Description:
Updated patch
Filename:
MIME Type:
Creator:
Jay Arthanareeswaran
Created:
2011-11-10 00:56:27 EST
Size:
3.38 KB
patch
obsolete
>From b93c66d428700d3b31500fa3bad20dd13c5c2a86 Mon Sep 17 00:00:00 2001 >From: Jayaprakash Arthanareeswaran <jarthana@in.ibm.com> >Date: Wed, 9 Nov 2011 23:28:06 +0530 >Subject: [PATCH] HEAD - Fix for 350019: [client] Refresh button > >--- > .../web/edit/setup.js | 4 +- > .../web/orion/editorCommands.js | 21 ++++++++++++++++++++ > 2 files changed, 23 insertions(+), 2 deletions(-) > >diff --git a/bundles/org.eclipse.orion.client.core/web/edit/setup.js b/bundles/org.eclipse.orion.client.core/web/edit/setup.js >index e75522d..ef5342d 100644 >--- a/bundles/org.eclipse.orion.client.core/web/edit/setup.js >+++ b/bundles/org.eclipse.orion.client.core/web/edit/setup.js >@@ -182,12 +182,12 @@ exports.setUpEditor = function(serviceRegistry, preferences, isReadOnly){ > var inputManager = { > lastFilePath: "", > >- setInput: function(location, editor) { >+ setInput: function(location, editor, refresh) { > var input = mUtil.getPositionInfo(location); > var fileURI = input.filePath; > // populate editor > if (fileURI) { >- if (fileURI === this.lastFilePath) { >+ if (fileURI === this.lastFilePath && !refresh) { > editor.showSelection(input.start, input.end, input.line, input.offset, input.length); > } else { > if (!editor.getTextView()) { >diff --git a/bundles/org.eclipse.orion.client.core/web/orion/editorCommands.js b/bundles/org.eclipse.orion.client.core/web/orion/editorCommands.js >index 139f30a..4265fb5 100644 >--- a/bundles/org.eclipse.orion.client.core/web/orion/editorCommands.js >+++ b/bundles/org.eclipse.orion.client.core/web/orion/editorCommands.js >@@ -83,6 +83,17 @@ exports.EditorCommandFactory = (function() { > ); > return true; > })); >+ editor.getTextView().setAction("Refresh", dojo.hitch(this, function () { >+ var force = true; >+ if (editor.isDirty()) { >+ force = confirm("Resource has unsaved changes. If you refresh you will loose your changes. Do you want to continue?"); >+ } >+ if (this.inputManager.getInput() && force) { >+ this.inputManager.setInput(this.inputManager.lastFilePath, editor, true); >+ } >+ return true; >+ })); >+ > var saveCommand = new mCommands.Command({ > name: "Save", > tooltip: "Save this file", >@@ -90,9 +101,19 @@ exports.EditorCommandFactory = (function() { > callback: function(editor) { > editor.getTextView().invokeAction("Save"); > }}); >+ var refreshCommand = new mCommands.Command({ >+ name: "Refresh", >+ toolTip: "Refresh this file", >+ id: "orion.refresh", >+ callback: function(editor) { >+ editor.getTextView().invokeAction("Refresh"); >+ } >+ }); > this.commandService.addCommand(saveCommand, "dom"); >+ this.commandService.addCommand(refreshCommand, "dom"); > this.commandService.addCommandGroup("orion.editorActions.unlabeled", 200, null, null, this.toolbarId); > this.commandService.registerCommandContribution("orion.save", 1, this.toolbarId, "orion.editorActions.unlabeled", new mCommands.CommandKeyBinding('s', true)); >+ this.commandService.registerCommandContribution("orion.refresh", 2, this.toolbarId, "orion.editorActions.unlabeled"); > > // add the commands generated by plug-ins who implement the "orion.edit.command" extension. > // we currently position these first so that the regular commands always appear in the same place (on the right) regardless of installed plug-ins >-- >1.7.6.msysgit.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
Flags:
jarthana
:
review?
Actions:
View
|
Diff
Attachments on
bug 350019
:
206722
| 206756