本文整理汇总了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);
}
示例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);
}
示例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));
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
}
示例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);
}
示例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);
}
示例10: getName
import org.eclipse.osgi.util.TextProcessor; //导入方法依赖的package包/类
private String getName(IResource resource){
return TextProcessor.deprocess(fLabelProvider.getText(resource));
}