本文整理汇总了Java中org.eclipse.jdt.core.JavaCore.setClasspathContainer方法的典型用法代码示例。如果您正苦于以下问题:Java JavaCore.setClasspathContainer方法的具体用法?Java JavaCore.setClasspathContainer怎么用?Java JavaCore.setClasspathContainer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.core.JavaCore
的用法示例。
在下文中一共展示了JavaCore.setClasspathContainer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import org.eclipse.jdt.core.JavaCore; //导入方法依赖的package包/类
@Override
public void initialize(IPath containerPath, IJavaProject javaProject) throws CoreException
{
IProject project = javaProject.getProject();
IPluginModel model = JPFPluginModelManager.instance().findModel(project);
JavaCore.setClasspathContainer(containerPath, new IJavaProject[] { javaProject },
new IClasspathContainer[] { new JPFClasspathContainer(model) }, null);
}
示例2: run
import org.eclipse.jdt.core.JavaCore; //导入方法依赖的package包/类
@Override
protected IStatus run(IProgressMonitor monitor)
{
try
{
boolean more = false;
do
{
IJavaProject[] projects = null;
IClasspathContainer[] containers = null;
synchronized( fProjects )
{
projects = fProjects.toArray(new IJavaProject[fProjects.size()]);
containers = fContainers.toArray(new IClasspathContainer[fContainers.size()]);
fProjects.clear();
fContainers.clear();
}
JavaCore.setClasspathContainer(JPFClasspathPlugin.CONTAINER_PATH, projects, containers, monitor);
synchronized( fProjects )
{
more = !fProjects.isEmpty();
}
}
while( more );
}
catch( JavaModelException e )
{
return e.getStatus();
}
return Status.OK_STATUS;
}
示例3: initialize
import org.eclipse.jdt.core.JavaCore; //导入方法依赖的package包/类
@Override
public void initialize(IPath containerPath, IJavaProject project) throws CoreException {
GW4ELibrariesContainer container = new GW4ELibrariesContainer(containerPath, project);
JavaCore.setClasspathContainer(containerPath, new IJavaProject[] { project }, new IClasspathContainer[] { container }, null);
}
示例4: requestClasspathContainerUpdate
import org.eclipse.jdt.core.JavaCore; //导入方法依赖的package包/类
@Override
public void requestClasspathContainerUpdate(IPath containerPath, IJavaProject project, IClasspathContainer containerSuggestion) throws CoreException {
JavaCore.setClasspathContainer(containerPath, new IJavaProject[] { project }, new IClasspathContainer[] { containerSuggestion }, null);
}