當前位置: 首頁>>代碼示例>>Java>>正文


Java JavaCore.setClasspathContainer方法代碼示例

本文整理匯總了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);
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:9,代碼來源:JPFClasspathContainerInitializer.java

示例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;
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:33,代碼來源:JPFPluginModelManager.java

示例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);
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:6,代碼來源:ContainerInitializer.java

示例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);
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:5,代碼來源:ContainerInitializer.java


注:本文中的org.eclipse.jdt.core.JavaCore.setClasspathContainer方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。