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

📄 gefuiplugin.java

📁 对eclipse gef进行封装,可以生成图形化编辑器
💻 JAVA
字号:
/*******************************************************************************
 * $Header: /cvsroot/EOS6/work_dir/niegy/com.primeton.studio.gef.ui/src/com/primeton/studio/gef/ui/GefUiPlugin.java,v 1.1 2006/11/17 03:15:13 niegy Exp $
 * $Revision: 1.1 $
 * $Date: 2006/11/17 03:15:13 $
 *
 *==============================================================================
 *
 * Copyright (c) 2001-2006 Primeton Technologies, Ltd.
 * All rights reserved. 
 * 
 * Created on 2006-9-27
 *******************************************************************************/

package com.primeton.studio.gef.ui;

import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

/**
 * TODO此处填写 class 信息
 *
 * @author niegy (mailto:niegy@primeton.com)
 */
/*
 * 修改历史
 * $Log: GefUiPlugin.java,v $
 * Revision 1.1  2006/11/17 03:15:13  niegy
 * create
 * 
 */
public class GefUiPlugin extends AbstractUIPlugin {

	// The plug-in ID
	public static final String PLUGIN_ID = "com.primeton.studio.gef.ui";

	// The shared instance
	private static GefUiPlugin plugin;
	
	/**
	 * The constructor
	 */
	public GefUiPlugin() {
		plugin = this;
	}

	/*
	 * (non-Javadoc)
	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
	 */
	public void start(BundleContext context) throws Exception {
		super.start(context);
	}

	/*
	 * (non-Javadoc)
	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
	 */
	public void stop(BundleContext context) throws Exception {
		plugin = null;
		super.stop(context);
	}

	/**
	 * Returns the shared instance
	 *
	 * @return the shared instance
	 */
	public static GefUiPlugin getDefault() {
		return plugin;
	}

    
    public  void setErrorStatusMessage(String messageInfo) {
        IWorkbenchPage page = GefUiPlugin.getDefault().getWorkbench()
        .getActiveWorkbenchWindow().getActivePage();
        if(page==null)return;
        IEditorPart editorPart = page.getActiveEditor();
        if(editorPart==null)return;
           IStatusLineManager status = editorPart
        .getEditorSite().getActionBars().getStatusLineManager();
            status.setErrorMessage(messageInfo);
    }
    
}

⌨️ 快捷键说明

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