Author: scabanovich
Date: 2012-01-17 20:54:32 -0500 (Tue, 17 Jan 2012)
New Revision: 37930
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectTreeConstants.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFPromptingProvider.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JsfTreeListener.java
Log:
JBIDE-10393
https://issues.joss.org/browse/JBIDE-10393
Fixed event handling for the case of folder added to classpath.
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectTreeConstants.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectTreeConstants.java 2012-01-18
01:48:44 UTC (rev 37929)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectTreeConstants.java 2012-01-18
01:54:32 UTC (rev 37930)
@@ -13,4 +13,6 @@
public interface JSFProjectTreeConstants {
public String CONFIGURATION = "Configuration"; //$NON-NLS-1$
public String BEANS = "Beans"; //$NON-NLS-1$
+ public String RESOURCE_BUNDLES = "Resource Bundles"; //$NON-NLS-1$
+ public String TAG_LIBRARIES = "Tag Libraries"; //$NON-NLS-1$
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFPromptingProvider.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFPromptingProvider.java 2012-01-18
01:48:44 UTC (rev 37929)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFPromptingProvider.java 2012-01-18
01:54:32 UTC (rev 37930)
@@ -192,7 +192,7 @@
public List<Object> getBundles(XModel model) {
JSFProjectsRoot root = JSFProjectsTree.getProjectsRoot(model);
if(root == null) return EMPTY_LIST;
- WebProjectNode n = (WebProjectNode)root.getChildByPath("Resource Bundles");
//$NON-NLS-1$
+ WebProjectNode n =
(WebProjectNode)root.getChildByPath(JSFProjectTreeConstants.RESOURCE_BUNDLES);
if(n == null) return EMPTY_LIST;
XModelObject[] os = n.getTreeChildren();
List<Object> list = new ArrayList<Object>();
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JsfTreeListener.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JsfTreeListener.java 2012-01-18
01:48:44 UTC (rev 37929)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JsfTreeListener.java 2012-01-18
01:54:32 UTC (rev 37930)
@@ -59,9 +59,10 @@
if("FilePROPERTIES".equals(c.getModelEntity().getName())) {
invalidateBundles(source.getModel());
} else if(JSFProjectTagLibs.isTLDFile(c) ||
- "FileSystemJar".equals(entity)) {
+ "FileSystemJar".equals(entity) ||
("FileSystemFolder".equals(entity) &&
c.getAttributeValue("name").startsWith("src"))) {
invalidateTagLibs(source.getModel());
invalidateConfig(source.getModel());
+ invalidateBundles(source.getModel());
} else if(entity.startsWith(JSFConstants.ENT_FACESCONFIG)) {
invalidateConfig(source.getModel());
} else if("JSFManagedBean".equals(entity) ||
"JSFManagedBean20".equals(entity)) {
@@ -82,6 +83,7 @@
return;
} else if("FileSystems".equals(entity)) {
invalidateTagLibs(source.getModel());
+ invalidateBundles(source.getModel());
} else if("JSFManagedBeans".equals(entity) ||
"JSFManagedBean20".equals(entity)) {
invalidateFolder(source.getModel(), JSFProjectTreeConstants.BEANS);
} else if("JSFReferencedBeans".equals(entity)) {
@@ -96,11 +98,11 @@
}
private void invalidateBundles(XModel model) {
- invalidateFolder(model, "Resource Bundles");
+ invalidateFolder(model, JSFProjectTreeConstants.RESOURCE_BUNDLES);
}
private void invalidateTagLibs(XModel model) {
- invalidateFolder(model, "Tag Libraries");
+ invalidateFolder(model, JSFProjectTreeConstants.TAG_LIBRARIES);
}
private void invalidateConfig(XModel model) {