当前位置: 首页>>代码示例>>Java>>正文


Java TextProcessor.deprocess方法代码示例

本文整理汇总了Java中org.eclipse.osgi.util.TextProcessor.deprocess方法的典型用法代码示例。如果您正苦于以下问题:Java TextProcessor.deprocess方法的具体用法?Java TextProcessor.deprocess怎么用?Java TextProcessor.deprocess使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.osgi.util.TextProcessor的用法示例。


在下文中一共展示了TextProcessor.deprocess方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isValidPrefix

import org.eclipse.osgi.util.TextProcessor; //导入方法依赖的package包/类
@Override
protected boolean isValidPrefix(String prefix) {
  String word = TextProcessor.deprocess(getDisplayString());
  if (isInJavadoc()) {
    int idx = word.indexOf("{@link "); // $NON-NLS-1$
    if (idx == 0) {
      word = word.substring(7);
    } else {
      idx = word.indexOf("{@value "); // $NON-NLS-1$
      if (idx == 0) {
        word = word.substring(8);
      }
    }
  } else if (word.indexOf("this.") != -1) { // $NON-NLS-1$
    word = word.substring(word.indexOf("this.") + 5); // $NON-NLS-1$
  }
  return isPrefix(prefix, word);
}
 
开发者ID:eclipse,项目名称:che,代码行数:19,代码来源:JavaCompletionProposal.java

示例2: isValidPrefix

import org.eclipse.osgi.util.TextProcessor; //导入方法依赖的package包/类
@Override
protected boolean isValidPrefix(String prefix) {
  if (super.isValidPrefix(prefix)) return true;

  String word = TextProcessor.deprocess(getDisplayString());
  if (fProposal.getKind() == CompletionProposal.CONSTRUCTOR_INVOCATION) {
    int start =
        word.indexOf(JavaElementLabels.CONCAT_STRING) + JavaElementLabels.CONCAT_STRING.length();
    word = word.substring(start);
    return isPrefix(prefix, word) || isPrefix(prefix, new String(fProposal.getName()));
  }

  if (isInJavadoc()) {
    int idx = word.indexOf("{@link "); // $NON-NLS-1$
    if (idx == 0) {
      word = word.substring(7);
    } else {
      idx = word.indexOf("{@value "); // $NON-NLS-1$
      if (idx == 0) {
        word = word.substring(8);
      }
    }
  }
  return isPrefix(prefix, word);
}
 
开发者ID:eclipse,项目名称:che,代码行数:26,代码来源:JavaMethodCompletionProposal.java

示例3: getQualifiedName

