View | Details | Raw Unified | Return to bug 221998 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/pde/internal/core/ICoreConstants.java (-5 / +10 lines)
Lines 129-139 Link Here
129
	public static final String[] EE_TOKENS = new String[] {"wassim", "zx", "bbauman", "cherie", "jlb" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
129
	public static final String[] EE_TOKENS = new String[] {"wassim", "zx", "bbauman", "cherie", "jlb" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
130
	};
130
	};
131
131
132
	// Common folder names
133
	public static String MANIFEST_FOLDER_NAME = "META-INF/"; //$NON-NLS-1$
134
	public static String OSGI_INF_FOLDER_NAME = "OSGI-INF/"; //$NON-NLS-1$
135
132
	// Common paths
136
	// Common paths
133
	public static IPath MANIFEST_PATH = new Path("META-INF/MANIFEST.MF"); //$NON-NLS-1$
137
	public static IPath MANIFEST_PATH = new Path(BUNDLE_FILENAME_DESCRIPTOR);
134
	public static IPath PLUGIN_PATH = new Path("plugin.xml"); //$NON-NLS-1$
138
	public static IPath PLUGIN_PATH = new Path(PLUGIN_FILENAME_DESCRIPTOR);
135
	public static IPath FRAGMENT_PATH = new Path("fragment.xml"); //$NON-NLS-1$
139
	public static IPath FRAGMENT_PATH = new Path(FRAGMENT_FILENAME_DESCRIPTOR);
136
	public static IPath FEATURE_PATH = new Path("feature.xml"); //$NON-NLS-1$
140
	public static IPath FEATURE_PATH = new Path(FEATURE_FILENAME_DESCRIPTOR);
137
	public static IPath BUILD_PROPERTIES_PATH = new Path("build.properties"); //$NON-NLS-1$
141
	public static IPath BUILD_PROPERTIES_PATH = new Path(BUILD_FILENAME_DESCRIPTOR);
142
	public static IPath OSGI_INF_PATH = new Path(OSGI_INF_FOLDER_NAME);
