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


Java Path.SEPARATOR屬性代碼示例

本文整理匯總了Java中org.eclipse.core.runtime.Path.SEPARATOR屬性的典型用法代碼示例。如果您正苦於以下問題:Java Path.SEPARATOR屬性的具體用法?Java Path.SEPARATOR怎麽用?Java Path.SEPARATOR使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.eclipse.core.runtime.Path的用法示例。


在下文中一共展示了Path.SEPARATOR屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: computeXPath

private void computeXPath(Node node,XPathGridRow xPathGridRow,String computedXpath,List<GridRow> schemaRecords,String loopXPathQuery) {
	org.w3c.dom.NodeList nodeList=node.getChildNodes();
	
	if(!hasChild(node)){
		xPathGridRow.setXPath(computedXpath+node.getNodeName());
	
		if(StringUtils.isNotBlank(loopXPathQuery)){
			xPathGridRow.setAbsolutexPath(loopXPathQuery+Path.SEPARATOR+xPathGridRow.getXPath());
		}else{
			xPathGridRow.setAbsolutexPath(xPathGridRow.getXPath());
		}
		schemaRecords.add(xPathGridRow);
	}else{
		
		computedXpath=computedXpath+node.getNodeName()+Path.SEPARATOR;
		for(int i=0;i<nodeList.getLength();i++){
			Node nod = nodeList.item(i);
			
			if(nod.getNodeType()==Node.ELEMENT_NODE){
				XPathGridRow xPathGridRowChild=new XPathGridRow();
				String fieldName=nod.getNodeName();
				if(fieldName.contains(":")){
					fieldName=fieldName.split(":")[1];
				}
				xPathGridRowChild.setFieldName(fieldName);
	        	addDataTypeToGridRow(nod,xPathGridRowChild);
	        	xPathGridRowChild.setDateFormat("");
	        	xPathGridRowChild.setPrecision("");
	        	xPathGridRowChild.setScale("");
	        	xPathGridRowChild.setScaleType(Integer.valueOf(Constants.DEFAULT_INDEX_VALUE_FOR_COMBOBOX));
	        	xPathGridRowChild.setDescription("");
				computeXPath(nod,xPathGridRowChild,computedXpath,schemaRecords,loopXPathQuery);
			}
			
		}
		
	}
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:38,代碼來源:XMLUtil.java

示例2: getAbsolutePath

private String getAbsolutePath(IJavaProject jProject, String packageName) {
	try {
		return JavaRuntime.computeDefaultRuntimeClassPath(jProject)[0]
				+ (Path.SEPARATOR + packageName.replace(".", "/") + Path.SEPARATOR);
	} catch (CoreException e) {
		e.printStackTrace();
		throw new RuntimeException(e);
	}
}
 
開發者ID:bsteker,項目名稱:bdf2,代碼行數:9,代碼來源:SelectClassPage.java

示例3: makeXPathAbsoluteIfNot

private Path makeXPathAbsoluteIfNot(String xPath,String loopXPathQuery){
	if(StringUtils.isNotBlank(loopXPathQuery) && !xPath.startsWith(loopXPathQuery)){
		xPath=loopXPathQuery+Path.SEPARATOR+xPath;
	}
	return new Path(xPath);
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:6,代碼來源:SchemaRowValidation.java


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