Author: yradtsevich
Date: 2009-04-06 12:30:21 -0400 (Mon, 06 Apr 2009)
New Revision: 14524
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java
Log:
RESOLVED - issue JBIDE-3576: EL expression overriding
https://jira.jboss.org/jira/browse/JBIDE-3576
- fixed behavior of the dialog if it is called from Window->Preferences
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java 2009-04-06
15:48:52 UTC (rev 14523)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java 2009-04-06
16:30:21 UTC (rev 14524)
@@ -59,7 +59,15 @@
} else {
// yradtsevich: JBIDE-3576: EL expression overriding
// check if there is no another EL reference in the same scope with the same name
- final int selectedScope = ((BaseAddReferenceSupport)support).getSelectedScope(data);
+
+ int selectedScope = ((BaseAddReferenceSupport)support).getSelectedScope(data);
+
+ /* XXX yradtsevich: BaseAddReferenceSupport.getSelectedScope(...) returns an
+ * incorrect scope if the scope is global. So we need to fix it. */
+ if (editingReference.isGlobal()) {
+ selectedScope = ResourceReference.GLOBAL_SCOPE;
+ }
+
for (ResourceReference listItemReference : currentReferenceList) {
if (editingReference != listItemReference
&& listItemReference.getScope() == selectedScope