]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SetTypesDialog.java
Fix change of type in component property editor when range is present
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / componentTypeEditor / SetTypesDialog.java
1 /*******************************************************************************
2  * Copyright (c) 2013 Association for Decentralized Information Management in
3  * Industry THTH ry.
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
8  *
9  * Contributors:
10  *     Semantum Oy - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.modeling.ui.componentTypeEditor;
13
14 import java.util.Map;
15
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;
26
27 public class SetTypesDialog extends ResourceSelectionDialog3<Resource> {
28
29         public SetTypesDialog(Shell shell,
30                         Map<Resource, Pair<String, ImageDescriptor>> parameter, String title) {
31                 super(shell, parameter, title);
32         }
33
34         @Override
35         protected IDialogSettings getBaseDialogSettings() {
36                 return Activator.getDefault().getDialogSettings();
37         }
38
39         @Override
40         protected Control createExtendedContentArea(Composite parent) {
41                 return super.createExtendedContentArea(parent);
42         }
43
44         @Override
45         protected void handleSelected(StructuredSelection selection) {
46                 super.handleSelected(selection);
47                 validatePage(); 
48         }
49
50         protected void validatePage() {
51         }
52
53 }