Bug 15711 - Able to disable the platform
Summary: Able to disable the platform
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Dejan Glozic CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-10 01:09 EDT by Vlad Klicnik CLA
Modified: 2002-05-12 21:34 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Klicnik CLA 2002-05-10 01:09:38 EDT
I am able to disable the platform feature (one with boot) and blow away my 
ability to start up again (runtime plugins unconfigured)
Comment 1 Christophe Elek CLA 2002-05-12 13:16:34 EDT
Apparently UI Team worked on it.
Pass to UI team for confirmation
Comment 2 Dejan Glozic CLA 2002-05-12 13:22:09 EDT
Please provide the build number. The code in HEAD has a safety for that 
situation (check org.eclipse.update.internal.ui.ActivityConstraints.java).
Comment 3 Vlad Klicnik CLA 2002-05-12 14:06:39 EDT
Running with 20020510 *plus* updatecore.jar and updateui.jar exported from HEAD 
5/12 2PM

* I start with the above drop and fresh workspace
* eclipse comes up, UM is showing the features it picked up on startup
* select the platform feature ... [Disable] button is showing
* I press it .... nothing happens, but the following is written to log

!MESSAGE org.eclipse.update.internal.core.TargetFeature
!STACK java.lang.ClassCastException: 
org.eclipse.update.internal.core.TargetFeature
	at 
org.eclipse.update.internal.ui.forms.ActivityConstraints.validatePrereqs
(ActivityConstraints.java:233)
	at 
org.eclipse.update.internal.ui.forms.ActivityConstraints.validateUnconfigure
(ActivityConstraints.java:76)
	at 
org.eclipse.update.internal.ui.forms.ActivityConstraints.validatePendingChange
(ActivityConstraints.java:27)
	at org.eclipse.update.internal.ui.forms.DetailsForm.executeJob
(DetailsForm.java:659)
	at org.eclipse.update.internal.ui.forms.DetailsForm.doButtonSelected
(DetailsForm.java:691)
	at org.eclipse.update.internal.ui.forms.DetailsForm.access$11
(DetailsForm.java:679)
	at org.eclipse.update.internal.ui.forms.DetailsForm$4.widgetSelected
(DetailsForm.java:330)
	at org.eclipse.swt.widgets.TypedListener.handleEvent
(TypedListener.java:85)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java
(Compiled Code))
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1432)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1221)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1062)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1045)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:739)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:450)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:176)
	at org.eclipse.core.launcher.Main.run(Main.java:614)
	at org.eclipse.core.launcher.Main.main(Main.java:451)

We should be either hiding the [Disable] button, *or* putting up an error 
dialog after you click it saying you are not allowed to disable the platform 
feature.
Comment 4 Vlad Klicnik CLA 2002-05-12 14:17:22 EDT
also see 15827
Comment 5 Dejan Glozic CLA 2002-05-12 14:35:33 EDT
The class below was supposed to test for the primary feature but it obviously 
bombed while doing it. There is nothing else we need to do in addition to 
fixing the exception - the class was supposed to show up an error dialog 
explaining that primary features must never be disabled.
Comment 6 Vlad Klicnik CLA 2002-05-12 17:40:23 EDT
Need to fix this.

Running with the constrains checks, I can no longer update PDE and JDT from the 
Nevada test site. I get this exception thrown, so I have no idea what the 
message would have been. I am guessing it is failing a prereq check, because 
PDE and JDT are the only 2 with prereqs and I can update all of the others
Comment 7 Dejan Glozic CLA 2002-05-12 21:34:13 EDT
I think I fixed the problem (a typo). I am also added an early exit from the 
check in case of the primary feature - no need to make other checks if the 
first one fails.