Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331896 - Cannot add child modules to non-workspace modules
Summary: Cannot add child modules to non-workspace modules
Status: CLOSED DUPLICATE of bug 333873
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: wst.server (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Angel Vera CLA
QA Contact: Angel Vera CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-06 08:47 EST by Richard Gregory CLA
Modified: 2011-01-10 11:50 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Gregory CLA 2010-12-06 08:47:45 EST
Build Identifier: 3.2.1.v201007071800

Server.getChildModules doesn't call server delegate for non-workspace modules:

	/*
	 * @see IServer#getChildModule(IModule[])
	 */
	public IModule[] getChildModules(IModule[] module, IProgressMonitor monitor) {
		if (module == null || module.length == 0)
			throw new IllegalArgumentException("Module cannot be null or empty");
		try {
			int i = module.length - 1;
			if (module[i].getProject() == null || !module[i].getProject().isAccessible())
				return null;  <== This is the case for non-workspace modules

                        // This doesn't get a chance to run...
			ServerDelegate sd = getDelegate(monitor); 
			if (sd == null)
				return null;
			IModule[] children = sd.getChildModules(module);


Reproducible: Always

Steps to Reproduce:
1. Create a new module type that does not have an IProject.
2. Try to add child modules to it.
3. getChildModules will always return null per the comments above.
Comment 1 Angel Vera CLA 2010-12-06 10:18:04 EST
Moving to Server tools..
Comment 2 Angel Vera CLA 2011-01-10 11:50:36 EST

*** This bug has been marked as a duplicate of bug 333873 ***