Community
Participate
Working Groups
1. Window->New Editor is disabled sometimes when a text editor is opened. It is hard to reproduce. If you cannot see the disabled menu-item, try closing/reopening the editor again and again, or right-click->Open instead of double-click. I cannot figure out the exact steps to reproduce. 2. In this situation, Window->New Editor is enabled after open-and-close any dialog such as 'Customize Perspective' or 'Preferences' or 'Find/Replace' or such. Eclipse Platform Version: 4.2.1 Build id: M20120914-1800 (eclipse-platform-4.2.1-win32.zip)
I was able to reproduce (at least one) by closing all the editors and opening the text-based properties editor. New editor in the Window menu was disabled. Opening "Open Resources" dialog and closing it enabled it PW
FWIW, File->Close has same malfunction because both of them have same definition in org.eclipse.ui. <handler class="org.eclipse.ui.internal.handlers.NewEditorHandler" commandId="org.eclipse.ui.window.newEditor"> <enabledWhen> <with variable="activeEditor"> <instanceof value="org.eclipse.ui.IEditorPart"> </instanceof> </with> </enabledWhen> </handler> <handler class="org.eclipse.ui.internal.CloseEditorHandler" commandId="org.eclipse.ui.file.close"> <enabledWhen> <with variable="activeEditor"> <instanceof value="org.eclipse.ui.IEditorPart"> </instanceof> </with> </enabledWhen> </handler> EvaluationService works fine, org.eclipse.ui.internal.handlers.HandlerProxy.getEnablementListener().new IPropertyChangeListener() {...}.propertyChange(PropertyChangeEvent) is called properly. However, after that, following methods are called. org.eclipse.e4.core.commands.internal.HandlerServiceImpl.canExecute(ParameterizedCommand, IEclipseContext) ->org.eclipse.ui.internal.handlers.E4HandlerProxy.canExecute(IEclipseContext, IEvaluationContext) ->org.eclipse.ui.internal.handlers.HandlerProxy.setEnabled(Object) ->org.eclipse.core.internal.expressions.WithExpression.evaluate(IEvaluationContext) ->org.eclipse.e4.ui.workbench.modeling.ExpressionContext.getVariable(String) At ExpressionContext.getVariable() >Object obj = eclipseContext.getActive(name); getActive() returns null. (though get() returns correct value)
Unfortunately I'm not able to recreate the issue. I was using the build I20130516-2200-win32-x86_64 during my tests. Do we still have this issue or we can close this bug? thanks, Daniel
Sorry, this is duplicate of bug 394336 and 407085. I believe this was fixed with bug 407085. I cannot reproduce this issue on Kepler RC1 Build id: I20130516-2200. Thanks.
Yes, I think that's the same underlying cause. PW *** This bug has been marked as a duplicate of bug 394336 ***