View | Details | Raw Unified | Return to bug 338182
Collapse All | Expand All

(-)src/org/eclipse/pde/internal/core/RequiredPluginsInitializer.java (-7 / +28 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 *  Copyright (c) 2000, 2008 IBM Corporation and others.
2
 *  Copyright (c) 2000, 2011 IBM Corporation and others.
3
 *  All rights reserved. This program and the accompanying materials
3
 *  All rights reserved. This program and the accompanying materials
4
 *  are made available under the terms of the Eclipse Public License v1.0
4
 *  are made available under the terms of the Eclipse Public License v1.0
5
 *  which accompanies this distribution, and is available at
5
 *  which accompanies this distribution, and is available at
Lines 11-22 Link Here
11
package org.eclipse.pde.internal.core;
11
package org.eclipse.pde.internal.core;
12
12
13
import org.eclipse.core.resources.IProject;
13
import org.eclipse.core.resources.IProject;
14
import org.eclipse.core.runtime.CoreException;
14
import org.eclipse.core.runtime.*;
15
import org.eclipse.core.runtime.IPath;
15
import org.eclipse.jdt.core.*;
16
import org.eclipse.jdt.core.ClasspathContainerInitializer;
17
import org.eclipse.jdt.core.IClasspathContainer;
18
import org.eclipse.jdt.core.IJavaProject;
19
import org.eclipse.jdt.core.JavaCore;
20
import org.eclipse.pde.core.plugin.IPluginModelBase;
16
import org.eclipse.pde.core.plugin.IPluginModelBase;
21
import org.eclipse.pde.core.plugin.PluginRegistry;
17
import org.eclipse.pde.core.plugin.PluginRegistry;
22
18
Lines 50-53 Link Here
50
	public String getDescription(IPath containerPath, IJavaProject project) {
46
	public String getDescription(IPath containerPath, IJavaProject project) {
51
		return PDECoreMessages.RequiredPluginsClasspathContainer_description;
47
		return PDECoreMessages.RequiredPluginsClasspathContainer_description;
52
	}
48
	}
49
50
	/* (non-Javadoc)
51
	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#getSourceAttachmentStatus(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
52
	 */
53
	public IStatus getSourceAttachmentStatus(IPath containerPath, IJavaProject project) {
54
		// Allow custom source attachments for classpath containers (Bug 338182)
55
		return Status.OK_STATUS;
56
	}
57
58
	/* (non-Javadoc)
59
	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#canUpdateClasspathContainer(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
60
	 */
61
	public boolean canUpdateClasspathContainer(IPath containerPath, IJavaProject project) {
62
		// The only supported update is to modify the source attachment
63
		return true;
64
	}
65
66
	/* (non-Javadoc)
67
	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#requestClasspathContainerUpdate(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject, org.eclipse.jdt.core.IClasspathContainer)
68
	 */
69
	public void requestClasspathContainerUpdate(IPath containerPath, IJavaProject project, IClasspathContainer containerSuggestion) throws CoreException {
70
		// The only supported update is to modify the source attachment
71
		JavaCore.setClasspathContainer(containerPath, new IJavaProject[] {project}, new IClasspathContainer[] {containerSuggestion}, null);
72
	}
73
53
}
74
}

Return to bug 338182