-/*******************************************************************************\r
- * Copyright (c) 2012 Association for Decentralized Information Management in\r
- * Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.modeling.ui.componentTypeEditor;\r
-\r
-import org.eclipse.core.runtime.IConfigurationElement;\r
-import org.eclipse.core.runtime.IExecutableExtension;\r
-import org.eclipse.swt.widgets.Composite;\r
-import org.simantics.ui.workbench.ResourceEditorPart;\r
-\r
-/**\r
- * @author Hannu Niemistö\r
- * @author Tuukka Lehtonen (IExecutableExtension)\r
- */\r
-public class ComponentTypeEditor extends ResourceEditorPart implements IExecutableExtension {\r
-\r
- protected ComponentTypeViewer viewer;\r
- protected String formTitle = "User Component Interface";\r
-\r
- @Override\r
- public void setInitializationData(IConfigurationElement cfig, String propertyName, Object data) {\r
- if (data instanceof String) {\r
- String[] params = ((String) data).split(";");\r
- for (String param : params) {\r
- String[] keyValue = param.split("=");\r
- if (keyValue.length == 2) {\r
- if ("formTitle".equals(keyValue[0])) {\r
- formTitle = keyValue[1];\r
- }\r
- }\r
- }\r
- }\r
- }\r
-\r
- @Override\r
- public void createPartControl(Composite parent) {\r
- viewer = new ComponentTypeViewer(parent, getInputResource(), getEditorTitle());\r
- activateValidation();\r
- }\r
-\r
- protected String getEditorTitle() {\r
- return formTitle;\r
- }\r
-\r
- @Override\r
- public void setFocus() {\r
- viewer.setFocus();\r
- }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2012 Association for Decentralized Information Management in
+ * Industry THTH ry.
+ * 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:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.modeling.ui.componentTypeEditor;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExecutableExtension;
+import org.eclipse.swt.widgets.Composite;
+import org.simantics.ui.workbench.ResourceEditorPart;
+
+/**
+ * @author Hannu Niemistö
+ * @author Tuukka Lehtonen (IExecutableExtension)
+ */
+public class ComponentTypeEditor extends ResourceEditorPart implements IExecutableExtension {
+
+ protected ComponentTypeViewer viewer;
+ protected String formTitle = "User Component Interface";
+
+ @Override
+ public void setInitializationData(IConfigurationElement cfig, String propertyName, Object data) {
+ if (data instanceof String) {
+ String[] params = ((String) data).split(";");
+ for (String param : params) {
+ String[] keyValue = param.split("=");
+ if (keyValue.length == 2) {
+ if ("formTitle".equals(keyValue[0])) {
+ formTitle = keyValue[1];
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public void createPartControl(Composite parent) {
+ viewer = new ComponentTypeViewer(parent, getInputResource(), getEditorTitle());
+ activateValidation();
+ }
+
+ protected String getEditorTitle() {
+ return formTitle;
+ }
+
+ @Override
+ public void setFocus() {
+ viewer.setFocus();
+ }
+
+}