⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 marte2cheddarpreferencepage.java

📁 papyrus插件MARTE例子,uml建模
💻 JAVA
字号:
package com.thalesgroup.cheddar.MARTE2cheddar.preferences;import org.eclipse.jface.preference.*;import org.eclipse.ui.IWorkbenchPreferencePage;import org.eclipse.ui.IWorkbench;import com.thalesgroup.cheddar.MARTE2cheddar.Activator;/** * This class represents a preference page that * is contributed to the Preferences dialog. By  * subclassing <samp>FieldEditorPreferencePage</samp>, we * can use the field support built into JFace that allows * us to create a page that is small and knows how to  * save, restore and apply itself. * <p> * This page is used to modify preferences only. They * are stored in the preference store that belongs to * the main plug-in class. That way, preferences can * be accessed directly via the preference store. *  *  * <copyright> * Thales MARTE to Cheddar (Copyright (c) THALES 2007 All rights reserved) is free software; you can redistribute itand/or modify * it under the terms of the Eclipse Public License as published in http://www.eclipse.org/legal/epl-v10.html * * Thales MARTE to Cheddar is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Eclipse Public License for more details. * </copyright> * @author Nicolas Vienne *  */public class MARTE2CheddarPreferencePage	extends FieldEditorPreferencePage	implements IWorkbenchPreferencePage {	public MARTE2CheddarPreferencePage() {		super(GRID);		setPreferenceStore(Activator.getDefault().getPreferenceStore());		setDescription("Preferences for the MARTE2Cheddar transformation");	}		/**	 * Creates the field editors. Field editors are abstractions of	 * the common GUI blocks needed to manipulate various types	 * of preferences. Each field editor knows how to save and	 * restore itself.	 */	public void createFieldEditors() {		addField(new FileFieldEditor(CheddarConstants.CHEDDAR_PATH, 				"&Select Cheddar executable file:", getFieldEditorParent()));	}	/* (non-Javadoc)	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)	 */	public void init(IWorkbench workbench) {	}		public static String getCheddarPath() {		return Activator.getDefault().getPreferenceStore().getString(CheddarConstants.CHEDDAR_PATH);	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -