本文整理汇总了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;
}