Java Code Examples for org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus#getCode()

The following examples show how to use org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus#getCode() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TaskNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 2
Source File: OpinionatedTaskNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 3
Source File: FieldNameTypeEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 4
Source File: WrappingLabel2EditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 5
Source File: ThrowLinkEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 6
Source File: StartTimerEventLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 7
Source File: EndMessageEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 8
Source File: WrappingLabel3EditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 9
Source File: ScriptTaskLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 10
Source File: ANDGatewayLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 11
Source File: InclusiveGatewayLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 12
Source File: SinkNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 13
Source File: StartEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 14
Source File: InclusiveGatewayLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 15
Source File: StartEventLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 16
Source File: IntermediateErrorCatchEventLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 17
Source File: IntermediateThrowMessageEventLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 18
Source File: ThrowLinkEventLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 19
Source File: TypeNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}
 
Example 20
Source File: ReceiveTaskLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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;
		}
	};
}