本文整理汇总了Java中org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus类的典型用法代码示例。如果您正苦于以下问题:Java ParserEditStatus类的具体用法?Java ParserEditStatus怎么用?Java ParserEditStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ParserEditStatus类属于org.eclipse.gmf.runtime.common.ui.services.parser包,在下文中一共展示了ParserEditStatus类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getEditTextValidator
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus; //导入依赖的package包/类
/**
* @generated
*/
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
public String isValid(final Object value) {
if (value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
IParserEditStatus valid = (IParserEditStatus) getEditingDomain()
.runExclusive(
new RunnableWithResult.Impl<IParserEditStatus>() {
public void run() {
setResult(parser
.isValidEditString(
new EObjectAdapter(
element),
(String) value));
}
});
return valid.getCode() == ParserEditStatus.EDITABLE ? null
: valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
// shouldn't get here
return null;
}
};
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:36,代码来源:StateNameEditPart.java
示例2: isValidEditString
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus; //导入依赖的package包/类
/**
* @generated
*/
public IParserEditStatus isValidEditString(IAdaptable adapter,
String editString) {
ParsePosition pos = new ParsePosition(0);
Object[] values = getEditProcessor().parse(editString, pos);
if (values == null) {
return new ParserEditStatus(StatemachineDiagramEditorPlugin.ID,
IParserEditStatus.UNEDITABLE, NLS.bind(
Messages.MessageFormatParser_InvalidInputError,
new Integer(pos.getErrorIndex())));
}
return validateNewValues(values);
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:16,代码来源:MessageFormatParser.java
示例3: getEditTextValidator
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus; //导入依赖的package包/类
/**
* @generated
*/
public ICellEditorValidator getEditTextValidator() {
return new ICellEditorValidator() {
public String isValid(final Object value) {
if (value instanceof String) {
final EObject element = getParserElement();
final IParser parser = getParser();
try {
IParserEditStatus valid = (IParserEditStatus) getEditingDomain()
.runExclusive(new RunnableWithResult.Impl() {
public void run() {
setResult(parser.isValidEditString(
new EObjectAdapter(element),
(String) value));
}
});
return valid.getCode() == ParserEditStatus.EDITABLE ? null
: valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
// shouldn't get here
return null;
}
};
}
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:33,代码来源:ContractNameEditPart.java
示例4: validateNewValues
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus; //导入依赖的package包/类
/**
* @generated
*/
protected IParserEditStatus validateNewValues(Object[] values) {
if (values.length != editableFeatures.length) {
return ParserEditStatus.UNEDITABLE_STATUS;
}
for (int i = 0; i < values.length; i++) {
Object value = getValidNewValue(editableFeatures[i], values[i]);
if (value instanceof InvalidValue) {
return new ParserEditStatus(SmcDiagramEditorPlugin.ID,
IParserEditStatus.UNEDITABLE, value.toString());
}
}
return ParserEditStatus.EDITABLE_STATUS;
}
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:17,代码来源:AbstractParser.java
示例5: isValidEditString
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus; //导入依赖的package包/类
/**
* @generated
*/
public IParserEditStatus isValidEditString(IAdaptable adapter,
String editString) {
ParsePosition pos = new ParsePosition(0);
Object[] values = getEditProcessor().parse(editString, pos);
if (values == null) {
return new ParserEditStatus(SmcDiagramEditorPlugin.ID,
IParserEditStatus.UNEDITABLE, NLS.bind(
Messages.MessageFormatParser_InvalidInputError,
new Integer(pos.getErrorIndex())));
}
return validateNewValues(values);
}
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:16,代码来源:MessageFormatParser.java
示例6: isValidEditString
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus; //导入依赖的package包/类
/**
* @generated
*/
public IParserEditStatus isValidEditString(IAdaptable adapter,
String editString) {
ParsePosition pos = new ParsePosition(0);
Object[] values = getEditProcessor().parse(editString, pos);
if (values == null) {
return new ParserEditStatus(Wc2014DiagramEditorPlugin.ID,
IParserEditStatus.UNEDITABLE, NLS.bind(
Messages.MessageFormatParser_InvalidInputError,
new Integer(pos.getErrorIndex())));
}
return validateNewValues(values);
}
开发者ID:ggxx,项目名称:HelloBrazil,代码行数:16,代码来源:MessageFormatParser.java
示例7: isValidEditString
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus; //导入依赖的package包/类
/**
* @generated
*/
public IParserEditStatus isValidEditString(IAdaptable adapter,
String editString) {
ParsePosition pos = new ParsePosition(0);
Object[] values = getEditProcessor().parse(editString, pos);
if (values == null) {
return new ParserEditStatus(
SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorPlugin.ID,
IParserEditStatus.UNEDITABLE,
NLS.bind(
SimpleBPMN.diagram.part.Messages.MessageFormatParser_InvalidInputError,
new Integer(pos.getErrorIndex())));
}
return validateNewValues(values);
}
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:18,代码来源:MessageFormatParser.java
注:本文中的org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论