]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SetTypesDialog.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / componentTypeEditor / SetTypesDialog.java
1 /*******************************************************************************\r
2  * Copyright (c) 2013 Association for Decentralized Information Management in\r
3  * Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     Semantum Oy - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.modeling.ui.componentTypeEditor;\r
13 \r
14 import java.util.Map;\r
15 \r
16 import org.eclipse.jface.dialogs.IDialogSettings;\r
17 import org.eclipse.jface.resource.ImageDescriptor;\r
18 import org.eclipse.jface.viewers.StructuredSelection;\r
19 import org.eclipse.swt.widgets.Composite;\r
20 import org.eclipse.swt.widgets.Control;\r
21 import org.eclipse.swt.widgets.Shell;\r
22 import org.simantics.db.Resource;\r
23 import org.simantics.modeling.ui.Activator;\r
24 import org.simantics.ui.workbench.dialogs.ResourceSelectionDialog3;\r
25 import org.simantics.utils.datastructures.Pair;\r
26 \r
27 public class SetTypesDialog extends ResourceSelectionDialog3<Resource> {\r
28 \r
29         public SetTypesDialog(Shell shell,\r
30                         Map<Resource, Pair<String, ImageDescriptor>> parameter, String title) {\r
31                 super(shell, parameter, title);\r
32         }\r
33 \r
34         @Override\r
35         protected IDialogSettings getBaseDialogSettings() {\r
36                 return Activator.getDefault().getDialogSettings();\r
37         }\r
38 \r
39         @Override\r
40         protected Control createExtendedContentArea(Composite parent) {\r
41                 return super.createExtendedContentArea(parent);\r
42         }\r
43 \r
44         @Override\r
45         protected void handleSelected(StructuredSelection selection) {\r
46                 super.handleSelected(selection);\r
47                 validatePage(); \r
48         }\r
49 \r
50         protected void validatePage() {\r
51         }\r
52 \r
53 }