public void removeExpressionExtensions(IProject project) throws CoreException { final List<Pair<String, String>> removableExtensions = Lists.newArrayList(); removableExtensions.add( new Pair<String, String>("", "org.eclipse.incquery.runtime.queryspecification")); removableExtensions.add( new Pair<String, String>("", MigratorConstants.XEXPRESSIONEVALUATOR_EXTENSION_POINT_ID)); ProjectGenerationHelper.removeAllExtension(project, removableExtensions); }
@Override protected IStatus run(IProgressMonitor monitor) { try { repairErroneousBuilderEntry(project); reorderBuilderEntries(project); final ImmutableList<String> newIDs = project.hasNature(ViatraQueryNature.NATURE_ID) ? ImmutableList.<String>of() : ImmutableList.of(ViatraQueryNature.NATURE_ID); Builder<String> builder = ImmutableList.<String>builder(); for (String ID : MigratorConstants.INCORRECT_NATURE_IDS) { if (project.hasNature(ID)) { builder.add(ID); } } final ImmutableList<String> oldIDs = builder.build(); if (newIDs.size() + oldIDs.size() > 0) { ProjectGenerationHelper.updateNatures(project, newIDs, oldIDs, monitor); } removeGlobalEiq(project); renamePatternDefinitionFiles(project); if (PDE.hasPluginNature(project)) { removeExpressionExtensions(project); ProjectGenerationHelper.ensurePackageImports( project, ImmutableList.<String>of("org.apache.log4j")); } project.build(IncrementalProjectBuilder.CLEAN_BUILD, monitor); } catch (CoreException e) { return new Status( IStatus.ERROR, ViatraQueryGUIPlugin.PLUGIN_ID, "Error updating project natures", e); } return Status.OK_STATUS; }