blob: 7c9c23ec500556d6338868a384db761f796d4dc9 [file] [log] [blame]
/**
* Copyright (c) 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Artem Tikhomirov (Borland) - initial API and implementation
*/
modeltype GMFMAP uses mappings('http://www.eclipse.org/gmf/2006/mappings');
modeltype GMFGEN uses gmfgen('http://www.eclipse.org/gmf/2009/GenModel');
transformation PropertySheet(in mapModel : GMFMAP, inout gmfgenModel : GMFGEN);
main() {
var mapRoot := mapModel.rootObjects()![GMFMAP::Mapping];
var genEditor := gmfgenModel.rootObjects()![GMFGEN::GenEditorGenerator];
genEditor.propertySheet := mapRoot.diagram.map propertySheet(genEditor);
}
mapping GMFMAP::CanvasMapping::propertySheet(editorGen : GMFGEN::GenEditorGenerator) : GMFGEN::GenPropertySheet {
result.tabs += object GMFGEN::GenStandardPropertyTab { iD := 'appearance' };
result.tabs += object GMFGEN::GenStandardPropertyTab { iD := 'diagram' };
if not self.domainModel.oclIsUndefined() then
result.tabs += object GMFGEN::GenCustomPropertyTab {
iD := 'domain';
label := 'Core';
filter := object GMFGEN::TypeTabFilter {
types += Sequence { 'org.eclipse.gmf.runtime.notation.View', 'org.eclipse.gef.EditPart' };
if not editorGen.navigator.oclIsUndefined() then generatedTypes += GMFGEN::GeneratedType::abstractNavigatorItem endif;
}
}
endif;
}