import org.eclipse.osgi.util.TextProcessor; //导入方法依赖的package包/类
private String getQualifiedName(Object element) throws JavaModelException {
	if (element instanceof IResource)
		return ((IResource)element).getFullPath().toString();

	if (element instanceof IJarEntryResource)
		return ((IJarEntryResource)element).getFullPath().toString();

	if (element instanceof LogicalPackage)
		return ((LogicalPackage)element).getElementName();

	if (element instanceof IJavaProject || element instanceof IPackageFragmentRoot || element instanceof ITypeRoot) {
		IResource resource= ((IJavaElement)element).getCorrespondingResource();
		if (resource != null)
			return getQualifiedName(resource);
	}

	if (element instanceof IBinding)
		return BindingLabelProvider.getBindingLabel((IBinding)element, LABEL_FLAGS);

	return TextProcessor.deprocess(JavaElementLabels.getTextLabel(element, LABEL_FLAGS));
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:22,代码来源:CopyQualifiedNameAction.java

示例4: isValidPrefix

import org.eclipse.osgi.util.TextProcessor; //导入方法依赖的package包/类
@Override
protected boolean isValidPrefix(String prefix) {
	String word= TextProcessor.deprocess(getDisplayString());
	if (isInJavadoc()) {
		int idx = word.indexOf("{@link "); //$NON-NLS-1$
		if (idx==0) {
			word = word.substring(7);
		} else {
			idx = word.indexOf("{@value "); //$NON-NLS-1$
			if (idx==0) {
				word = word.substring(8);
			}
		}
	} else if (word.indexOf("this.") != -1) { //$NON-NLS-1$
		word= word.substring(word.indexOf("this.") + 5); //$NON-NLS-1$
	}
	return isPrefix(prefix, word);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:19,代码来源:JavaCompletionProposal.java

示例5: isValidPrefix

import org.eclipse.osgi.util.TextProcessor; //导入方法依赖的package包/类
@Override
protected boolean isValidPrefix(String prefix) {
	if (super.isValidPrefix(prefix))
		return true;

	String word= TextProcessor.deprocess(getDisplayString());
	if (fProposal.getKind() == CompletionProposal.CONSTRUCTOR_INVOCATION) {
		int start= word.indexOf(JavaElementLabels.CONCAT_STRING) + JavaElementLabels.CONCAT_STRING.length();
		word= word.substring(start);
		return isPrefix(prefix, word) || isPrefix(prefix, new String(fProposal.getName()));
	}

	if (isInJavadoc()) {
		int idx = word.indexOf("{@link "); //$NON-NLS-1$
		if (idx==0) {
			word = word.substring(7);
		} else {
			idx = word.indexOf("{@value "); //$NON-NLS-1$
			if (idx==0) {
				word = word.substring(8);
			}
		}
	}
	return isPrefix(prefix, word);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:26,代码来源:JavaMethodCompletionProposal.java

示例6: select

import org.eclipse.osgi.util.TextProcessor; //导入方法依赖的package包/类
@Override
public boolean select(Viewer viewer, Object parentElement, Object element)
{
    PatternMatcher matcher = getMatcher();

    if (matcher == null || !(viewer instanceof TreeViewer))
    {
        return true;
    }

    TreeViewer treeViewer = (TreeViewer) viewer;

    String matchName = getText(element, treeViewer);
    matchName = TextProcessor.deprocess(matchName);

    if (matchName != null
            && matcher.matches(matchName)
            && (isOpenable(element)
                    || !(element instanceof TreeParent)))
    {
        return true;
    }

    return hasUnfilteredChild(treeViewer, element);
}
 
开发者ID:anjlab,项目名称:eclipse-tapestry5-plugin,代码行数:26,代码来源:AbstractTapestryContextInformation.java

示例7: copyToClipboard

import org.eclipse.osgi.util.TextProcessor; //导入方法依赖的package包/类
private void copyToClipboard(String text, Shell shell) {
	text = TextProcessor.deprocess(text);
	Clipboard clipboard = new Clipboard(shell.getDisplay());
	try {
		copyToClipboard(clipboard, text, shell);
	} finally {
		clipboard.dispose();
	}
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:10,代码来源:CopyToClipboardAction.java

示例8: select

import org.eclipse.osgi.util.TextProcessor; //导入方法依赖的package包/类
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
	StringMatcher matcher = getMatcher();
	if (matcher == null || !(viewer instanceof TreeViewer))
		return true;
	TreeViewer treeViewer = (TreeViewer) viewer;

	String matchName = ((ILabelProvider) treeViewer.getLabelProvider()).getText(element);
	matchName = TextProcessor.deprocess(matchName);
	if (matchName != null && matcher.match(matchName))
		return true;

	return hasUnfilteredChild(treeViewer, element);
}
 
开发者ID:cplutte,项目名称:bts,代码行数:15,代码来源:QuickOutlinePopup.java

示例9: select

import org.eclipse.osgi.util.TextProcessor; //导入方法依赖的package包/类
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
	JavaElementPrefixPatternMatcher matcher= getMatcher();
	if (matcher == null || !(viewer instanceof TreeViewer))
		return true;
	TreeViewer treeViewer= (TreeViewer) viewer;

	String matchName= ((ILabelProvider) treeViewer.getLabelProvider()).getText(element);
	matchName= TextProcessor.deprocess(matchName);
	if (matchName != null && matcher.matches(matchName))
		return true;

	return hasUnfilteredChild(treeViewer, element);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:15,代码来源:AbstractInformationControl.java

示例10: getName

import org.eclipse.osgi.util.TextProcessor; //导入方法依赖的package包/类
private String getName(IResource resource){
	return TextProcessor.deprocess(fLabelProvider.getText(resource));
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:4,代码来源:CopyToClipboardAction.java


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