1 /******************************************************************************* 2 * Copyright (c) 2005, 2019 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.pde.internal.ui.correction; 15 16 import org.eclipse.core.resources.IMarker; 17 import org.eclipse.pde.internal.core.text.bundle.BundleModel; 18 import org.eclipse.pde.internal.ui.PDEUIMessages; 19 import org.eclipse.pde.internal.ui.wizards.tools.OrganizeManifest; 20 21 public class OrganizeRequireBundleResolution extends AbstractManifestMarkerResolution { 22 23 private boolean fRemoveImports; 24 OrganizeRequireBundleResolution(int type, boolean removeImports, IMarker marker)25 public OrganizeRequireBundleResolution(int type, boolean removeImports, IMarker marker) { 26 super(type, marker); 27 fRemoveImports = removeImports; 28 } 29 30 @Override createChange(BundleModel model)31 protected void createChange(BundleModel model) { 32 OrganizeManifest.organizeRequireBundles(model.getBundle(), fRemoveImports); 33 } 34 35 @Override getDescription()36 public String getDescription() { 37 return PDEUIMessages.OrganizeRequireBundleResolution_Description; 38 } 39 40 @Override getLabel()41 public String getLabel() { 42 return PDEUIMessages.OrganizeRequireBundleResolution_Label; 43 } 44 45 } 46