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


Java IConfigurationElement.getNamespaceIdentifier方法代码示例

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


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

示例1: createWizardElement

import org.eclipse.core.runtime.IConfigurationElement; //导入方法依赖的package包/类
protected WizardElement createWizardElement(IConfigurationElement config) {
	String name = config.getAttribute(WizardElement.ATT_NAME);
	String id = config.getAttribute(WizardElement.ATT_ID);
	String className = config.getAttribute(WizardElement.ATT_CLASS);
	if (name == null || id == null || className == null)
		return null;
	WizardElement element = new WizardElement(config);
	element.id = id;
	String imageName = config.getAttribute(WizardElement.ATT_ICON);
	if (imageName != null) {
		String pluginID = config.getNamespaceIdentifier();
		Image image = PDEPlugin.getDefault().getLabelProvider().getImageFromPlugin(pluginID, imageName);
		element.setImage(image);
	}
	return element;
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:17,代码来源:AbstractNewProjectWizardWithTemplates.java

示例2: readMetanodes

import org.eclipse.core.runtime.IConfigurationElement; //导入方法依赖的package包/类
private void readMetanodes() {
	// iterate over the meta node config elements and create meta node templates
	IExtension[] metanodeExtensions = getExtensions(ID_META_NODE);
	for (IExtension mnExt : metanodeExtensions) {
		IConfigurationElement[] mnConfigElems = mnExt.getConfigurationElements();
		for (IConfigurationElement mnConfig : mnConfigElems) {

			try {
				MetaNodeTemplate metaNode = RepositoryFactory.createMetaNode(mnConfig);
				LOGGER.debug("Found meta node definition '" + metaNode.getID() + "': " + metaNode.getName());

				IContainerObject parentContainer = m_root.findContainer(metaNode.getCategoryPath());
				// If parent category is illegal, log an error and append the node to the
				// repository root.
				if (parentContainer == null) {
					LOGGER.warn("Invalid category-path for node contribution: '" + metaNode.getCategoryPath()
							+ "' - adding to root instead");
					m_root.addChild(metaNode);
				} else {
					// everything is fine, add the node to its parent category
					parentContainer.addChild(metaNode);
				}
			} catch (Throwable t) {
				String message = "MetaNode " + mnConfig.getAttribute("id") + "' from plugin '"
						+ mnConfig.getNamespaceIdentifier() + "' could not be created: " + t.getMessage();
				Bundle bundle = Platform.getBundle(mnConfig.getNamespaceIdentifier());

				if (bundle == null || bundle.getState() != Bundle.ACTIVE) {
					// if the plugin is null, the plugin could not be activated maybe due to a not
					// activateable plugin (plugin class cannot be found)
					message = message + " The corresponding plugin bundle could not be activated!";
				}

				LOGGER.error(message, t);
			}
		}
	}
}
 
开发者ID:qqilihq,项目名称:knime-json-node-doc-generator,代码行数:39,代码来源:RepositoryManager.java


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