/* * Copyright (c) 2012-2016 Marsha Chechik, Alessio Di Sandro, Michalis Famelis, * Rick Salay. * 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: * Alessio Di Sandro - Implementation. */ package edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.gmf.tooling.runtime.part.DefaultElementChooserDialog; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.model.BaseWorkbenchContentProvider; /** * @generated */ public class IStar_MAVOElementChooserDialog extends DefaultElementChooserDialog { /** * @generated */ public IStar_MAVOElementChooserDialog(Shell parentShell, View view) { this(parentShell, view, false); } /** * @generated */ public IStar_MAVOElementChooserDialog(Shell parentShell, View view, boolean allowMultiSelection) { super(parentShell, view, new IStar_MAVOElementChooserDialogContextImpl(allowMultiSelection)); } /** * @generated */ private static class IStar_MAVOElementChooserDialogContextImpl implements DefaultElementChooserDialog.Context { /** * @generated */ private static final String[] FILE_EXTENSIONS = new String[] { "istar_mavo" }; /** * @generated */ private final boolean myAllowMultiSelection; /** * @generated */ private IStar_MAVOElementChooserDialogContextImpl(boolean allowMultiSelection) { myAllowMultiSelection = allowMultiSelection; } /** * @generated */ @Override public AdapterFactory getAdapterFactory() { return edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVODiagramEditorPlugin.getInstance() .getItemProvidersAdapterFactory(); } /** * @generated */ @Override public PreferencesHint getPreferenceHint() { return edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVODiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT; } /** * @generated */ @Override public String[] getFileExtesions() { return FILE_EXTENSIONS.clone(); } /** * @generated */ @Override public String getDialogTitle() { return edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.Messages.IStar_MAVOElementChooserDialog_SelectModelElementTitle; } /** * @generated */ @Override public ITreeContentProvider getTreeContentProvider() { return new BaseWorkbenchContentProvider(); } /** * @generated */ public boolean allowMultiSelection() { return myAllowMultiSelection; } } }