本文整理匯總了Java中org.eclipse.core.resources.IProject.setSessionProperty方法的典型用法代碼示例。如果您正苦於以下問題:Java IProject.setSessionProperty方法的具體用法?Java IProject.setSessionProperty怎麽用?Java IProject.setSessionProperty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.core.resources.IProject
的用法示例。
在下文中一共展示了IProject.setSessionProperty方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: touchProject
import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
private void touchProject(IProject project)
{
if( WorkspacePluginModelManager.isPluginProject(project) )
{
try
{
// set session property on project
// to be read and reset in ManifestConsistencyChecker
project.setSessionProperty(JPFClasspathPlugin.TOUCH_PROJECT, Boolean.TRUE);
// touch project so that ManifestConsistencyChecker#build(..)
// gets invoked
project.touch(new NullProgressMonitor());
}
catch( CoreException e )
{
JPFClasspathLog.logError(e);
}
}
}
示例2: build
import org.eclipse.core.resources.IProject; //導入方法依賴的package包/類
@Override
protected IProject[] build(int kind, Map<String, String> args, IProgressMonitor monitor) throws CoreException
{
IProject project = getProject();
IResourceDelta delta = getDelta(project);
boolean doValidate = false;
if( delta == null )
{
doValidate = true;
}
else
{
if( Boolean.TRUE.equals(project.getSessionProperty(JPFClasspathPlugin.TOUCH_PROJECT)) )
{
project.setSessionProperty(JPFClasspathPlugin.TOUCH_PROJECT, null);
doValidate = true;
}
else
{
manifestVisitor.reset();
delta.accept(manifestVisitor);
doValidate = manifestVisitor.manifestChanged;
}
}
if( doValidate )
{
validateManifest(project);
}
return null;
}