Bug 18025 - Cannot run or debug a plug-ins in a run-time workbench if this plug-ins already installed in the running eclipse
Summary: Cannot run or debug a plug-ins in a run-time workbench if this plug-ins alrea...
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows NT
: P1 normal (vote)
Target Milestone: 2.0 F2   Edit
Assignee: Dejan Glozic CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-28 07:33 EDT by Aurélien Pelletier CLA
Modified: 2002-05-30 15:37 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 Aurélien Pelletier CLA 2002-05-28 07:33:18 EDT
I create a simple Hello World plugins with the wizard.
Use the run time workbench to test it, everything fine
Stop the run-time workench
Stop eclipse
Had to my eclipse plugins directory this newly created plugin
Restart eclipse
The plugin work fine
Made a few change to my plug-ins
and start the run-time workbench with the following option in "Plug-ins & 
Fragment" tab:
my plug-ins is selected in workspace plug-ins but not in external plug-ins
But when I try to use this plug-ins in the run-time workbench I'm running the 
same plug-ins as the one installed in eclipse and not the plug-ins from my 
workbench with the modifications

The only solution I found is to disabled the plugin from my eclipse 
installation before running it and trying to debug the plug-ins.

I'm using F1

Aurélien
Comment 1 Rodrigo Peretti CLA 2002-05-28 13:21:36 EDT
Have you recompiled your plug-in? Please provide detailed steps to reproduce 
the problem (like using one of the Plug-ins provided by the New Plug-in 
Project wizard. Thanks.
Comment 2 Aurélien Pelletier CLA 2002-05-29 03:25:50 EDT
I did recompile my plugin 
here is the step by step...

- create a Hello World plug-in with the Plug-in Developpement wizard

- install this plug-in in your eclipse plugins directory

- restart eclipse (you can now use this hello world plug-in in eclipse)

- modify the code in your plug-in (plug.action.SampleAction.run()) to 
display "Hello, another Eclipse world" instead of"Hello, Eclipse world" (save 
the file)

- Rebuilt your project (menu Project => Rebuilt Project)

- use menu Run => Run as=> run-time workbench

- in the tab "Plug-ins & Fragments" make sure your plug-in is selected in the 
workspace plug-ins section but not in external plug-ins section

- hit run

- in the run-time workbench try to use your hello world plugin it will 
display "Hello, Eclipse world" instead of the expected "Hello, another Eclipse 
world"


I'm using NT4 sp6, JDK 1.4, eclipse F1
Comment 3 Dejan Glozic CLA 2002-05-30 15:37:52 EDT
Aurelien, you are completely right - there is a bug in extracting the list 
of 'visible' plug-ins from the launch:

	if (es != null && es.state) {
		res.add(model);
	} else if (model.isEnabled())
	        res.add(model);

In the code above, if enable state is found and 'true', model is added to the 
list. Otherwise, if model is enabled, it is added.

This is wronge because if enable state exists but is false, it should prevent 
the model from being added to the list. The code above will default to checking 
model original state, which is set in the preferences. The UI is designed so 
that launch configuration settings have priority over preferences.

The fix is to use the following:

				if (es != null) {
					if(es.state)
						res.add(model);
				} else if (model.isEnabled())
					res.add(model);

I tried it and it shows the correct 'Hello, world' message (the one from 
the workspace).

What a difference a couple of characters make :-).