blob: 1774393638106801a7568027b99a0861d16494a2 [file] [log] [blame]
//------------------------------------------------------------------------------
// Copyright (c) 2005, 2007 IBM Corporation and others.
// 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:
// IBM Corporation - initial implementation
//------------------------------------------------------------------------------
/*
* Copyright (c) 2005, 2006 IBM Corporation and others.
* 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:
* IBM Corporation - initial implementation
*
*/
package org.eclipse.epf.diagramming.part;
import java.io.InputStream;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.wizards.EditorWizardPage;
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.util.DiagramFileCreator;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.epf.diagramming.edit.parts.ActivityEditPart;
/**
* @generated
*/
public class UMLCreationWizardPage extends EditorWizardPage {
/**
* @generated
*/
public UMLCreationWizardPage(IWorkbench workbench,
IStructuredSelection selection) {
super("CreationWizardPage", workbench, selection); //$NON-NLS-1$
setTitle("Create AD Diagram");
setDescription("Create a new AD diagram.");
}
/**
* @generated
*/
public IFile createAndOpenDiagram(IPath containerPath, String fileName,
InputStream initialContents, String kind, IWorkbenchWindow dWindow,
IProgressMonitor progressMonitor, boolean saveDiagram) {
return UMLDiagramEditorUtil.createAndOpenDiagram(
getDiagramFileCreator(), containerPath, fileName,
initialContents, kind, dWindow, progressMonitor,
isOpenNewlyCreatedDiagramEditor(), saveDiagram);
}
/**
* @generated
*/
protected String getDefaultFileName() {
return "default"; //$NON-NLS-1$
}
/**
* @generated
*/
public DiagramFileCreator getDiagramFileCreator() {
return UMLDiagramFileCreator.getInstance();
}
/**
* @generated
*/
protected String getDiagramKind() {
return ActivityEditPart.MODEL_ID;
}
}