use of com.ibm.icu.util.StringTokenizer in project webtools.sourceediting by eclipse.
the class OpenFileHyperlinkTracker method computeStateMask.
private int computeStateMask(String modifiers) {
if (modifiers == null)
return -1;
if (modifiers.length() == 0)
return SWT.NONE;
int stateMask = 0;
// $NON-NLS-1$
StringTokenizer modifierTokenizer = new StringTokenizer(modifiers, ",;.:+-* ");
while (modifierTokenizer.hasMoreTokens()) {
int modifier = EditorUtility.findLocalizedModifier(modifierTokenizer.nextToken());
if (modifier == 0 || (stateMask & modifier) == modifier)
return -1;
stateMask = stateMask | modifier;
}
return stateMask;
}
use of com.ibm.icu.util.StringTokenizer in project webtools.sourceediting by eclipse.
the class BeanInfoProvider method getTypeQualifiedName.
/**
* @param typeName
* @return a Qualified name with the package as the qualifier, and class name as LocalName
*/
private QualifiedName getTypeQualifiedName(String typeName) {
// $NON-NLS-1$
StringTokenizer st = new StringTokenizer(typeName, ".", false);
int length = st.countTokens();
int count = 0;
StringBuffer root = new StringBuffer();
while (count++ < length - 1) {
root.append(st.nextToken());
if (count < length - 1)
root.append('.');
}
return new QualifiedName(root.toString(), st.nextToken());
}
use of com.ibm.icu.util.StringTokenizer in project webtools.sourceediting by eclipse.
the class Logger method _trace.
/**
* Prints message to log if category matches /debug/tracefilter option.
*
* @param message
* text to print
* @param category
* category of the message, to be compared with
* /debug/tracefilter
*/
protected static void _trace(String category, String message, Throwable exception) {
if (!isDebugging())
return;
String traceFilter = Platform.getDebugOption(PLUGIN_ID + TRACEFILTER_LOCATION);
if (traceFilter != null) {
// $NON-NLS-1$
StringTokenizer tokenizer = new StringTokenizer(traceFilter, ",");
while (tokenizer.hasMoreTokens()) {
String cat = tokenizer.nextToken().trim();
if (category.equals(cat)) {
Status statusObj = new Status(IStatus.OK, PLUGIN_ID, IStatus.OK, message, exception);
Bundle bundle = Platform.getBundle(PLUGIN_ID);
if (bundle != null)
Platform.getLog(bundle).log(statusObj);
return;
}
}
}
}
use of com.ibm.icu.util.StringTokenizer in project webtools.sourceediting by eclipse.
the class Logger method _trace.
/**
* Prints message to log if category matches /debug/tracefilter option.
*
* @param message
* text to print
* @param category
* category of the message, to be compared with
* /debug/tracefilter
*/
protected static void _trace(String category, String message, Throwable exception) {
if (!isDebugging())
return;
String traceFilter = Platform.getDebugOption(PLUGIN_ID + TRACEFILTER_LOCATION);
if (traceFilter != null) {
// $NON-NLS-1$
StringTokenizer tokenizer = new StringTokenizer(traceFilter, ",");
while (tokenizer.hasMoreTokens()) {
String cat = tokenizer.nextToken().trim();
if (category.equals(cat)) {
Status statusObj = new Status(IStatus.OK, PLUGIN_ID, IStatus.OK, message, exception);
Bundle bundle = Platform.getBundle(PLUGIN_ID);
if (bundle != null)
Platform.getLog(bundle).log(statusObj);
return;
}
}
}
}
use of com.ibm.icu.util.StringTokenizer in project webtools.sourceediting by eclipse.
the class NamespaceAttributeVisitor method visitXSISchemaLocationAttribute.
public void visitXSISchemaLocationAttribute(Attr attr, String value) {
StringTokenizer st = new StringTokenizer(value);
while (true) {
String nsURI = st.hasMoreTokens() ? st.nextToken() : null;
String locationHint = st.hasMoreTokens() ? st.nextToken() : null;
if (nsURI != null && locationHint != null) {
visitXSISchemaLocationValuePair(nsURI, locationHint);
} else {
break;
}
}
}
Aggregations