Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 296457
Collapse All | Expand All

(-)src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java (-2 / +4 lines)
Lines 288-295 Link Here
288
					message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JRE_COMPILATION_PROFILE, PDECoreMessages.BuildErrorReporter_CompilercomplianceLevel);
288
					message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JRE_COMPILATION_PROFILE, PDECoreMessages.BuildErrorReporter_CompilercomplianceLevel);
289
					prepareError(PROPERTY_JRE_COMPILATION_PROFILE, projectJavaCompatibility, message, PDEMarkerFactory.B_ADDDITION, PDEMarkerFactory.CAT_EE);
289
					prepareError(PROPERTY_JRE_COMPILATION_PROFILE, projectJavaCompatibility, message, PDEMarkerFactory.B_ADDDITION, PDEMarkerFactory.CAT_EE);
290
				} else {
290
				} else {
291
					message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JRE_COMPILATION_PROFILE, PDECoreMessages.BuildErrorReporter_CompilercomplianceLevel);
291
					if (!projectJavaCompatibility.equalsIgnoreCase(jreCompilationProfileEntry.getTokens()[0])) {
292
					prepareError(PROPERTY_JRE_COMPILATION_PROFILE, projectJavaCompatibility, message, PDEMarkerFactory.B_REPLACE, PDEMarkerFactory.CAT_EE);
292
						message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JRE_COMPILATION_PROFILE, PDECoreMessages.BuildErrorReporter_CompilercomplianceLevel);
293
						prepareError(PROPERTY_JRE_COMPILATION_PROFILE, projectJavaCompatibility, message, PDEMarkerFactory.B_REPLACE, PDEMarkerFactory.CAT_EE);
294
					}
293
				}
295
				}
