org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter Java Examples

The following examples show how to use org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter. 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: WrappingLabel3EditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
public IContentAssistProcessor getCompletionProcessor() {
	if (getParserElement() == null || getParser() == null) {
		return null;
	}
	return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
}
 
Example #2
Source File: OpinionatedTaskNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
protected String getLabelText() {
	String text = null;
	EObject parserElement = getParserElement();
	if (parserElement != null && getParser() != null) {
		text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
	}
	if (text == null || text.length() == 0) {
		text = defaultText;
	}
	return text;
}
 
Example #3
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 #4
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 #5
Source File: OpinionatedTaskNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
public IContentAssistProcessor getCompletionProcessor() {
	if (getParserElement() == null || getParser() == null) {
		return null;
	}
	return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
}
 
Example #6
Source File: OpinionatedTaskNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
public String getEditText() {
	if (getParserElement() == null || getParser() == null) {
		return ""; //$NON-NLS-1$
	}
	return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
 
Example #7
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 #8
Source File: FieldNameTypeEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
public String getEditText() {
	if (getParserElement() == null || getParser() == null) {
		return ""; //$NON-NLS-1$
	}
	return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
 
Example #9
Source File: FieldNameTypeEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
protected String getLabelText() {
	String text = null;
	EObject parserElement = getParserElement();
	if (parserElement != null && getParser() != null) {
		text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
	}
	if (text == null || text.length() == 0) {
		text = defaultText;
	}
	return text;
}
 
Example #10
Source File: WrappingLabel2EditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
public IContentAssistProcessor getCompletionProcessor() {
	if (getParserElement() == null || getParser() == null) {
		return null;
	}
	return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
}
 
Example #11
Source File: FieldNameTypeEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
public IContentAssistProcessor getCompletionProcessor() {
	if (getParserElement() == null || getParser() == null) {
		return null;
	}
	return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
}
 
Example #12
Source File: ParameterNameValueEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
public IContentAssistProcessor getCompletionProcessor() {
	if (getParserElement() == null || getParser() == null) {
		return null;
	}
	return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
}
 
Example #13
Source File: ParameterNameValueEditPart.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 #14
Source File: CrossflowNewDiagramFileWizard.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
protected boolean validatePage() {
	if (getModelElement() == null) {
		setErrorMessage(Messages.CrossflowNewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
		return false;
	}
	boolean result = ViewService.getInstance()
			.provides(new CreateDiagramViewOperation(new EObjectAdapter(getModelElement()),
					WorkflowEditPart.MODEL_ID, CrossflowDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
	setErrorMessage(
			result ? null : Messages.CrossflowNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
	return result;
}
 
Example #15
Source File: CrossflowNavigatorLabelProvider.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
private String getParameter_3002Text(View view) {
	IParser parser = CrossflowParserProvider.getParser(CrossflowElementTypes.Parameter_3002,
			view.getElement() != null ? view.getElement() : view,
			CrossflowVisualIDRegistry.getType(ParameterNameValueEditPart.VISUAL_ID));
	if (parser != null) {
		return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view),
				ParserOptions.NONE.intValue());
	} else {
		CrossflowDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5014); //$NON-NLS-1$
		return ""; //$NON-NLS-1$
	}
}
 
Example #16
Source File: QueueNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
protected String getLabelText() {
	String text = null;
	EObject parserElement = getParserElement();
	if (parserElement != null && getParser() != null) {
		text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
	}
	if (text == null || text.length() == 0) {
		text = defaultText;
	}
	return text;
}
 
Example #17
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 #18
Source File: WrappingLabel3EditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
public String getEditText() {
	if (getParserElement() == null || getParser() == null) {
		return ""; //$NON-NLS-1$
	}
	return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
 
Example #19
Source File: WrappingLabel3EditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
protected String getLabelText() {
	String text = null;
	EObject parserElement = getParserElement();
	if (parserElement != null && getParser() != null) {
		text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
	}
	if (text == null || text.length() == 0) {
		text = defaultText;
	}
	return text;
}
 
Example #20
Source File: LanguageNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
public IContentAssistProcessor getCompletionProcessor() {
	if (getParserElement() == null || getParser() == null) {
		return null;
	}
	return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
}
 
Example #21
Source File: CrossflowNavigatorLabelProvider.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
private String getCommitmentTask_2007Text(View view) {
	IParser parser = CrossflowParserProvider.getParser(CrossflowElementTypes.CommitmentTask_2007,
			view.getElement() != null ? view.getElement() : view,
			CrossflowVisualIDRegistry.getType(CommitmentTaskNameEditPart.VISUAL_ID));
	if (parser != null) {
		return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view),
				ParserOptions.NONE.intValue());
	} else {
		CrossflowDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5007); //$NON-NLS-1$
		return ""; //$NON-NLS-1$
	}
}
 
Example #22
Source File: LanguageNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
public String getEditText() {
	if (getParserElement() == null || getParser() == null) {
		return ""; //$NON-NLS-1$
	}
	return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
 
Example #23
Source File: CrossflowNavigatorLabelProvider.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
private String getOpinionatedTask_2008Text(View view) {
	IParser parser = CrossflowParserProvider.getParser(CrossflowElementTypes.OpinionatedTask_2008,
			view.getElement() != null ? view.getElement() : view,
			CrossflowVisualIDRegistry.getType(OpinionatedTaskNameEditPart.VISUAL_ID));
	if (parser != null) {
		return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view),
				ParserOptions.NONE.intValue());
	} else {
		CrossflowDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5008); //$NON-NLS-1$
		return ""; //$NON-NLS-1$
	}
}
 
Example #24
Source File: SourceNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
public IContentAssistProcessor getCompletionProcessor() {
	if (getParserElement() == null || getParser() == null) {
		return null;
	}
	return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
}
 
Example #25
Source File: SourceNameEditPart.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 #26
Source File: SourceNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
public String getEditText() {
	if (getParserElement() == null || getParser() == null) {
		return ""; //$NON-NLS-1$
	}
	return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}
 
Example #27
Source File: CrossflowNavigatorLabelProvider.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
private String getField_3001Text(View view) {
	IParser parser = CrossflowParserProvider.getParser(CrossflowElementTypes.Field_3001,
			view.getElement() != null ? view.getElement() : view,
			CrossflowVisualIDRegistry.getType(FieldNameType3EditPart.VISUAL_ID));
	if (parser != null) {
		return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view),
				ParserOptions.NONE.intValue());
	} else {
		CrossflowDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5011); //$NON-NLS-1$
		return ""; //$NON-NLS-1$
	}
}
 
Example #28
Source File: CrossflowNavigatorLabelProvider.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
private String getSink_2006Text(View view) {
	IParser parser = CrossflowParserProvider.getParser(CrossflowElementTypes.Sink_2006,
			view.getElement() != null ? view.getElement() : view,
			CrossflowVisualIDRegistry.getType(SinkNameEditPart.VISUAL_ID));
	if (parser != null) {
		return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view),
				ParserOptions.NONE.intValue());
	} else {
		CrossflowDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5006); //$NON-NLS-1$
		return ""; //$NON-NLS-1$
	}
}
 
Example #29
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 #30
Source File: TaskNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
public String getEditText() {
	if (getParserElement() == null || getParser() == null) {
		return ""; //$NON-NLS-1$
	}
	return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
}