use of org.eclipse.gmf.runtime.common.ui.services.parser.IParser in project tdi-studio-se by Talend.
the class DocumentBusinessItemNameEditPart method getEditTextValidator.
/**
* @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 e) {
// ie.printStackTrace();
ExceptionHandler.process(e);
}
}
// shouldn't get here
return null;
}
};
}
use of org.eclipse.gmf.runtime.common.ui.services.parser.IParser in project tdi-studio-se by Talend.
the class EllipseBusinessItemNameEditPart method getEditTextValidator.
/**
* @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();
ExceptionHandler.process(ie);
}
}
// shouldn't get here
return null;
}
};
}
use of org.eclipse.gmf.runtime.common.ui.services.parser.IParser in project tdi-studio-se by Talend.
the class GearBusinessItemNameEditPart method getEditTextValidator.
/**
* @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();
ExceptionHandler.process(ie);
}
}
// shouldn't get here
return null;
}
};
}
use of org.eclipse.gmf.runtime.common.ui.services.parser.IParser in project tdi-studio-se by Talend.
the class DirectionalBusinessItemRelationshipNameEditPart method getEditTextValidator.
/**
* @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 e) {
// ie.printStackTrace();
ExceptionHandler.process(e);
}
}
// shouldn't get here
return null;
}
};
}
use of org.eclipse.gmf.runtime.common.ui.services.parser.IParser in project tdi-studio-se by Talend.
the class InputBusinessItemNameEditPart method getEditTextValidator.
/**
* @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();
ExceptionHandler.process(ie);
}
}
// shouldn't get here
return null;
}
};
}
Aggregations