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

Java MavenPluginActivator类代码示例

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

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



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

示例1: getFacade

import org.eclipse.m2e.core.internal.MavenPluginActivator; //导入依赖的package包/类
/**
 * Get the Maven Facade object of the new created project
 */
private IMavenProjectFacade getFacade(IProject project) {
	ProjectRegistryManager projectManager = MavenPluginActivator.getDefault().getMavenProjectManagerImpl();
	IMavenProjectFacade facade = null;

	while (facade == null) {
		// wait until the project was created
		try {
			Thread.sleep(100);
		} catch (InterruptedException e) {
		}
		facade = projectManager.create(project, new NullProgressMonitor());
	}

	return facade;
}
 
开发者ID:dice-project,项目名称:DICE-Platform,代码行数:19,代码来源:QualityTestingNewProjectWizard.java


示例2: updateProjectConfiguration

import org.eclipse.m2e.core.internal.MavenPluginActivator; //导入依赖的package包/类
/**
 * Update the new created project
 */
private void updateProjectConfiguration(IMavenProjectFacade facade) {
	ProjectRegistryManager projectManager = MavenPluginActivator.getDefault().getMavenProjectManagerImpl();
	try {
		MavenProject mavenProject = facade.getMavenProject(new NullProgressMonitor());
		ProjectConfigurationRequest request = new ProjectConfigurationRequest(facade, mavenProject);
		MavenExecutionContext executionContext = projectManager.createExecutionContext(facade.getPom(),
				facade.getResolverConfiguration());

		executionContext.execute(mavenProject, new ICallable<Void>() {
			public Void call(IMavenExecutionContext context, IProgressMonitor monitor) throws CoreException {
				ILifecycleMapping lifecycleMapping = LifecycleMappingFactory.getLifecycleMapping(facade);

				if (lifecycleMapping != null) {
					lifecycleMapping.configure(request, monitor);

					LifecycleMappingConfiguration.persist(request.getMavenProjectFacade(), monitor);
				}
				return null;
			}
		}, new NullProgressMonitor());
	} catch (CoreException e) {
		e.printStackTrace();
	}
}
 
开发者ID:dice-project,项目名称:DICE-Platform,代码行数:28,代码来源:QualityTestingNewProjectWizard.java


示例3: stop

import org.eclipse.m2e.core.internal.MavenPluginActivator; //导入依赖的package包/类
/**
 * @noreference see class javadoc
 */
public void stop(BundleContext context) throws Exception {
	MavenProjectManager projectManager = MavenPluginActivator.getDefault().getMavenProjectManager();
	projectManager.removeMavenProjectChangedListener(buildpathManager);

	/*
	 * workspace.removeResourceChangeListener(this.buildpathManager);
	 * 
	 * DebugPlugin.getDefault().getLaunchManager().
	 * removeLaunchConfigurationListener(launchConfigurationListener);
	 * projectManager
	 * .removeMavenProjectChangedListener(launchConfigurationListener);
	 * 
	 * this.launchConfigurationListener = null; this.mavenClassifierManager
	 * = null;
	 */
	this.buildpathManager = null;
}
 
开发者ID:maven-nar,项目名称:m2e-nar,代码行数:21,代码来源:MavenNarPlugin.java


示例4: start

import org.eclipse.m2e.core.internal.MavenPluginActivator; //导入依赖的package包/类
/**
 * @noreference see class javadoc
 */