138
143
139
}
144
}
(-)src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java (-32 / +22 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 8-13 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Brock Janiczak <brockj@tpg.com.au> - bug 191545
10
 *     Brock Janiczak <brockj@tpg.com.au> - bug 191545
11
 *     Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bug 221998
11
 *******************************************************************************/
12
 *******************************************************************************/
12
package org.eclipse.pde.internal.core.builders;
13
package org.eclipse.pde.internal.core.builders;
13
14
Lines 16-54 Link Here
16
import java.util.ArrayList;
17
import java.util.ArrayList;
17
import java.util.regex.Matcher;
18
import java.util.regex.Matcher;
18
import java.util.regex.Pattern;
19
import java.util.regex.Pattern;
19
20
import org.eclipse.core.resources.*;
20
import org.eclipse.core.resources.IFile;
21
import org.eclipse.core.runtime.*;
21
import org.eclipse.core.resources.IFolder;
22
import org.eclipse.jdt.core.*;
22
import org.eclipse.core.resources.IMarker;
23
import org.eclipse.core.resources.IProject;
24
import org.eclipse.core.resources.IResource;
25
import org.eclipse.core.runtime.CoreException;
26
import org.eclipse.core.runtime.IPath;
27
import org.eclipse.core.runtime.IProgressMonitor;
28
import org.eclipse.core.runtime.Path;
29
import org.eclipse.jdt.core.IClasspathEntry;
30
import org.eclipse.jdt.core.IJavaProject;
31
import org.eclipse.jdt.core.JavaCore;
32
import org.eclipse.jdt.core.JavaModelException;
33
import org.eclipse.jface.text.BadLocationException;
23
import org.eclipse.jface.text.BadLocationException;
34
import org.eclipse.jface.text.IDocument;
24
import org.eclipse.jface.text.IDocument;
35
import org.eclipse.osgi.service.resolver.BundleDescription;
25
import org.eclipse.osgi.service.resolver.BundleDescription;
36
import org.eclipse.osgi.util.NLS;
26
import org.eclipse.osgi.util.NLS;
37
import org.eclipse.pde.core.build.IBuild;
27
import org.eclipse.pde.core.build.IBuild;
38
import org.eclipse.pde.core.build.IBuildEntry;
28
import org.eclipse.pde.core.build.IBuildEntry;
39
import org.eclipse.pde.core.plugin.IPluginLibrary;
29
import org.eclipse.pde.core.plugin.*;
40
import org.eclipse.pde.core.plugin.IPluginModelBase;
41
import org.eclipse.pde.core.plugin.PluginRegistry;
42
import org.eclipse.pde.internal.build.IBuildPropertiesConstants;
30
import org.eclipse.pde.internal.build.IBuildPropertiesConstants;
43
import org.eclipse.pde.internal.core.ClasspathUtilCore;
31
import org.eclipse.pde.internal.core.*;
44
import org.eclipse.pde.internal.core.ICoreConstants;
45
import org.eclipse.pde.internal.core.PDECore;
46
import org.eclipse.pde.internal.core.PDECoreMessages;
47
import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
32
import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
48
import org.eclipse.pde.internal.core.ibundle.IBundleFragmentModel;
33
import org.eclipse.pde.internal.core.ibundle.*;
49
import org.eclipse.pde.internal.core.ibundle.IBundleModel;
50
import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase;
51
import org.eclipse.pde.internal.core.ibundle.IManifestHeader;
52
import org.eclipse.pde.internal.core.text.build.BuildEntry;
34
import org.eclipse.pde.internal.core.text.build.BuildEntry;
53
import org.eclipse.pde.internal.core.text.build.BuildModel;
35
import org.eclipse.pde.internal.core.text.build.BuildModel;
54
import org.eclipse.pde.internal.core.util.CoreUtility;
36
import org.eclipse.pde.internal.core.util.CoreUtility;
Lines 207-226 Link Here
207
	private void validateBinIncludes(IBuildEntry binIncludes) {
189
	private void validateBinIncludes(IBuildEntry binIncludes) {
208
		// make sure we have a manifest entry
190
		// make sure we have a manifest entry
209
		if (fProject.exists(ICoreConstants.MANIFEST_PATH)) {
191
		if (fProject.exists(ICoreConstants.MANIFEST_PATH)) {
210
			String key = "META-INF/"; //$NON-NLS-1$
192
			validateBinIncludes(binIncludes, ICoreConstants.MANIFEST_FOLDER_NAME);
211
			validateBinIncludes(binIncludes, key);
193
		}
194
195
		// if we have an OSGI_INF/ directory, let's do some validation
196
		if (fProject.exists(ICoreConstants.OSGI_INF_PATH)) {
197
			try {
198
				IFolder folder = fProject.getFolder(ICoreConstants.OSGI_INF_PATH);
199
				if (folder.members().length > 0) { // only validate if we have something in it
200
					validateBinIncludes(binIncludes, ICoreConstants.OSGI_INF_FOLDER_NAME);
201
				}
202
			} catch (CoreException e) { // do nothing
203
			}
212
		}
204
		}
213
205
214
		// make sure if we're a fragment, we have a fragment.xml entry
206
		// make sure if we're a fragment, we have a fragment.xml entry
215
		if (fProject.exists(ICoreConstants.FRAGMENT_PATH)) {
207
		if (fProject.exists(ICoreConstants.FRAGMENT_PATH)) {
216
			String key = "fragment.xml"; //$NON-NLS-1$
208
			validateBinIncludes(binIncludes, ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR);
217
			validateBinIncludes(binIncludes, key);
218
		}
209
		}
219
210
220
		// make sure if we're a plugin, we have a plugin.xml entry
211
		// make sure if we're a plugin, we have a plugin.xml entry
221
		if (fProject.exists(ICoreConstants.PLUGIN_PATH)) {
212
		if (fProject.exists(ICoreConstants.PLUGIN_PATH)) {
222
			String key = "plugin.xml"; //$NON-NLS-1$
213
			validateBinIncludes(binIncludes, ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR);
223
			validateBinIncludes(binIncludes, key);
224
		}
214
		}
225
215
226
		// validate for bundle localization
216
		// validate for bundle localization

Return to bug 221998