|
12 | 12 | * IBM Corporation - initial API and implementation |
13 | 13 | * Code 9 Corporation - on going enhancements and maintenance |
14 | 14 | * Johannes Ahlers <[email protected]> - bug 477677 |
| 15 | + * Daniel Kruegler - #2031 - PDE should not warn if resource URI of unknown scheme cannot be found |
15 | 16 | *******************************************************************************/ |
16 | 17 | package org.eclipse.pde.internal.ui.preferences; |
17 | 18 |
|
|
45 | 46 | import org.eclipse.core.runtime.preferences.InstanceScope; |
46 | 47 | import org.eclipse.jface.dialogs.IDialogSettings; |
47 | 48 | import org.eclipse.jface.dialogs.MessageDialog; |
| 49 | +import org.eclipse.jface.layout.GridDataFactory; |
| 50 | +import org.eclipse.jface.layout.GridLayoutFactory; |
48 | 51 | import org.eclipse.jface.resource.JFaceResources; |
49 | 52 | import org.eclipse.jface.util.Util; |
50 | 53 | import org.eclipse.jface.window.Window; |
@@ -227,6 +230,7 @@ protected final static Key getPDEPrefKey(String key) { |
227 | 230 | private static final Key KEY_P_UNKNOWN_CLASS = getPDEPrefKey(CompilerFlags.P_UNKNOWN_CLASS); |
228 | 231 | private static final Key KEY_P_UNKNOWN_RESOURCE = getPDEPrefKey(CompilerFlags.P_UNKNOWN_RESOURCE); |
229 | 232 | private static final Key KEY_P_UNKNOWN_IDENTIFIER = getPDEPrefKey(CompilerFlags.P_UNKNOWN_IDENTIFIER); |
| 233 | + private static final Key KEY_P_IGNORED_RESOURCE_PROTOCOLS = getPDEPrefKey(CompilerFlags.P_IGNORED_RESOURCE_PROTOCOLS); |
230 | 234 |
|
231 | 235 | //general |
232 | 236 | private static final Key KEY_P_DISCOURAGED_CLASS = getPDEPrefKey(CompilerFlags.P_DISCOURAGED_CLASS); |
@@ -260,12 +264,20 @@ protected final static Key getPDEPrefKey(String key) { |
260 | 264 | private static final Key KEY_S_DOC_FOLDER = getPDEPrefKey(CompilerFlags.S_DOC_FOLDER); |
261 | 265 | private static final Key KEY_S_OPEN_TAGS = getPDEPrefKey(CompilerFlags.S_OPEN_TAGS); |
262 | 266 |
|
263 | | - private static String[] SEVERITIES = {PDEUIMessages.PDECompilersConfigurationBlock_error, |
| 267 | + private static final String[] SEVERITIES = { PDEUIMessages.PDECompilersConfigurationBlock_error, |
264 | 268 | PDEUIMessages.PDECompilersConfigurationBlock_warning, PDEUIMessages.PDECompilersConfigurationBlock_info, |
265 | | - PDEUIMessages.PDECompilersConfigurationBlock_ignore |
266 | | - }; |
267 | | - |
268 | | - private static Key[] fgAllKeys = {KEY_F_UNRESOLVED_FEATURES, KEY_F_UNRESOLVED_PLUGINS, KEY_P_BUILD, KEY_P_BUILD_MISSING_OUTPUT, KEY_P_BUILD_SOURCE_LIBRARY, KEY_P_BUILD_OUTPUT_LIBRARY, KEY_P_BUILD_SRC_INCLUDES, KEY_P_BUILD_BIN_INCLUDES, KEY_P_BUILD_JAVA_COMPLIANCE, KEY_P_BUILD_JAVA_COMPILER, KEY_P_BUILD_ENCODINGS, KEY_P_INTERNAL, KEY_P_SERVICE_COMP_WITHOUT_LAZY, KEY_P_NO_AUTOMATIC_MODULE_NAME, KEY_P_DEPRECATED, KEY_P_DISCOURAGED_CLASS, KEY_P_INCOMPATIBLE_ENV, KEY_P_MISSING_EXPORT_PKGS, KEY_P_NO_REQUIRED_ATT, KEY_P_NOT_EXTERNALIZED, KEY_P_UNKNOWN_ATTRIBUTE, KEY_P_UNKNOWN_CLASS, KEY_P_UNKNOWN_ELEMENT, KEY_P_UNKNOWN_IDENTIFIER, KEY_P_UNKNOWN_RESOURCE, KEY_P_UNRESOLVED_EX_POINTS, KEY_P_UNRESOLVED_IMPORTS, KEY_P_VERSION_EXP_PKG, KEY_P_VERSION_IMP_PKG, KEY_P_VERSION_REQ_BUNDLE, KEY_P_VERSION_EXEC_ENV_TOO_LOW, KEY_S_CREATE_DOCS, KEY_S_DOC_FOLDER, KEY_S_OPEN_TAGS }; |
| 269 | + PDEUIMessages.PDECompilersConfigurationBlock_ignore }; |
| 270 | + |
| 271 | + private static final Key[] fgAllKeys = { KEY_F_UNRESOLVED_FEATURES, KEY_F_UNRESOLVED_PLUGINS, KEY_P_BUILD, |
| 272 | + KEY_P_BUILD_MISSING_OUTPUT, KEY_P_BUILD_SOURCE_LIBRARY, KEY_P_BUILD_OUTPUT_LIBRARY, |
| 273 | + KEY_P_BUILD_SRC_INCLUDES, KEY_P_BUILD_BIN_INCLUDES, KEY_P_BUILD_JAVA_COMPLIANCE, KEY_P_BUILD_JAVA_COMPILER, |
| 274 | + KEY_P_BUILD_ENCODINGS, KEY_P_INTERNAL, KEY_P_SERVICE_COMP_WITHOUT_LAZY, KEY_P_NO_AUTOMATIC_MODULE_NAME, |
| 275 | + KEY_P_DEPRECATED, KEY_P_DISCOURAGED_CLASS, KEY_P_INCOMPATIBLE_ENV, KEY_P_MISSING_EXPORT_PKGS, |
| 276 | + KEY_P_NO_REQUIRED_ATT, KEY_P_NOT_EXTERNALIZED, KEY_P_UNKNOWN_ATTRIBUTE, KEY_P_UNKNOWN_CLASS, |
| 277 | + KEY_P_UNKNOWN_ELEMENT, KEY_P_UNKNOWN_IDENTIFIER, KEY_P_UNKNOWN_RESOURCE, KEY_P_IGNORED_RESOURCE_PROTOCOLS, |
| 278 | + KEY_P_UNRESOLVED_EX_POINTS, KEY_P_UNRESOLVED_IMPORTS, KEY_P_VERSION_EXP_PKG, KEY_P_VERSION_IMP_PKG, |
| 279 | + KEY_P_VERSION_REQ_BUNDLE, KEY_P_VERSION_EXEC_ENV_TOO_LOW, KEY_S_CREATE_DOCS, KEY_S_DOC_FOLDER, |
| 280 | + KEY_S_OPEN_TAGS }; |
269 | 281 |
|
270 | 282 | /** |
271 | 283 | * Constant representing the {@link IDialogSettings} section for this block |
@@ -564,6 +576,10 @@ private Composite createPage(int kind, Composite folder, String name, String des |
564 | 576 | // References |
565 | 577 | client = createExpansibleComposite(sbody, PDEUIMessages.PDECompilersConfigurationBlock_references); |
566 | 578 | initializeComboControls(client, new String[] {PDEUIMessages.compilers_p_unknown_element, PDEUIMessages.compilers_p_unknown_attribute, PDEUIMessages.compilers_p_unknown_class, PDEUIMessages.compilers_p_discouraged_class, PDEUIMessages.compilers_p_unknown_resource, PDEUIMessages.compilers_p_unknown_identifier}, new Key[] {KEY_P_UNKNOWN_ELEMENT, KEY_P_UNKNOWN_ATTRIBUTE, KEY_P_UNKNOWN_CLASS, KEY_P_DISCOURAGED_CLASS, KEY_P_UNKNOWN_RESOURCE, KEY_P_UNKNOWN_IDENTIFIER,}, CompilerFlags.PLUGIN_FLAGS); |
| 579 | + Composite comp = createComposite(client, 2, 2, GridData.FILL_HORIZONTAL, 0, 0); |
| 580 | + createTextControl(comp, PDEUIMessages.compilers_p_ignored_uri_protocols, |
| 581 | + KEY_P_IGNORED_RESOURCE_PROTOCOLS, CompilerFlags.PLUGIN_FLAGS); |
| 582 | + SWTFactory.createLabel(comp, PDEUIMessages.compilers_p_ignored_uri_protocols_details, 2); |
567 | 583 |
|
568 | 584 | break; |
569 | 585 | } |
@@ -592,6 +608,17 @@ private void initializeComboControls(Composite composite, String[] labels, Key[] |
592 | 608 | } |
593 | 609 | } |
594 | 610 |
|
| 611 | + /** |
| 612 | + * Creates a composite without inheriting the font from its parent. |
| 613 | + */ |
| 614 | + private static Composite createComposite(Composite parent, int columns, int hspan, int fill, int marginwidth, |
| 615 | + int marginheight) { |
| 616 | + Composite composite = new Composite(parent, SWT.NONE); |
| 617 | + GridLayoutFactory.swtDefaults().numColumns(columns).margins(marginwidth, marginheight).applyTo(composite); |
| 618 | + GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(hspan, 1).applyTo(composite); |
| 619 | + return composite; |
| 620 | + } |
| 621 | + |
595 | 622 | /** |
596 | 623 | * Creates a checkbox button control in the parent |
597 | 624 | */ |
|
0 commit comments