Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342065 - Should not run properties command on non-user-managed repository
Summary: Should not run properties command on non-user-managed repository
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.5.1   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-06 14:54 EDT by David King CLA
Modified: 2011-04-21 06:00 EDT (History)
0 users

See Also:


Attachments
fix (1.23 KB, patch)
2011-04-21 05:54 EDT, Steffen Pingel CLA
no flags Details | Diff
mylyn/context/zip (4.55 KB, application/octet-stream)
2011-04-21 05:54 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David King CLA 2011-04-06 14:54:57 EDT
When a task repository is not user managed, the properties command is set disabled. However, when double clicking (or hitting <enter>) on such a repository in the repositories view will attempt to run the properties command, causing the following exception:

!ENTRY org.eclipse.mylyn.tasks.ui 4 0 2011-04-06 11:41:26.000
!MESSAGE Opening repository properties failed
!STACK 0
org.eclipse.core.commands.NotEnabledException: Trying to execute the disabled command org.eclipse.ui.file.properties
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:469)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:178)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247)
	at org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesView$3.doubleClick(TaskRepositoriesView.java:188)
	at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:824)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:822)
	at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1421)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1225)
	at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:238)
	at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:235)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:296)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Comment 1 Steffen Pingel CLA 2011-04-06 16:00:28 EDT
Thanks David. The code should check the enablement of the command to avoid the exception.
Comment 2 Steffen Pingel CLA 2011-04-21 05:54:32 EDT
Created attachment 193796 [details]
fix
Comment 3 Steffen Pingel CLA 2011-04-21 05:54:44 EDT
Created attachment 193797 [details]
mylyn/context/zip
Comment 4 Steffen Pingel CLA 2011-04-21 06:00:37 EDT
I have added an exception handler to ignore this condition. Fixed in e_3_7_m_3_5_x branch and head.