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

Collapse All | Expand All

(-)src/org/eclipse/pde/internal/build/IBuildPropertiesConstants.java (+1 lines)
Lines 62-67 Link Here
62
	public static final String PROPERTY_JAVAC_CUSTOM_ENCODINGS_PREFIX = "javacCustomEncodings."; //$NON-NLS-1$
62
	public static final String PROPERTY_JAVAC_CUSTOM_ENCODINGS_PREFIX = "javacCustomEncodings."; //$NON-NLS-1$
63
	public static final String PROPERTY_JAVAC_WARNINGS_PREFIX = "javacWarnings."; //$NON-NLS-1$
63
	public static final String PROPERTY_JAVAC_WARNINGS_PREFIX = "javacWarnings."; //$NON-NLS-1$
64
	public static final String PROPERTY_JAVAC_ERRORS_PREFIX = "javacErrors."; //$NON-NLS-1$
64
	public static final String PROPERTY_JAVAC_ERRORS_PREFIX = "javacErrors."; //$NON-NLS-1$
65
	public static final String PROPERTY_PROJECT_SETTINGS = "javacProjectSettings"; //$NON-NLS-1$
65
66
66
	public static final String DEFAULT_MATCH_ALL = "*"; //$NON-NLS-1$
67
	public static final String DEFAULT_MATCH_ALL = "*"; //$NON-NLS-1$
67
	public static final String DEFAULT_FINAL_SHAPE = "*"; //$NON-NLS-1$
68
	public static final String DEFAULT_FINAL_SHAPE = "*"; //$NON-NLS-1$
(-)src/org/eclipse/pde/internal/build/IPDEBuildConstants.java (+2 lines)
Lines 146-149 Link Here
146
	//container feature used in building .product files
146
	//container feature used in building .product files
147
	public final static String CONTAINER_FEATURE = "org.eclipse.pde.build.container.feature"; //$NON-NLS-1$
147
	public final static String CONTAINER_FEATURE = "org.eclipse.pde.build.container.feature"; //$NON-NLS-1$
148
	public final static String UI_CONTAINER_FEATURE = "org.eclipse.pde.container.feature"; //$NON-NLS-1$
148
	public final static String UI_CONTAINER_FEATURE = "org.eclipse.pde.container.feature"; //$NON-NLS-1$
149
150
	public final static String JDT_CORE_PREFS = ".settings/org.eclipse.jdt.core.prefs"; //$NON-NLS-1$
149
}
151
}
(-)src/org/eclipse/pde/internal/build/ant/JavacTask.java (+16 lines)
Lines 37-42 Link Here
37
	protected String errorProperty;
37
	protected String errorProperty;
38
	protected String[] excludes;
38
	protected String[] excludes;
39
	protected String compilerAdapter;
39
	protected String compilerAdapter;
40
	protected String warningProperties;
40
	private boolean adapterUseLog = false;
41
	private boolean adapterUseLog = false;
41
	private boolean adapterUseArgFile = false;
42
	private boolean adapterUseArgFile = false;
42
43
Lines 96-101 Link Here
96
			script.println("/>"); //$NON-NLS-1$
97
			script.println("/>"); //$NON-NLS-1$
97
		}
98
		}
98
99
100
		if (warningProperties != null) {
101
			script.printTab();
102
			script.print("<compilerarg"); //$NON-NLS-1$
103
			script.printAttribute("line", "-properties '" + warningProperties + "'", true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
104
			if (compilerAdapter != null && adapterUseArgFile)
105
				script.printAttribute("compiler", compilerAdapter, true); //$NON-NLS-1$
106
			else
107
				script.printAttribute("compiler", IXMLConstants.JDT_COMPILER_ADAPTER, true); //$NON-NLS-1$
108
			script.println("/>"); //$NON-NLS-1$
109
		}
110
99
		if (compileArgsFile != null) {
111
		if (compileArgsFile != null) {
100
			script.printTabs();
112
			script.printTabs();
101
			script.print("<compilerarg"); //$NON-NLS-1$
113
			script.print("<compilerarg"); //$NON-NLS-1$
Lines 269-272 Link Here
269
		this.adapterUseArgFile = useFile;
281
		this.adapterUseArgFile = useFile;
270
282
271
	}
283
	}
284
285
	public void setWarningProperties(String warningProperties) {
286
		this.warningProperties = warningProperties;
287
	}
272
}
288
}
(-)src/org/eclipse/pde/internal/build/builder/ModelBuildScriptGenerator.java (+13 lines)
Lines 114-119 Link Here
114
	private String customCallbacksBuildpath = null;
114
	private String customCallbacksBuildpath = null;
115
	private String customCallbacksFailOnError = null;
115
	private String customCallbacksFailOnError = null;
116
	private String customCallbacksInheritAll = null;
116
	private String customCallbacksInheritAll = null;
117
	private String warningProperties = null;
117
	// array of extensions of recognized source files (eg- *.java, *.aj, etc)
118
	// array of extensions of recognized source files (eg- *.java, *.aj, etc)
118
	private String[] sourceFileExtensions;
119
	private String[] sourceFileExtensions;
119
	//This list is initialized by the generateBuildJarsTarget
120
	//This list is initialized by the generateBuildJarsTarget
Lines 226-231 Link Here
226
				}
227
				}
227
			}
228
			}
228
		}
229
		}
230
231
		String projectWarningSettings = getBuildProperties().getProperty(PROPERTY_PROJECT_SETTINGS);
232
		if (Boolean.valueOf(projectWarningSettings).booleanValue()) {
233
			//find default prefs file
234
			if (new File(model.getLocation(), JDT_CORE_PREFS).exists())
235
				warningProperties = JDT_CORE_PREFS;
236
		} else if (projectWarningSettings != null && !FALSE.equalsIgnoreCase(projectWarningSettings)) {
237
			if (new File(model.getLocation(), projectWarningSettings).exists())
238
				warningProperties = projectWarningSettings;
239
		}
229
	}
240
	}
230
241
231
	protected static boolean findAndReplaceDot(String[] classpathInfo) {
242
	protected static boolean findAndReplaceDot(String[] classpathInfo) {
Lines 1475-1480 Link Here
1475
			javac.setCompileArgs(Utils.getPropertyFormat(PROPERTY_JAVAC_COMPILERARG));
1486
			javac.setCompileArgs(Utils.getPropertyFormat(PROPERTY_JAVAC_COMPILERARG));
1476
			javac.setSrcdir(sources);
1487
			javac.setSrcdir(sources);
1477
			javac.setLogExtension(Utils.getPropertyFormat(PROPERTY_LOG_EXTENSION));
1488
			javac.setLogExtension(Utils.getPropertyFormat(PROPERTY_LOG_EXTENSION));
1489
			if (warningProperties != null)
1490
				javac.setWarningProperties(Utils.getPropertyFormat(PROPERTY_BASEDIR) + '/' + warningProperties);
1478
			if (generateErrorPropertyAttribute)
1491
			if (generateErrorPropertyAttribute)
1479
				javac.setErrorProperty(PROPERTY_COMPILATION_ERROR);
1492
				javac.setErrorProperty(PROPERTY_COMPILATION_ERROR);
1480
			generateCompilerSettings(javac, entry, classpath);
1493
			generateCompilerSettings(javac, entry, classpath);

Return to bug 291528