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