• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java IStructureComparator类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.compare.structuremergeviewer.IStructureComparator的典型用法代码示例。如果您正苦于以下问题:Java IStructureComparator类的具体用法?Java IStructureComparator怎么用?Java IStructureComparator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IStructureComparator类属于org.eclipse.compare.structuremergeviewer包,在下文中一共展示了IStructureComparator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getChildren

import org.eclipse.compare.structuremergeviewer.IStructureComparator; //导入依赖的package包/类
@Override
public Object[] getChildren() {
    if (resourceFilter == null) {
        return super.getChildren();
    }

    if (children == null) {
        children = new ArrayList();
        if (getResource() instanceof IContainer) {
            try {
                final IResource[] members =
                    Resources.getFilteredMembers((IContainer) getResource(), resourceFilter);

                for (int i = 0; i < members.length; i++) {
                    final IStructureComparator child = createChild(members[i], resourceFilter);
                    if (child != null) {
                        children.add(child);
                    }
                }
            } catch (final CoreException ex) {
                // NeedWork
            }
        }
    }
    return children.toArray();
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:27,代码来源:CustomResourceNode.java


示例2: getChildren

import org.eclipse.compare.structuremergeviewer.IStructureComparator; //导入依赖的package包/类
@Override
public Object[] getChildren() {
    if (children == null) {
        children = new ArrayList();

        if (file.isDirectory()) {
            final File[] fileChildren = file.listFiles();

            for (int i = 0; i < fileChildren.length; i++) {
                final IStructureComparator child = createChild(fileChildren[i]);
                if (child != null) {
                    children.add(child);
                }
            }
        }
    }

    return children.toArray();
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:20,代码来源:NonWorkspaceFileNode.java


示例3: getChildren

import org.eclipse.compare.structuremergeviewer.IStructureComparator; //导入依赖的package包/类
public Object[] getChildren() {
    if (fChildren == null) {
        fChildren= new ArrayList();
        if (svnResource instanceof ISVNLocalFolder) {
            try {
                ISVNLocalResource[] members = (ISVNLocalResource[])((ISVNLocalFolder)svnResource).members(null, ISVNFolder.ALL_EXISTING_UNIGNORED_MEMBERS);
                for (int i= 0; i < members.length; i++) {
                	if (include(members[i])) {
                     IStructureComparator child= createChild(members[i]);
                     if (child != null)
                         fChildren.add(child);
                	}
                }
            } catch (CoreException ex) {
                // NeedWork
            }
        }
    }
    return fChildren.toArray();
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:21,代码来源:SVNLocalResourceSummaryNode.java


示例4: getChildren

import org.eclipse.compare.structuremergeviewer.IStructureComparator; //导入依赖的package包/类
public Object[] getChildren() {
    if (fChildren == null) {
        fChildren= new ArrayList();
      if (remoteResource instanceof ResourceEditionNode) {
         try {
         	if (!getLocalResource().isDirty() && getLocalResource().getResource().getProjectRelativePath().toString().equals(remoteResource.getRemoteResource().getProjectRelativePath()) &&
         			getLocalResource().getStatus().getLastChangedRevision().equals(remoteResource.getRemoteResource().getLastChangedRevision())) {
         		return fChildren.toArray();
         	}
         }
         catch(CoreException e) {
	SVNUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
}
     }

        if (svnResource instanceof ISVNLocalFolder) {
            try {
                ISVNLocalResource[] members = (ISVNLocalResource[])((ISVNLocalFolder)svnResource).members(null, ISVNFolder.ALL_EXISTING_UNIGNORED_MEMBERS);
                for (int i= 0; i < members.length; i++) {
                    IStructureComparator child= createChild(members[i]);
                    if (child != null)
                        fChildren.add(child);
                }
            } catch (CoreException ex) {
                // NeedWork
            }
        }
    }
    return fChildren.toArray();
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:31,代码来源:SVNLocalResourceNode.java


示例5: getStructure

import org.eclipse.compare.structuremergeviewer.IStructureComparator; //导入依赖的package包/类
/**
 * @param input implement the IStreamContentAccessor interface
 * @return a tree of JavaNodes for the given input.
 * In case of error null is returned.
 */
@Override
public IStructureComparator getStructure(final Object input) {
	String contents= null;
	char[] buffer= null;
	IDocument doc= CompareUI.getDocument(input);
	if (doc == null) {
		if (input instanceof IStreamContentAccessor) {
			IStreamContentAccessor sca= (IStreamContentAccessor) input;
			try {
				contents= JavaCompareUtilities.readString(sca);
			} catch (CoreException ex) {
				// return null indicates the error.
				return null;
			}
		}

		if (contents != null) {
			int n= contents.length();
			buffer= new char[n];
			contents.getChars(0, n, buffer, 0);

			doc= new Document(contents);
			setupDocument(doc);
		}
	}

	return createStructureComparator(input, buffer, doc, null, null);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:34,代码来源:JavaStructureCreator.java


示例6: createStructureComparator

import org.eclipse.compare.structuremergeviewer.IStructureComparator; //导入依赖的package包/类
@Override
protected IStructureComparator createStructureComparator(Object input,
		IDocument document, ISharedDocumentAdapter sharedDocumentAdapter,
		IProgressMonitor monitor) throws CoreException {

	final boolean isEditable;
	if (input instanceof IEditableContent)
		isEditable= ((IEditableContent) input).isEditable();
	else
		isEditable= false;

	DocumentRangeNode root= new StructureRootNode(document, input, this, sharedDocumentAdapter) {
		@Override
		public boolean isEditable() {
			return isEditable;
		}
	};

	try {
		monitor = beginWork(monitor);
		parsePropertyFile(root, document, monitor);
	} finally {
		monitor.done();
	}

	return root;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:28,代码来源:PropertiesStructureCreator.java


示例7: getStructure

import org.eclipse.compare.structuremergeviewer.IStructureComparator; //导入依赖的package包/类
private IStructureComparator getStructure(IResource input) {
	
	if (input instanceof IContainer)
		return new FilteredBufferedResourceNode(input);
		
	if (input instanceof IFile) {
		IStructureComparator rn= new FilteredBufferedResourceNode(input);
		IFile file= (IFile) input;
		String type= normalizeCase(file.getFileExtension());
		if ("JAR".equals(type) || "ZIP".equals(type)) //$NON-NLS-2$ //$NON-NLS-1$
			return new ZipFileStructureCreator().getStructure(rn);
		return rn;
	}
	return null;
}
 
开发者ID:anatlyzer,项目名称:anatlyzer,代码行数:16,代码来源:MyCompareInput.java


示例8: createChild

import org.eclipse.compare.structuremergeviewer.IStructureComparator; //导入依赖的package包/类
protected IStructureComparator createChild(ISVNLocalResource child) {
	return new SVNLocalResourceNode(child);
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:4,代码来源:SVNLocalResourceNode.java


示例9: createChild

import org.eclipse.compare.structuremergeviewer.IStructureComparator; //导入依赖的package包/类
protected IStructureComparator createChild(ISVNLocalResource child) {
	return new SVNLocalResourceSummaryNode(child, diffSummary, rootLocation);
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:4,代码来源:SVNLocalResourceSummaryNode.java


示例10: createChild

import org.eclipse.compare.structuremergeviewer.IStructureComparator; //导入依赖的package包/类
protected IStructureComparator createChild(IResource child) {
	return new BufferedResourceNode(child);
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:4,代码来源:BufferedResourceNode.java


示例11: createStructureComparator

import org.eclipse.compare.structuremergeviewer.IStructureComparator; //导入依赖的package包/类
@Override
protected IStructureComparator createStructureComparator(Object element,
		IDocument document, ISharedDocumentAdapter sharedDocumentAdapter,
		IProgressMonitor monitor) throws CoreException {
	return createStructureComparator(element, null, document, sharedDocumentAdapter, monitor);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:7,代码来源:JavaStructureCreator.java


示例12: locate

import org.eclipse.compare.structuremergeviewer.IStructureComparator; //导入依赖的package包/类
@Override
public IStructureComparator locate(Object path, Object source) {
	return null;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:5,代码来源:PropertiesStructureCreator.java


示例13: createChild

import org.eclipse.compare.structuremergeviewer.IStructureComparator; //导入依赖的package包/类
protected IStructureComparator createChild(IResource child) {
	String name= child.getName();
	if (CompareUIPlugin.getDefault().filter(name, child instanceof IContainer, false))
		return null;
	return new FilteredBufferedResourceNode(child);
}
 
开发者ID:anatlyzer,项目名称:anatlyzer,代码行数:7,代码来源:MyCompareInput.java


示例14: createChild

import org.eclipse.compare.structuremergeviewer.IStructureComparator; //导入依赖的package包/类
/**
 * Subclasses must override this method to instantiate the proper type of
 * object when creating child nodes.
 */
protected IStructureComparator createChild(final IResource child, final ResourceFilter resourceFilter) {
    return new CustomResourceNode(child, resourceFilter);
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:8,代码来源:CustomResourceNode.java


示例15: createChild

import org.eclipse.compare.structuremergeviewer.IStructureComparator; //导入依赖的package包/类
/**
 * Subclasses must override this method to instantiate the proper type of
 * object when creating child nodes.
 */
protected IStructureComparator createChild(final File child) {
    return new NonWorkspaceFileNode(child);
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:8,代码来源:NonWorkspaceFileNode.java



注:本文中的org.eclipse.compare.structuremergeviewer.IStructureComparator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java JsonParserFactory类代码示例发布时间:2022-05-22
下一篇:
Java GraphicsConfig类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap