📄 moduleplugin.java
字号:
/*
* $Header: /home/cvs/WEBPUMP2.0/WebPumpIDE_Src/WebPumpIDE/src/com/webpump/ui/module/ModulePlugin.java,v 1.1.1.1 2004/07/01 09:07:49 wang_j Exp $
* $Revision: 1.1.1.1 $
* $Date: 2004/07/01 09:07:49 $
*
* ====================================================================
*
* The NanJing HopeRun(IT-FOREST) Software License, Version 2.0.0
*
* Copyright 2003-2004 by NanJing HopeRun(IT-FOREST) Information System Co., Ltd, CHINA and
* IT Forest Corporation
* All rights reserved.
*
* This software is the confidential and proprietary information of
* HopeRun(IT-FOREST) Information System Co., Ltd, CHINA and IT Forest Corporation.
* You shall not disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into with
* HopeRun(IT-FOREST) Information System Co., Ltd, CHINA and IT Forest Corporation.
*/
package com.webpump.ui.module;
import org.eclipse.ui.plugin.*;
import org.eclipse.core.runtime.*;
import org.eclipse.core.resources.*;
import java.util.*;
/**
* Class for module plugin
*
* @author shi_l
* @version 2.0.0 2004-2-11
*/
public class ModulePlugin extends AbstractUIPlugin {
//The shared instance.
private static ModulePlugin plugin;
//Resource bundle.
private ResourceBundle resourceBundle;
/**
* The constructor.
*/
public ModulePlugin(IPluginDescriptor descriptor) {
super(descriptor);
plugin = this;
try {
resourceBundle= ResourceBundle.getBundle("com.webpump.ui.module.ModulePluginResources");
} catch (MissingResourceException x) {
resourceBundle = null;
}
}
/**
* Returns the shared instance.
*/
public static ModulePlugin getDefault() {
return plugin;
}
/**
* Returns the workspace instance.
*/
public static IWorkspace getWorkspace() {
return ResourcesPlugin.getWorkspace();
}
/**
* Returns the string from the plugin's resource bundle,
* or 'key' if not found.
*/
public static String getResourceString(String key) {
ResourceBundle bundle= ModulePlugin.getDefault().getResourceBundle();
try {
return bundle.getString(key);
} catch (MissingResourceException e) {
return key;
}
}
/**
* Returns the plugin's resource bundle,
*/
public ResourceBundle getResourceBundle() {
return resourceBundle;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -