本文整理汇总了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;
}
示例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();
}
}
示例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;
}
示例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();
*/
}
示例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();
}
}
示例7: PomTranslatorJob
import org.eclipse.m2e.core.internal.MavenPluginActivator; //导入依赖的package包/类
public PomTranslatorJob(List<IFile> poms) {
this(MavenPlugin.getMavenProjectRegistry(), MavenPluginActivator.getDefault().getMavenMarkerManager(), poms);
}
示例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);
}