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 8495 Details for
Bug 54464
Remove non-default-encoding-alert from TextEditor
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]
patch to remove encoding alert from TextEditor
texteditorencoding.patch (text/plain), 3.64 KB, created by
Andre Weinand
on 2004-03-11 09:32:42 EST
(
hide
)
Description:
patch to remove encoding alert from TextEditor
Filename:
MIME Type:
Creator:
Andre Weinand
Created:
2004-03-11 09:32:42 EST
Size:
3.64 KB
patch
obsolete
>Index: src/org/eclipse/ui/editors/text/TextEditor.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java,v >retrieving revision 1.36 >diff -u -r1.36 TextEditor.java >--- src/org/eclipse/ui/editors/text/TextEditor.java 26 Feb 2004 11:12:16 -0000 1.36 >+++ src/org/eclipse/ui/editors/text/TextEditor.java 11 Mar 2004 14:24:49 -0000 >@@ -109,27 +109,7 @@ > > super.dispose(); > } >- >- /* >- * @see AbstractTextEditor#doSaveAs() >- * @since 2.1 >- */ >- public void doSaveAs() { >- if (askIfNonWorkbenchEncodingIsOk()) >- super.doSaveAs(); >- } > >- /* >- * @see AbstractTextEditor#doSave(IProgressMonitor) >- * @since 2.1 >- */ >- public void doSave(IProgressMonitor monitor){ >- if (askIfNonWorkbenchEncodingIsOk()) >- super.doSave(monitor); >- else >- monitor.setCanceled(true); >- } >- > /** > * Installs the encoding support on the given text editor. > * <p> >@@ -141,37 +121,6 @@ > protected void installEncodingSupport() { > fEncodingSupport= new DefaultEncodingSupport(); > fEncodingSupport.initialize(this); >- } >- >- /** >- * Asks the user if it is ok to store in non-workbench encoding. >- * >- * @return <true> if the user wants to continue or if no encoding support has been installed >- * @since 2.1 >- */ >- private boolean askIfNonWorkbenchEncodingIsOk() { >- >- if (fEncodingSupport == null) >- return true; >- >- IDocumentProvider provider= getDocumentProvider(); >- if (provider instanceof IStorageDocumentProvider) { >- IEditorInput input= getEditorInput(); >- IStorageDocumentProvider storageProvider= (IStorageDocumentProvider)provider; >- String encoding= storageProvider.getEncoding(input); >- String defaultEncoding= storageProvider.getDefaultEncoding(); >- if (encoding != null && !encoding.equals(defaultEncoding)) { >- Shell shell= getSite().getShell(); >- String title= TextEditorMessages.getString("Editor.warning.save.nonWorkbenchEncoding.title"); //$NON-NLS-1$ >- String msg; >- if (input != null) >- msg= MessageFormat.format(TextEditorMessages.getString("Editor.warning.save.nonWorkbenchEncoding.message1"), new String[] {input.getName(), encoding});//$NON-NLS-1$ >- else >- msg= MessageFormat.format(TextEditorMessages.getString("Editor.warning.save.nonWorkbenchEncoding.message2"), new String[] {encoding});//$NON-NLS-1$ >- return MessageDialog.openQuestion(shell, title, msg); >- } >- } >- return true; > } > > /** >Index: src/org/eclipse/ui/editors/text/TextEditorMessages.properties >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditorMessages.properties,v >retrieving revision 1.9 >diff -u -r1.9 TextEditorMessages.properties >--- src/org/eclipse/ui/editors/text/TextEditorMessages.properties 8 Mar 2004 18:55:41 -0000 1.9 >+++ src/org/eclipse/ui/editors/text/TextEditorMessages.properties 11 Mar 2004 14:24:50 -0000 >@@ -26,10 +27,6 @@ > Editor.error.save.message=Save could not be completed. {0} > Editor.error.save.title=Problems During Save As... > Editor.warning.save.delete=The original file ''{0}'' has been deleted. >- >-Editor.warning.save.nonWorkbenchEncoding.title= Save Resource In Non-Workbench Encoding >-Editor.warning.save.nonWorkbenchEncoding.message1= {0} will be saved in \" {1} \" encoding which is not the current workbench encoding. This can result in conflicts with other tools. Continue anyway? >-Editor.warning.save.nonWorkbenchEncoding.message2= The resource will be saved in \" {0} \" encoding which is not the current platform encoding. This can result in conflicts with other tools. Continue anyway? > > Editor.AddMenu.label=&Add >
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 54464
: 8495