--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2011 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 implementatio\r
+ *******************************************************************************/\r
+package org.simantics.structural.ui.menuContributions;\r
+\r
+import org.eclipse.jface.action.ActionContributionItem;\r
+import org.eclipse.jface.preference.IPreferenceStore;\r
+import org.simantics.structural.ui.Activator;\r
+\r
+/**\r
+ * @author Tuukka Lehtonen\r
+ */\r
+public class LinkWithEditorContribution extends ActionContributionItem {\r
+\r
+ public LinkWithEditorContribution(String preferenceKey) {\r
+ this(preferenceKey, Activator.getDefault().getPreferenceStore());\r
+ }\r
+\r
+ public LinkWithEditorContribution(String preferenceKey, IPreferenceStore preferenceStore) {\r
+ super(new LinkWithEditorAction(preferenceKey, preferenceStore));\r
+ }\r
+\r
+ public static class LinkWithEditorAction extends PreferenceCheckBoxAction {\r
+ public LinkWithEditorAction(String preferenceKey, IPreferenceStore preferenceStore) {\r
+ super("Link With Editor", preferenceKey, preferenceStore);\r
+ setImageDescriptor(Activator.SYNCED_ICON);\r
+ }\r
+ }\r
+\r
+}
\ No newline at end of file