public void start(BundleContext bundleContext) throws Exception {
	super.start(bundleContext);

	if (Boolean.parseBoolean(Platform.getDebugOption(PLUGIN_ID + "/debug/initialization"))) {
		System.err.println("### executing start() " + PLUGIN_ID);
		new Throwable().printStackTrace();
	}

	// Make sure the m2e jdt plugin is initialised first
	MavenJdtPlugin.getDefault();

	MavenProjectManager projectManager = MavenPluginActivator.getDefault().getMavenProjectManager();

	this.buildpathManager = new BuildPathManager(projectManager);
	projectManager.addMavenProjectChangedListener(this.buildpathManager);

	/*
	 * this.launchConfigurationListener = new
	 * MavenLaunchConfigurationListener();
	 * DebugPlugin.getDefault().getLaunchManager
	 * ().addLaunchConfigurationListener(launchConfigurationListener);
	 * projectManager
	 * .addMavenProjectChangedListener(launchConfigurationListener);
	 * 
	 * this.mavenClassifierManager = new MavenClassifierManager();
	 */
}
 
开发者ID:maven-nar,项目名称:m2e-nar,代码行数:31,代码来源:MavenNarPlugin.java


示例5: initialize

import org.eclipse.m2e.core.internal.MavenPluginActivator; //导入依赖的package包/类
void initialize() {
    if (propertiesTable == null) {
        return;
    }

    Archetype archetype = wizardPage.getChosenArchetype();
    if (archetype == null) {
        return;
    }

    try {
        ArchetypeManager archetypeManager = MavenPluginActivator
                .getDefault().getArchetypeManager();
        ArtifactRepository remoteArchetypeRepository = archetypeManager
                .getArchetypeRepository(archetype);
        properties = (List<RequiredProperty>) archetypeManager
                .getRequiredProperties(archetype,
                        remoteArchetypeRepository, null);

        Table table = propertiesViewer.getTable();
        table.setItemCount(properties.size());
        int i = 0;
        for (Iterator<RequiredProperty> it = properties.iterator(); it
                .hasNext();) {
            RequiredProperty rp = it.next();
            TableItem item = table.getItem(i++);
            if (!rp.getKey().equals(item.getText())) {
                // then create it - otherwise, reuse it
                item.setText(0, rp.getKey());
                item.setText(1, "");
                item.setData(item);
            }
        }
    } catch (Exception e) {
        throw new RuntimeException("Could not process archetype: "
                + e.getMessage(), e);
    }

}
 
开发者ID:Adobe-Marketing-Cloud,项目名称:aem-eclipse-developer-tools,代码行数:40,代码来源:AdvancedSettingsComponent.java


示例6: requestPomTranslation

import org.eclipse.m2e.core.internal.MavenPluginActivator; //导入依赖的package包/类
protected void requestPomTranslation(List<IFile> poms) {
  if(poms != null && !poms.isEmpty()) {
    LOG.debug("Automatic update of {}", poms);
    new PomTranslatorJob(MavenPlugin.getMavenProjectRegistry(), MavenPluginActivator.getDefault().getMavenMarkerManager(), poms).schedule();
  }
}
 
开发者ID:jbosstools,项目名称:m2e-polyglot-poc,代码行数:7,代码来源:PolyglotPomChangeListener.java


示例7: PomTranslatorJob

import org.eclipse.m2e.core.internal.MavenPluginActivator; //导入依赖的package包/类
public PomTranslatorJob(List<IFile> poms) {
 this(MavenPlugin.getMavenProjectRegistry(), MavenPluginActivator.getDefault().getMavenMarkerManager(), poms);
}
 
开发者ID:jbosstools,项目名称:m2e-polyglot-poc,代码行数:4,代码来源:PomTranslatorJob.java


示例8: validateCdtProject

import org.eclipse.m2e.core.internal.MavenPluginActivator; //导入依赖的package包/类
private void validateCdtProject(IProject project) {
	final MavenProjectManager projectManager = MavenPluginActivator.getDefault().getMavenProjectManager();
	final IMavenProjectFacade facade = projectManager.getProject(project);
	assertNotNull(facade);
}
 
开发者ID:maven-nar,项目名称:m2e-nar,代码行数:6,代码来源:AbstractTestBuild.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java IncCounterProcessorRequest类代码示例发布时间:2022-05-22
下一篇:
Java ComputeJob类代码示例发布时间: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