Community
Participate
Working Groups
F3 a. create a CU with 2 top-level classes b. save c. delete one class d. save e. make the file read-only f. select it and 'restore from resource history' it does add the other class marking as major - all our actions try not to modify read-only files
definitely major - 'revert' is not there on read only files
Works correctly in the editor's context menu (e.g. is disabled).
not for me - i see it enabled i tried it again and got this: java.lang.reflect.InvocationTargetException: Java Model Exception: Java Model Status [AllTEsts.java is read-only.] at org.eclipse.jdt.internal.core.Openable.save(Openable.java:448) at org.eclipse.jdt.internal.core.CommitWorkingCopyOperation.executeOperation (CommitWorkingCopyOperation.java:116) at org.eclipse.jdt.internal.core.JavaModelOperation.execute (JavaModelOperation.java:305) at org.eclipse.jdt.internal.core.JavaModelOperation.run (JavaModelOperation.java:513) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1361) at org.eclipse.jdt.internal.core.JavaModelManager.runOperation (JavaModelManager.java:1212) at org.eclipse.jdt.internal.core.JavaElement.runOperation(JavaElement.java:574) at org.eclipse.jdt.internal.core.WorkingCopy.commit(WorkingCopy.java:83) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.doSaveDoc ument(CompilationUnitDocumentProvider.java:914) at org.eclipse.ui.texteditor.AbstractDocumentProvider.saveDocument (AbstractDocumentProvider.java:428) at org.eclipse.jdt.internal.corext.textmanipulation.TextBufferFactory$1.run (TextBufferFactory.java:115) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1361) at org.eclipse.jdt.internal.corext.textmanipulation.TextBufferFactory.commitChanges (TextBufferFactory.java:119) at org.eclipse.jdt.internal.corext.textmanipulation.TextBuffer.commitChanges (TextBuffer.java:375) at org.eclipse.jdt.internal.ui.compare.JavaAddElementFromHistory$1.run (JavaAddElementFromHistory.java:165) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
sorry, forgot it's the package explorer's context menu
hey i know how to make it happen for every action: 1. have a writable cu with a class 2. open it in the editor and reveal in the package explorer 3. go to the outliner and open the context menu 4. go to the package explorer and make the file read only 5. (careful not to change the selection in the outliner!) open the context menu in the outliner - all source actions are there!
i opened a separate report for this see bug 20353
*** This bug has been marked as a duplicate of 23808 ***