Search in sources :

Example 1 with DetailEmfObservableInfo

use of org.eclipse.wb.internal.rcp.databinding.emf.model.observables.DetailEmfObservableInfo in project windowbuilder by eclipse.

the class EmfValuePropertyDetailCodeSupport method addDetailSourceCode.

// //////////////////////////////////////////////////////////////////////////
// 
// Code generation
// 
// //////////////////////////////////////////////////////////////////////////
@Override
protected void addDetailSourceCode(List<String> lines, CodeGenerationSupport generationSupport, DetailBeanObservableInfo observable, ObservableInfo masterObservable) throws Exception {
    DetailEmfObservableInfo emfObservable = (DetailEmfObservableInfo) observable;
    // 
    String sourceCode = emfObservable.getPropertiesSupport().getEMFPropertiesCode("value(") + emfObservable.getDetailPropertyReference() + ")";
    if (getVariableIdentifier() != null) {
        lines.add("org.eclipse.core.databinding.beans.IBeanValueProperty " + getVariableIdentifier() + sourceCode + ";");
        sourceCode = " = " + getVariableIdentifier();
    }
    // add code
    lines.add("org.eclipse.core.databinding.observable.value.IObservableValue " + observable.getVariableIdentifier() + sourceCode + ".observeDetail(" + masterObservable.getVariableIdentifier() + ");");
}
Also used : DetailEmfObservableInfo(org.eclipse.wb.internal.rcp.databinding.emf.model.observables.DetailEmfObservableInfo)

Example 2 with DetailEmfObservableInfo

use of org.eclipse.wb.internal.rcp.databinding.emf.model.observables.DetailEmfObservableInfo in project windowbuilder by eclipse.

the class EmfListPropertyDetailCodeSupport method addDetailSourceCode.

// //////////////////////////////////////////////////////////////////////////
// 
// Code generation
// 
// //////////////////////////////////////////////////////////////////////////
@Override
protected void addDetailSourceCode(List<String> lines, CodeGenerationSupport generationSupport, DetailBeanObservableInfo observable, ObservableInfo masterObservable) throws Exception {
    DetailEmfObservableInfo emfObservable = (DetailEmfObservableInfo) observable;
    // 
    String sourceCode = emfObservable.getPropertiesSupport().getEMFPropertiesCode("list(") + emfObservable.getDetailPropertyReference() + ")";
    if (getVariableIdentifier() != null) {
        lines.add("org.eclipse.core.databinding.beans.IBeanListProperty " + getVariableIdentifier() + sourceCode + ";");
        sourceCode = " = " + getVariableIdentifier();
    }
    // add code
    lines.add("org.eclipse.core.databinding.observable.list.IObservableList " + observable.getVariableIdentifier() + sourceCode + ".observeDetail(" + masterObservable.getVariableIdentifier() + ");");
}
Also used : DetailEmfObservableInfo(org.eclipse.wb.internal.rcp.databinding.emf.model.observables.DetailEmfObservableInfo)

Aggregations

DetailEmfObservableInfo (org.eclipse.wb.internal.rcp.databinding.emf.model.observables.DetailEmfObservableInfo)2