• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java PDEPlugin类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.pde.internal.ui.PDEPlugin的典型用法代码示例。如果您正苦于以下问题:Java PDEPlugin类的具体用法?Java PDEPlugin怎么用?Java PDEPlugin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PDEPlugin类属于org.eclipse.pde.internal.ui包,在下文中一共展示了PDEPlugin类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createWizardElement

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的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: getWizard

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
public IWizard getWizard() {
	if (wizard != null)
		return wizard; // we've already created it

	IBaseProjectWizard pluginWizard;
	try {
		pluginWizard = createWizard(); // create instance of target wizard
	} catch (CoreException e) {
		if (parentWizardPage instanceof BaseWizardSelectionPage)
			((BaseWizardSelectionPage) parentWizardPage).setDescriptionText(""); //$NON-NLS-1$
		PDEPlugin.logException(e);
		parentWizardPage.setErrorMessage(PDEUIMessages.Errors_CreationError_NoWizard);
		MessageDialog.openError(parentWizardPage.getWizard().getContainer().getShell(), PDEUIMessages.Errors_CreationError, PDEUIMessages.Errors_CreationError_NoWizard);
		return null;
	}
	wizard = pluginWizard;
	//wizard.setUseContainerState(false);
	return wizard;
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:20,代码来源:WizardNode.java


示例3: getSourceFolder

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
/**
 * Returns the folder with Java files in the target project. The default
 * implementation looks for source folders in the classpath of the target
 * folders and picks the first one encountered. Subclasses may override this
 * behaviour.
 * 
 * @param monitor
 *            progress monitor to use
 * @return source folder that will be used to generate Java files or
 *         <samp>null </samp> if none found.
 */

protected IFolder getSourceFolder(IProgressMonitor monitor) {
	IFolder sourceFolder = null;

	try {
		IJavaProject javaProject = JavaCore.create(project);
		IClasspathEntry[] classpath = javaProject.getRawClasspath();
		for (int i = 0; i < classpath.length; i++) {
			IClasspathEntry entry = classpath[i];
			if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
				IPath path = entry.getPath().removeFirstSegments(1);
				if (path.segmentCount() > 0)
					sourceFolder = project.getFolder(path);
				break;
			}
		}
	} catch (JavaModelException e) {
		PDEPlugin.logException(e);
	}
	return sourceFolder;
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:33,代码来源:AbstractTemplateSection.java


示例4: performFinish

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
/**
 * Implements the interface method by looping through template sections and
 * executing them sequentially.
 * 
 * @param project
 *            the project
 * @param monitor
 *            the progress monitor to track the execution progress as part
 *            of the overall new project creation operation
 * @return <code>true</code> if the wizard completed the operation with
 *         success, <code>false</code> otherwise.
 */
public boolean performFinish(IProject project,  IProgressMonitor monitor) {
	try {
		ITemplateSection[] sections = getTemplateSections();
		monitor.beginTask("", sections.length); //$NON-NLS-1$
		for (int i = 0; i < sections.length; i++) {
			sections[i].execute(project,  new SubProgressMonitor(monitor, 1));
		}
		//No reason to do this any more with the new editors
		//saveTemplateFile(project, null);
	} catch (CoreException e) {
		PDEPlugin.logException(e);
		return false;
	} finally {
		monitor.done();
	}
	return true;
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:30,代码来源:AbstractNewProjectTemplateWizard.java


示例5: flushModel

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
@Override
protected void flushModel(IDocument doc) {
	if (!(getModel() instanceof IEditable)) {
		return;
	}
	IEditable editableModel = (IEditable) getModel();
	if (editableModel.isDirty() == false) {
		return;
	}
	try {
		StringWriter swriter = new StringWriter();
		PrintWriter writer = new PrintWriter(swriter);
		editableModel.save(writer);
		writer.flush();
		swriter.close();
		doc.set(swriter.toString());
	} catch (IOException e) {
		PDEPlugin.logException(e);
	}
}
 
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:21,代码来源:ProductXMLInputContext.java


示例6: createSystemFileContexts

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
/**
 * Adapted from {@link ProductEditor}, replacing references to
 * {@link ProductInputContext}.
 */
@Override
protected void createSystemFileContexts(InputContextManager manager, FileStoreEditorInput input) {
	File file = new File(input.getURI());
	if (file != null) {
		String name = file.getName();
		if (name.endsWith(".product")) {
			IFileStore store;
			try {
				store = EFS.getStore(file.toURI());
				IEditorInput in = new FileStoreEditorInput(store);
				manager.putContext(in, new ProductXMLInputContext(this, in, true));
			} catch (CoreException e) {
				PDEPlugin.logException(e);
			}
		}
	}
}
 
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:22,代码来源:ProductEditorWithSource.java


示例7: initializeFrom

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
public void initializeFrom( ILaunchConfiguration config )
{
	try
	{
		if ( fPluginTreeViewer.getInput( ) == null )
		{
			fPluginTreeViewer.setUseHashlookup( true );
			fPluginTreeViewer.setInput( PDEPlugin.getDefault( ) );
			fPluginTreeViewer.reveal( fWorkspacePlugins );
		}
		initWorkspacePluginsState( config );
		initExternalPluginsState( config );
	}
	catch ( CoreException e )
	{
		PDEPlugin.logException( e );
	}
	adjustCustomControlEnableState( true );
	updateStatus( );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:21,代码来源:ReportAdvancedLauncherTab.java


示例8: create

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
public static WizardElement create(IConfigurationElement config) {
	String name = config.getAttribute(ATT_NAME);
	String id = config.getAttribute(ATT_ID);
	String className = config.getAttribute(ATT_CLASS);
	if (name == null || id == null || className == null)
		return null;
	WizardElement element = new WizardElement(config);
	String imageName = config.getAttribute(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,代码行数:16,代码来源:WizardElement.java


示例9: AbstractNewProjectTemplateWizard

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
/**
 * Creates a new template wizard.
 */
public AbstractNewProjectTemplateWizard() {
	super();
	setDialogSettings(PDEPlugin.getDefault().getDialogSettings());
	setDefaultPageImageDescriptor(PDEPluginImages.DESC_NEWEXPRJ_WIZ);
	setNeedsProgressMonitor(true);
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:10,代码来源:AbstractNewProjectTemplateWizard.java


示例10: extendedValidation

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
private static void extendedValidation(IProduct product, Collection<String> errorMessages) {
	Map<String, IPluginModelBase> pluginModels = new HashMap<String, IPluginModelBase>();

	if (product.useFeatures()) {
		IFeatureModel[] features = getUniqueFeatures(product.getFeatures());
		for (int i = 0; i < features.length; i++) {
			addFeaturePlugins(features[i].getFeature(), pluginModels);
		}
	} else {
		IProductPlugin[] plugins = product.getPlugins();
		for (int i = 0; i < plugins.length; i++) {
			String id = plugins[i].getId();
			if (id == null || pluginModels.containsKey(id)) {
				continue;
			}
			IPluginModelBase model = PluginRegistry.findModel(id);
			if (model != null && TargetPlatformHelper.matchesCurrentEnvironment(model)) {
				pluginModels.put(id, model);
			}
		}
	}

	try {
		ILaunchConfiguration configuration = new DummyProductLaunchConfiguration(product);
		LaunchValidationOperation operation = new ProductEclipsePluginValidationOperation(configuration,
				pluginModels.values());
		operation.run(new NullProgressMonitor());
		if (operation.hasErrors()) {
			fillErrorMessageList(operation.getInput(), errorMessages);
		}
	} catch (CoreException e) {
		PDEPlugin.logException(e);
		errorMessages.add(e.getMessage());
	}
}
 
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:36,代码来源:ProductValidator.java


示例11: ReportAdvancedLauncherTab

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
/**
 * @param showFeatures
 */
public ReportAdvancedLauncherTab( boolean showFeatures )
{
	fNumExternalChecked = 0;
	fNumWorkspaceChecked = 0;
	fShowFeatures = showFeatures;
	PDEPlugin.getDefault( ).getLabelProvider( ).connect( this );
	fImage = PDEPluginImages.DESC_REQ_PLUGINS_OBJ.createImage( );
	fWorkspaceBIRTModels = getInterestProject( REPORTPROJECTKID );
	fWorkspaceJavaModels = getInterestProject( JavaCore.NATURE_ID );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:14,代码来源:ReportAdvancedLauncherTab.java


示例12: createStatus

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
public static IStatus createStatus( int severity, String message )
{
	return new Status( severity,
			PDEPlugin.getPluginId( ),
			severity,
			message,
			null );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:9,代码来源:ReportAdvancedLauncherTab.java


示例13: addEditorPages

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
@Override
protected void addEditorPages() {
	try {
		if (getEditorInput() instanceof IFileEditorInput) {
			fMainPage = new ParticipantPage(this);
			addPage(fMainPage);
			// addPage(new DesignPatternMasterPage(this));
		}
	} catch (PartInitException e) {
		PDEPlugin.logException(e);
	}
	addSourcePage(DesignPatternInputContext.CONTEXT_ID);
}
 
开发者ID:patternbox,项目名称:patternbox-eclipse,代码行数:14,代码来源:DesignPatternEditor.java


示例14: TargetNameLabelProvider

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
public TargetNameLabelProvider() {
	PDEPlugin.getDefault().getLabelProvider().connect(this);
	
	ITargetPlatformService service = getTargetService();
	if (service != null) {
		fRunningHost = (TargetDefinition) service.newDefaultTarget();
	}
	
	apiToolsProvider = new ApiToolsLabelProvider() {
		protected boolean isDefaultBaseline(Object element) {
			return isDefault(element);
		}
	};
}
 
开发者ID:jd-carroll,项目名称:target-baselines,代码行数:15,代码来源:TargetBaselinePreferencePage.java


示例15: getImage

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
private Image getImage(Object definition) {
	if (definition instanceof IApiBaseline) {
		return apiToolsProvider.getImage(definition);
	}
	
	if (definition instanceof ITargetDefinition) {
		int flag = 0;
		if (fRunningHost != null && fRunningHost.isContentEquivalent((ITargetDefinition) definition)) {
			return PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_PRODUCT_BRANDING, flag);
		}
		return PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_TARGET_DEFINITION, flag);
	}
	
	return null;
}
 
开发者ID:jd-carroll,项目名称:target-baselines,代码行数:16,代码来源:TargetBaselinePreferencePage.java


示例16: dispose

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
public void dispose() {
	PDEPlugin.getDefault().getLabelProvider().disconnect(this);
	if (fTextFont != null) {
		fTextFont.dispose();
		fTextFont = null;
	}
	super.dispose();
}
 
开发者ID:jd-carroll,项目名称:target-baselines,代码行数:9,代码来源:TargetBaselinePreferencePage.java


示例17: dispose

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
public void dispose( )
{
	PDEPlugin.getDefault( ).getLabelProvider( ).disconnect( this );
	fImage.dispose( );
	super.dispose( );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:7,代码来源:ReportAdvancedLauncherTab.java


示例18: internalMoveDefinitions

import org.eclipse.pde.internal.ui.PDEPlugin; //导入依赖的package包/类
private void internalMoveDefinitions() {
	ITargetPlatformService service = getTargetService();
	
	// Move the marked definitions to workspace
	if (moved_TargetDefinitions.size() > 0) {
		Iterator<ITargetDefinition> iterator = moved_TargetDefinitions.keySet().iterator();
		while (iterator.hasNext()) {
			try {
				ITargetDefinition target = iterator.next();
				IPath path = moved_TargetDefinitions.get(target);
				IFile targetFile = PDECore.getWorkspace().getRoot().getFile(path);

				WorkspaceFileTargetHandle wrkspcTargetHandle = new WorkspaceFileTargetHandle(targetFile);
				ITargetDefinition newTarget = service.newTarget();
				service.copyTargetDefinition(target, newTarget);
				wrkspcTargetHandle.save(newTarget);
				
				// clear any pending edit updates
				removed_Definitions.add(target);
				// Replace all references to the original with the new definition
				internalRemoveDefinition(target);
				allDefinitions.remove(target);
				
				ITargetDefinition workspaceTarget = wrkspcTargetHandle.getTargetDefinition();
				setIdentifierFor(workspaceTarget, target);
				internalAddDefinition(workspaceTarget);
				allDefinitions.add(workspaceTarget);

				fTableViewer.refresh(false);
				// if (target == fActiveTarget) {
				// 	load = true;
				// 	toLoad = workspaceTarget;
				// }
			} catch (CoreException e) {
				PDEPlugin.log(e);
			}
		}
	}
	
	moved_TargetDefinitions.clear();
}
 
开发者ID:jd-carroll,项目名称:target-baselines,代码行数:42,代码来源:TargetBaselinePreferencePage.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SAMLObject类代码示例发布时间:2022-05-22
下一篇:
Java FileSource类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap