diff options
author | itrimble | 2011-01-21 19:54:48 +0000 |
---|---|---|
committer | itrimble | 2011-01-21 19:54:48 +0000 |
commit | d8e09921ad50c594e9d9ff7965bd1c18e2a633d2 (patch) | |
tree | ab0154e7c66524d64877b112c428647a8f70a874 | |
parent | 390a446a801065590596e5dc88af4c1b1b5d31a3 (diff) | |
download | webtools.jsf-d8e09921ad50c594e9d9ff7965bd1c18e2a633d2.tar.gz webtools.jsf-d8e09921ad50c594e9d9ff7965bd1c18e2a633d2.tar.xz webtools.jsf-d8e09921ad50c594e9d9ff7965bd1c18e2a633d2.zip |
PMC_approved (1 vote):Root_R3_2_maintenance
Bug 248891 - Translated color values are inserted
Bug 291759 - NPE in DefaultBeanSymbolSourceProvider.isBeanScopeInMask
Bug 333783 - AppConfig validator fails when it encounters bodiless nodes
3 files changed, 43 insertions, 20 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/symbols/DefaultBeanSymbolSourceProvider.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/symbols/DefaultBeanSymbolSourceProvider.java index f5f1ee85f..5984adb04 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/symbols/DefaultBeanSymbolSourceProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/symbols/DefaultBeanSymbolSourceProvider.java @@ -226,7 +226,8 @@ public class DefaultBeanSymbolSourceProvider private boolean isBeanScopeInMask(final ManagedBeanScopeType scope, final int scopeMask) { - final int testScope = ISymbolConstants.getMaskForString(scope.getTextContent()); + final int testScope = + scope != null ? ISymbolConstants.getMaskForString(scope.getTextContent()) : -1; if (testScope != -1) { diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/AppConfigValidationUtil.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/AppConfigValidationUtil.java index 90beacbd6..a99dd2aee 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/AppConfigValidationUtil.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/AppConfigValidationUtil.java @@ -236,8 +236,11 @@ public final class AppConfigValidationUtil if (node != null) { - return node.getEndStructuredDocumentRegion().getEndOffset() + if(node.getEndStructuredDocumentRegion() != null) { + return node.getEndStructuredDocumentRegion().getEndOffset() - node.getStartStructuredDocumentRegion().getStartOffset(); + } + return node.getStartStructuredDocumentRegion().getLength(); } return -1; diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/actions/single/ColorSupport.java b/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/actions/single/ColorSupport.java index d253dd183..5442a31f9 100644 --- a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/actions/single/ColorSupport.java +++ b/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/actions/single/ColorSupport.java @@ -23,24 +23,43 @@ import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement; */ /*package*/ class ColorSupport { static final String[] COLOR_VALUES = new String[] { - PDPlugin.getResourceString("ColorSupport.CommandLabel.Aqua"), //$NON-NLS-1$ - PDPlugin.getResourceString("ColorSupport.CommandLabel.Black"), //$NON-NLS-1$ - PDPlugin.getResourceString("ColorSupport.CommandLabel.Blue"), //$NON-NLS-1$ - PDPlugin.getResourceString("ColorSupport.CommandLabel.Fuchsia"), //$NON-NLS-1$ - PDPlugin.getResourceString("ColorSupport.CommandLabel.Gray"), //$NON-NLS-1$ - PDPlugin.getResourceString("ColorSupport.CommandLabel.Green"), //$NON-NLS-1$ - PDPlugin.getResourceString("ColorSupport.CommandLabel.Lime"), //$NON-NLS-1$ - PDPlugin.getResourceString("ColorSupport.CommandLabel.Maroon"), //$NON-NLS-1$ - PDPlugin.getResourceString("ColorSupport.CommandLabel.Navy"), //$NON-NLS-1$ - PDPlugin.getResourceString("ColorSupport.CommandLabel.Olive"), //$NON-NLS-1$ - PDPlugin.getResourceString("ColorSupport.CommandLabel.Orange"), //$NON-NLS-1$ - PDPlugin.getResourceString("ColorSupport.CommandLabel.Purple"), //$NON-NLS-1$ - PDPlugin.getResourceString("ColorSupport.CommandLabel.Red"), //$NON-NLS-1$ - PDPlugin.getResourceString("ColorSupport.CommandLabel.Silver"), //$NON-NLS-1$ - PDPlugin.getResourceString("ColorSupport.CommandLabel.Teal"), //$NON-NLS-1$ - PDPlugin.getResourceString("ColorSupport.CommandLabel.White"), //$NON-NLS-1$ - PDPlugin.getResourceString("ColorSupport.CommandLabel.Yellow") //$NON-NLS-1$ + "Aqua", //$NON-NLS-1$ + "Black", //$NON-NLS-1$ + "Blue", //$NON-NLS-1$ + "Fuchsia", //$NON-NLS-1$ + "Gray", //$NON-NLS-1$ + "Green", //$NON-NLS-1$ + "Lime", //$NON-NLS-1$ + "Maroon", //$NON-NLS-1$ + "Navy", //$NON-NLS-1$ + "Olive", //$NON-NLS-1$ + "Orange", //$NON-NLS-1$ + "Purple", //$NON-NLS-1$ + "Red", //$NON-NLS-1$ + "Silver", //$NON-NLS-1$ + "Teal", //$NON-NLS-1$ + "White", //$NON-NLS-1$ + "Yellow" //$NON-NLS-1$ }; + static final String[] COLOR_MENU_LABELS = new String[] { + PDPlugin.getResourceString("ColorSupport.CommandLabel.Aqua"), //$NON-NLS-1$ + PDPlugin.getResourceString("ColorSupport.CommandLabel.Black"), //$NON-NLS-1$ + PDPlugin.getResourceString("ColorSupport.CommandLabel.Blue"), //$NON-NLS-1$ + PDPlugin.getResourceString("ColorSupport.CommandLabel.Fuchsia"), //$NON-NLS-1$ + PDPlugin.getResourceString("ColorSupport.CommandLabel.Gray"), //$NON-NLS-1$ + PDPlugin.getResourceString("ColorSupport.CommandLabel.Green"), //$NON-NLS-1$ + PDPlugin.getResourceString("ColorSupport.CommandLabel.Lime"), //$NON-NLS-1$ + PDPlugin.getResourceString("ColorSupport.CommandLabel.Maroon"), //$NON-NLS-1$ + PDPlugin.getResourceString("ColorSupport.CommandLabel.Navy"), //$NON-NLS-1$ + PDPlugin.getResourceString("ColorSupport.CommandLabel.Olive"), //$NON-NLS-1$ + PDPlugin.getResourceString("ColorSupport.CommandLabel.Orange"), //$NON-NLS-1$ + PDPlugin.getResourceString("ColorSupport.CommandLabel.Purple"), //$NON-NLS-1$ + PDPlugin.getResourceString("ColorSupport.CommandLabel.Red"), //$NON-NLS-1$ + PDPlugin.getResourceString("ColorSupport.CommandLabel.Silver"), //$NON-NLS-1$ + PDPlugin.getResourceString("ColorSupport.CommandLabel.Teal"), //$NON-NLS-1$ + PDPlugin.getResourceString("ColorSupport.CommandLabel.White"), //$NON-NLS-1$ + PDPlugin.getResourceString("ColorSupport.CommandLabel.Yellow") //$NON-NLS-1$ +}; /** * @@ -64,7 +83,7 @@ import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement; menu.add(new Separator()); for (int i = 0; i < COLOR_VALUES.length; i++) { ChangeStylePropertyAction action = new ChangeStylePropertyAction( - COLOR_VALUES[i], ele, cssProperty, COLOR_VALUES[i]); + COLOR_MENU_LABELS[i], ele, cssProperty, COLOR_VALUES[i]); if (COLOR_VALUES[i].equalsIgnoreCase(currentValue)) { action.setChecked(true); needAdditional = false; |