294
			} else {
296
			} else {
295
				if (javacSourceEntry == null) {
297
				if (javacSourceEntry == null) {
(-)src/org/eclipse/pde/internal/ui/correction/MultiFixResolution.java (-9 / +8 lines)
Lines 15-20 Link Here
15
import org.eclipse.core.resources.IResource;
15
import org.eclipse.core.resources.IResource;
16
import org.eclipse.core.runtime.CoreException;
16
import org.eclipse.core.runtime.CoreException;
17
import org.eclipse.pde.internal.core.builders.PDEMarkerFactory;
17
import org.eclipse.pde.internal.core.builders.PDEMarkerFactory;
18
import org.eclipse.pde.internal.ui.PDEPluginImages;
18
import org.eclipse.pde.internal.ui.PDEUIMessages;
19
import org.eclipse.pde.internal.ui.PDEUIMessages;
19
import org.eclipse.swt.graphics.Image;
20
import org.eclipse.swt.graphics.Image;
20
import org.eclipse.ui.IMarkerResolution;
21
import org.eclipse.ui.IMarkerResolution;
Lines 27-52 Link Here
27
public class MultiFixResolution extends WorkbenchMarkerResolution {
28
public class MultiFixResolution extends WorkbenchMarkerResolution {
28
29
29
	IMarker fMarker;
30
	IMarker fMarker;
30
	String fCategory;
31
	// if quick fix is invoked from editor, then fix all related markers. If invoked from problem view, fix only the selected ones.
31
	// if quick fix is invoked from editor, then fix all related markers. If invoked from problem view, fix only the selected ones.
32
	boolean problemViewQuickFix;
32
	boolean problemViewQuickFix;
33
33
34
	public MultiFixResolution(IMarker marker, String category) {
34
	public MultiFixResolution(IMarker marker) {
35
		fMarker = marker;
35
		fMarker = marker;
36
		fCategory = category;
37
		problemViewQuickFix = false;
36
		problemViewQuickFix = false;
38
	}
37
	}
39
38
40
	public IMarker[] findOtherMarkers(IMarker[] markers) {
39
	public IMarker[] findOtherMarkers(IMarker[] markers) {
41
		ArrayList relatedMarkers = new ArrayList();
40
		ArrayList relatedMarkers = new ArrayList();
42
		for (int i = 0; i < markers.length; i++) {
41
		try {
43
			try {
42
			String markerCategory = (String) fMarker.getAttribute(PDEMarkerFactory.CAT_ID);
44
				if (markers[i].getAttribute(PDEMarkerFactory.CAT_ID).equals(fCategory) && !markers[i].equals(fMarker)) {
43
			for (int i = 0; i < markers.length; i++) {
44
				if (markerCategory.equals(markers[i].getAttribute(PDEMarkerFactory.CAT_ID)) && !markers[i].equals(fMarker)) {
45
					relatedMarkers.add(markers[i]);
45
					relatedMarkers.add(markers[i]);
46
				}
46
				}
47
			} catch (CoreException e) {
48
			}
47
			}
49
48
		} catch (CoreException e) {
50
		}
49
		}
51
		problemViewQuickFix = true;
50
		problemViewQuickFix = true;
52
		return (IMarker[]) relatedMarkers.toArray(new IMarker[relatedMarkers.size()]);
51
		return (IMarker[]) relatedMarkers.toArray(new IMarker[relatedMarkers.size()]);
Lines 57-63 Link Here
57
	}
56
	}
58
57
59
	public Image getImage() {
58
	public Image getImage() {
60
		return null;
59
		return PDEPluginImages.DESC_ADD_ATT.createImage();
61
	}
60
	}
62
61
63
	public String getLabel() {
62
	public String getLabel() {
(-)src/org/eclipse/pde/internal/ui/correction/ResolutionGenerator.java (-2 / +7 lines)
Lines 110-117 Link Here
110
		ArrayList resolutions = new ArrayList(2);
110
		ArrayList resolutions = new ArrayList(2);
111
		resolutions.add(new AddBuildEntryResolution(AbstractPDEMarkerResolution.CREATE_TYPE, marker));
111
		resolutions.add(new AddBuildEntryResolution(AbstractPDEMarkerResolution.CREATE_TYPE, marker));
112
		try {
112
		try {
113
			if (marker.getAttribute(PDEMarkerFactory.CAT_ID).equals(PDEMarkerFactory.CAT_EE)) {
113
			String markerCategory = (String) marker.getAttribute(PDEMarkerFactory.CAT_ID);
114
				resolutions.add(new MultiFixResolution(marker, PDEMarkerFactory.CAT_EE));
114
			IMarker[] relatedMarkers = marker.getResource().findMarkers(marker.getType(), true, IResource.DEPTH_INFINITE);
115
			for (int i = 0; i < relatedMarkers.length; i++) {
116
				if (markerCategory.equals(relatedMarkers[i].getAttribute(PDEMarkerFactory.CAT_ID)) && !marker.equals(relatedMarkers[i])) {
117
					resolutions.add(new MultiFixResolution(marker));
118
					break;
119
				}
115
			}
120
			}
116
		} catch (CoreException e) {
121
		} catch (CoreException e) {
117
		}
122
		}
(-)src/org/eclipse/pde/internal/ui/pderesources.properties (-1 / +1 lines)
Lines 2140-2146 Link Here
2140
RenamePluginProcessor_renameProjectDesc=Rename project ''{0}'' to ''{1}''
2140
RenamePluginProcessor_renameProjectDesc=Rename project ''{0}'' to ''{1}''
2141
RemoveInternalDirective_label=Remove redundant x-internal header
2141
RemoveInternalDirective_label=Remove redundant x-internal header
2142
RemoveInternalDirective_desc=The x-friends directive implies x-internal, so the latter is redundant
2142
RemoveInternalDirective_desc=The x-friends directive implies x-internal, so the latter is redundant
2143
MultiFixResolution_FixAll=Add all missing java compiler build entries.
2143
MultiFixResolution_FixAll=Add all missing java compiler build entries
2144
ImportPackageSection_dialogButtonLabel=&Show non-exported packages
2144
ImportPackageSection_dialogButtonLabel=&Show non-exported packages
2145
ExportPackageSection_dialogButtonLabel=&Show non-Java packages
2145
ExportPackageSection_dialogButtonLabel=&Show non-Java packages
2146
MissingResourcePage_missingResource=Missing Resource
2146
MissingResourcePage_missingResource=Missing Resource

Return to bug 296457