Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 64933 - [encoding] Change Encoding inconsistent while workspace is locked
Summary: [encoding] Change Encoding inconsistent while workspace is locked
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-01 09:10 EDT by Christof Marti CLA
Modified: 2019-09-04 01:57 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christof Marti CLA 2004-06-01 09:10:16 EDT
3.0RC1

- lock workspace by a job during the following steps (e.g., with the
org.eclipse.ui.examples.job)
- open a file
- choose different encoding with Edit->Encoding
-> blocking dialog shows up
- cancel user operation
-> file properties show the new encoding (unexpected)
- change encoding in the file properties
-> no blocking dialog (unexpected)

This is inconsistent. 'Change Encoding' should probably aquire a lock on the
file (in both cases) and do nothing if it is canceled.
Comment 1 Christof Marti CLA 2004-06-01 09:21:22 EDT
Acctually, after the above step "cancel user operation" the following exception
is thrown:

org.eclipse.core.runtime.OperationCanceledException
        at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:147)
        at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:8
7)
        at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:1
70)
        at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.j
ava:95)
        at org.eclipse.core.internal.resources.Workspace.prepareOperation(Worksp
ace.java:1628)
        at org.eclipse.core.internal.resources.File.create(File.java:105)
        at org.eclipse.core.internal.resources.ProjectPreferences.save(ProjectPr
eferences.java:271)
        at org.eclipse.core.internal.preferences.EclipsePreferences.flush(Eclips
ePreferences.java:337)
        at org.eclipse.core.internal.preferences.EclipsePreferences.flush(Eclips
ePreferences.java:325)
        at org.eclipse.core.internal.resources.CharsetManager.setCharsetFor(Char
setManager.java:174)
        at org.eclipse.core.internal.resources.File.setCharset(File.java:377)
        at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.setEncod
ing(ResourceTextFileBuffer.java:146)
        at org.eclipse.ui.editors.text.TextFileDocumentProvider.setEncoding(Text
FileDocumentProvider.java:1027)
        at org.eclipse.ui.editors.text.DefaultEncodingSupport.setEncoding(Defaul
tEncodingSupport.java:113)
        at org.eclipse.ui.editors.text.DefaultEncodingSupport.setEncoding(Defaul
tEncodingSupport.java:136)
        at org.eclipse.ui.editors.text.EncodingActionGroup$PredefinedEncodingAct
ion.run(EncodingActionGroup.java:116)
        at org.eclipse.ui.texteditor.RetargetTextEditorAction.run(RetargetTextEd
itorAction.java:240)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:881)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:915)
        at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContri
butionItem.java:866)
        at org.eclipse.jface.action.ActionContributionItem$7.handleEvent(ActionC
ontributionItem.java:785)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2716)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2382)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1363)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1334)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.jav
a:253)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
        at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96
)
        at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformAct
ivator.java:334)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
va:273)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
va:128)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
        at org.eclipse.core.launcher.Main.run(Main.java:638)
        at org.eclipse.core.launcher.Main.main(Main.java:622)
org.eclipse.core.runtime.OperationCanceledException
Comment 2 Kai-Uwe Maetzel CLA 2004-06-02 14:01:27 EDT
This is an issue with the different implementations and their result. Adding 
Andre.
Comment 3 Lars Vogel CLA 2019-09-04 01:57:50 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it and remove the stalebug whiteboard tag. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--