| /* |
| * Copyright (c) 2007, 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: |
| * bblajer (Borland) - initial API and implementation |
| */ |
| |
| «IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'» |
| «EXTENSION xpt::editor::Wizard» |
| |
| «AROUND additions FOR gmfgen::GenDiagram-» |
| «IF isRichClientPlatform(self)-» |
| «EXPAND setModelResource-» |
| «ENDIF-» |
| «ENDAROUND» |
| |
| «DEFINE setModelResource FOR gmfgen::GenDiagram-» |
| «EXPAND xpt::Common::generatedMemberComment» |
| public void setModelResource(org.eclipse.emf.ecore.resource.Resource resource) { |
| selectedModelElement = null; |
| if (modelViewer != null) { |
| if (resource != null) { |
| modelViewer.setInput(resource); |
| modelViewer.setSelection(org.eclipse.jface.viewers.StructuredSelection.EMPTY); |
| } else { |
| modelViewer.setInput(null); |
| } |
| setPageComplete(validatePage()); |
| } |
| } |
| «ENDDEFINE» |
| |