本文整理匯總了Java中org.eclipse.core.resources.IResource.isDerived方法的典型用法代碼示例。如果您正苦於以下問題:Java IResource.isDerived方法的具體用法?Java IResource.isDerived怎麽用?Java IResource.isDerived使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.core.resources.IResource
的用法示例。
在下文中一共展示了IResource.isDerived方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: visit
import org.eclipse.core.resources.IResource; //導入方法依賴的package包/類
@Override
public boolean visit(IResourceDelta delta) throws CoreException
{
IResource resource = delta.getResource();
if( resource.isDerived() )
{
return false;
}
if( resource.getType() == IResource.FILE )
{
IFile file = (IFile) resource;
IProject project = resource.getProject();
if( file.equals(JPFProject.getManifest(project)) )
{
manifestChanged = true;
return false;
}
}
return true;
}
示例2: visit
import org.eclipse.core.resources.IResource; //導入方法依賴的package包/類
@Override
public boolean visit(IResourceDelta delta) throws CoreException
{
if( delta != null )
{
final IResource resource = delta.getResource();
if( !resource.isDerived() )
{
switch( resource.getType() )
{
case IResource.ROOT:
return true;
case IResource.PROJECT: {
IProject project = (IProject) resource;
int kind = delta.getKind();
int flags = delta.getFlags();
if( isInterestingProject(project)
&& (kind == IResourceDelta.ADDED || (flags & IResourceDelta.OPEN) != 0 || (kind == IResourceDelta.CHANGED
&& (flags & IResourceDelta.DESCRIPTION) != 0 && !isProjectKnown(project))) )
{
createModel(project, true);
return false;
}
else if( kind == IResourceDelta.REMOVED )
{
removeModel(project);
return false;
}
return true;
}
case IResource.FOLDER:
return isInterestingFolder((IFolder) resource);
case IResource.FILE:
// do not process
if( isContentChange(delta) )
{
handleFileDelta(delta);
return false;
}
}
}
}
return false;
}