1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2011 Association for Decentralized Information Management in
\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
10 * VTT Technical Research Centre of Finland - initial API and implementatio
\r
11 *******************************************************************************/
\r
12 package org.simantics.structural.ui.menuContributions;
\r
14 import org.eclipse.jface.action.ActionContributionItem;
\r
15 import org.eclipse.jface.preference.IPreferenceStore;
\r
16 import org.simantics.structural.ui.Activator;
\r
19 * @author Tuukka Lehtonen
\r
21 public class LinkWithEditorContribution extends ActionContributionItem {
\r
23 public LinkWithEditorContribution(String preferenceKey) {
\r
24 this(preferenceKey, Activator.getDefault().getPreferenceStore());
\r
27 public LinkWithEditorContribution(String preferenceKey, IPreferenceStore preferenceStore) {
\r
28 super(new LinkWithEditorAction(preferenceKey, preferenceStore));
\r
31 public static class LinkWithEditorAction extends PreferenceCheckBoxAction {
\r
32 public LinkWithEditorAction(String preferenceKey, IPreferenceStore preferenceStore) {
\r
33 super("Link With Editor", preferenceKey, preferenceStore);
\r
34 setImageDescriptor(Activator.SYNCED_ICON);
\r