当前位置: 首页>>代码示例>>Java>>正文


Java BundleUtility.find方法代码示例

本文整理汇总了Java中org.eclipse.ui.internal.util.BundleUtility.find方法的典型用法代码示例。如果您正苦于以下问题:Java BundleUtility.find方法的具体用法?Java BundleUtility.find怎么用?Java BundleUtility.find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.ui.internal.util.BundleUtility的用法示例。


在下文中一共展示了BundleUtility.find方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getImage

import org.eclipse.ui.internal.util.BundleUtility; //导入方法依赖的package包/类
private Image getImage(String subgroupName){
	Bundle bundle = Platform.getBundle("hydrograph.ui.propertywindow");
	
	URL fullPathString = null;
	if(StringUtils.equalsIgnoreCase(subgroupName, "CONFIGURATION")){
		fullPathString = BundleUtility.find(bundle, "icons/config.png");
	}else if(StringUtils.equalsIgnoreCase(subgroupName, "DISPLAY")){
		fullPathString = BundleUtility.find(bundle, "icons/display.png");
	}else if(StringUtils.equalsIgnoreCase(subgroupName, "RECORD STRUCTURE DETAILS")){
		fullPathString = BundleUtility.find(bundle, "icons/schema.png");
	}
	if(fullPathString!=null){
		Image image = ImageDescriptor.createFromURL(fullPathString).createImage();
		return image;
	}else{
		return null;
	}
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:19,代码来源:ELTHydroSubGroup.java

示例2: getBundleAbsolutePath

import org.eclipse.ui.internal.util.BundleUtility; //导入方法依赖的package包/类
public static URL getBundleAbsolutePath(String path) {
	Bundle bundle = Platform.getBundle(PLUGIN_ID);
       if (!BundleUtility.isReady(bundle)) {
		return null;
	}

       // look for the image (this will check both the plugin and fragment folders
       URL fullPathString = BundleUtility.find(bundle, path);
       if (fullPathString == null) {
           try {
               fullPathString = new URL(path);
           } catch (MalformedURLException e) {
               return null;
           }
       }
       return fullPathString;
}
 
开发者ID:thahn0720,项目名称:agui_eclipse_plugin,代码行数:18,代码来源:AguiPlugin.java

示例3: fillContextMenu

import org.eclipse.ui.internal.util.BundleUtility; //导入方法依赖的package包/类
@SuppressWarnings("restriction")
@Override
public void fillContextMenu(IMenuManager menu) {
	super.fillContextMenu(menu);

	ActionContributionItem pasteContribution = getPasteContribution(menu.getItems());
	menu.remove(pasteContribution);
	IAction pasteAction = new Action(PASTE_ACTION_TEXT) {
		@Override
		public void run() {
			IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench()
					.getService(IHandlerService.class);
			try {
				JobCopyParticipant.setCopiedFileList(new ArrayList<>());
				handlerService.executeCommand(PASTE_COMMAND_ID, null);
			} catch (Exception exception) {
				logger.warn("Error while pasting job files :: {}",exception.getMessage());
			}
		}
	};
	pasteAction.setAccelerator(SWT.MOD1 | 'v');
	Bundle bundle = Platform.getBundle(MENU_PLUGIN_NAME);
	URL imagePath = BundleUtility.find(bundle,ImagePathConstant.PASTE_IMAGE_PATH.getValue());
	ImageDescriptor imageDescriptor = ImageDescriptor.createFromURL(imagePath);
	pasteAction.setImageDescriptor(imageDescriptor);
	menu.insertAfter(COPY_ACTION_ID, pasteAction);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:28,代码来源:CustomEditActionProvider.java

示例4: addPages

import org.eclipse.ui.internal.util.BundleUtility; //导入方法依赖的package包/类
@Override
public void addPages() {
	Bundle bundle = Platform.getBundle("de.fzi.sensidl.language.ui");
	URL fullPathString = BundleUtility.find(bundle, "images/SensIDL_logo.jpg");
	sensidlWizardPage = new SensidlWizardPage("SensIDL - Code Generation", "SensIDL - Code Generation",
			ImageDescriptor.createFromURL(fullPathString), modelPath, path, language, sensidlmodel != null);

	addPage(sensidlWizardPage);

}
 
开发者ID:SENSIDL-PROJECT,项目名称:SensIDL,代码行数:11,代码来源:SensidlWizard.java

示例5: getImageDescriptor

import org.eclipse.ui.internal.util.BundleUtility; //导入方法依赖的package包/类
public static ImageDescriptor getImageDescriptor(String imageName)
{
	Bundle bundle = Platform.getBundle(PLUGIN_ID);
	if (!BundleUtility.isReady(bundle)) { return null; }

	URL fullPathString = BundleUtility.find(bundle, "icons/" + imageName);

	return ImageDescriptor.createFromURL(fullPathString);
}
 
开发者ID:TheWhiteShadow3,项目名称:cuina,代码行数:10,代码来源:CuinaCore.java

示例6: ActionReplicateShape

import org.eclipse.ui.internal.util.BundleUtility; //导入方法依赖的package包/类
/**
 * <p>
 * Initializes the instance with the current ShapeTreeView
 * </p>
 * 
 * @param view
 *            <p>
 *            The current ShapeTreeView
 *            </p>
 */
public ActionReplicateShape(ShapeTreeView view) {

	this.view = view;

	this.setText("Replicate Shape");

	// Load replicate.gif icon from the bundle's icons/ directory

	Bundle bundle = FrameworkUtil.getBundle(getClass());
	URL imagePath = BundleUtility.find(bundle, "icons/replicate.gif");
	imageDescriptor = ImageDescriptor.createFromURL(imagePath);

}
 
开发者ID:eclipse,项目名称:eavp,代码行数:24,代码来源:ActionReplicateShape.java

示例7: ActionDeleteShape

import org.eclipse.ui.internal.util.BundleUtility; //导入方法依赖的package包/类
/**
 * <p>
 * Constructor for setting the current ShapeTreeViewer
 * </p>
 * 
 * @param view
 *            <p>
 *            The current ShapeTreeView
 *            </p>
 */
public ActionDeleteShape(ShapeTreeView view) {

	this.view = view;

	this.setText("Delete Shape");

	// Load the delete.gif ImageDescriptor from the bundle's
	// `icons` directory

	Bundle bundle = FrameworkUtil.getBundle(getClass());
	URL imagePath = BundleUtility.find(bundle, "icons/delete.gif");
	imageDescriptor = ImageDescriptor.createFromURL(imagePath);

}
 
开发者ID:eclipse,项目名称:eavp,代码行数:25,代码来源:ActionDeleteShape.java

示例8: ActionDuplicateShape

import org.eclipse.ui.internal.util.BundleUtility; //导入方法依赖的package包/类
/**
 * 
 * @param view
 */
public ActionDuplicateShape(ShapeTreeView view) {

	this.view = view;

	this.setText("Duplicate Shape");

	// Load duplicate.gif icon from the bundle's icons/ directory

	Bundle bundle = FrameworkUtil.getBundle(getClass());
	URL imagePath = BundleUtility.find(bundle, "icons/duplicate.gif");
	imageDescriptor = ImageDescriptor.createFromURL(imagePath);

}
 
开发者ID:eclipse,项目名称:eavp,代码行数:18,代码来源:ActionDuplicateShape.java

示例9: createImageDescriptor

import org.eclipse.ui.internal.util.BundleUtility; //导入方法依赖的package包/类
private ImageDescriptor createImageDescriptor() {
	
	Bundle bundle = Platform.getBundle("ch.pharmed.phmprescriber"); //$NON-NLS-1$
	URL fullPathString = BundleUtility.find(bundle, "icons/logo_elexis.png"); //$NON-NLS-1$
			
	return ImageDescriptor.createFromURL(fullPathString);
			
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:9,代码来源:PhMRpActions.java

示例10: DropdownAction

import org.eclipse.ui.internal.util.BundleUtility; //导入方法依赖的package包/类
/**
 * <p>
 * Creates a dropdown action with an icon label
 * </p>
 * 
 * @param text
 *            <p>
 *            The tooltip text
 *            </p>
 * @param imageFilename
 *            <p>
 *            The filename of the icon image, relative to the OSGi bundle
 *            location
 *            </p>
 */
public DropdownAction(String text, String imageFilename) {

    this(text);

    // Load the icon image

    Bundle bundle = FrameworkUtil.getBundle(getClass());
    URL imagePath = BundleUtility.find(bundle, imageFilename);
    imageDescriptor = ImageDescriptor.createFromURL(imagePath);

}
 
开发者ID:eclipse,项目名称:eavp,代码行数:27,代码来源:DropdownAction.java


注:本文中的org.eclipse.ui.internal.util.BundleUtility.find方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。