1 /*******************************************************************************
2 * Copyright (c) 2013 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Semantum Oy - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.modeling.ui.componentTypeEditor;
16 import org.eclipse.jface.dialogs.IDialogSettings;
17 import org.eclipse.jface.resource.ImageDescriptor;
18 import org.eclipse.jface.viewers.StructuredSelection;
19 import org.eclipse.swt.widgets.Composite;
20 import org.eclipse.swt.widgets.Control;
21 import org.eclipse.swt.widgets.Shell;
22 import org.simantics.db.Resource;
23 import org.simantics.modeling.ui.Activator;
24 import org.simantics.ui.workbench.dialogs.ResourceSelectionDialog3;
25 import org.simantics.utils.datastructures.Pair;
27 public class SetTypesDialog extends ResourceSelectionDialog3<Resource> {
29 public SetTypesDialog(Shell shell,
30 Map<Resource, Pair<String, ImageDescriptor>> parameter, String title) {
31 super(shell, parameter, title);
35 protected IDialogSettings getBaseDialogSettings() {
36 return Activator.getDefault().getDialogSettings();
40 protected Control createExtendedContentArea(Composite parent) {
41 return super.createExtendedContentArea(parent);
45 protected void handleSelected(StructuredSelection selection) {
46 super.handleSelected(selection);
50 protected void validatePage() {