Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgkessler2007-04-02 20:03:54 +0000
committergkessler2007-04-02 20:03:54 +0000
commit8a382857aa8960b8eb5e2c69faa8073c370dba67 (patch)
tree0c8af64305453b906ed42bdc3e519cbdfa78eb7f
parent13c13235fa8ad5de0e46e8305e161134edb74580 (diff)
downloadwebtools.jsf-8a382857aa8960b8eb5e2c69faa8073c370dba67.tar.gz
webtools.jsf-8a382857aa8960b8eb5e2c69faa8073c370dba67.tar.xz
webtools.jsf-8a382857aa8960b8eb5e2c69faa8073c370dba67.zip
Fix for Facet Install when registry is new
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetInstallDataModelProvider.java36
1 files changed, 22 insertions, 14 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetInstallDataModelProvider.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetInstallDataModelProvider.java
index efc040ed7..56f8d1f22 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetInstallDataModelProvider.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetInstallDataModelProvider.java
@@ -73,7 +73,7 @@ public class JSFFacetInstallDataModelProvider extends
if (propertyName.equals(IMPLEMENTATION)) {
if (JSFCorePlugin.getDefault().getJSFLibraryRegistry() == null)
return null;
- return JSFCorePlugin.getDefault().getJSFLibraryRegistry().getDefaultImplementation();
+ return getDefaultImplementationLibrary();//JSFCorePlugin.getDefault().getJSFLibraryRegistry().getDefaultImplementation();
} else if (propertyName.equals(DEPLOY_IMPLEMENTATION)) {
return Boolean.TRUE;
} else if (propertyName.equals(CONFIG_PATH)) {
@@ -89,7 +89,7 @@ public class JSFFacetInstallDataModelProvider extends
} else if (propertyName.equals(WEBCONTENT_DIR)){
return "WebContent"; //not sure I need this
} else if (propertyName.equals(COMPONENT_LIBRARIES)) {
- return new Object[0];
+ return new JSFLibraryReference[0];
} else if (propertyName.equals(IMPLEMENTATION_LIBRARIES)) {
return getDefaultJSFImplementationLibraries();
} else if (propertyName.equals(DEFAULT_IMPLEMENTATION_LIBRARY)) {
@@ -226,21 +226,29 @@ public class JSFFacetInstallDataModelProvider extends
}
- IStatus status = checkForDupeArchiveFiles(jars, ((JSFLibraryReference)getProperty(IJSFFacetInstallDataModelProperties.IMPLEMENTATION)).getLibrary());
- if (!OK_STATUS.equals(status)){
- return status;
+ IStatus status = null;
+ JSFLibraryReference ref = ((JSFLibraryReference)getProperty(IJSFFacetInstallDataModelProperties.IMPLEMENTATION));
+ if (ref != null){
+ status = checkForDupeArchiveFiles(jars, ((JSFLibraryReference)getProperty(IJSFFacetInstallDataModelProperties.IMPLEMENTATION)).getLibrary());
+ if (!OK_STATUS.equals(status)){
+ return status;
+ }
+ } else {
+ return createErrorStatus("JSF Implementation library must be specified.");
}
- JSFLibraryReference[] compLibs = (JSFLibraryReference[])getProperty(IJSFFacetInstallDataModelProperties.COMPONENT_LIBRARIES);
- for (int i=0;i<compLibs.length;i++){
- JSFLibrary lib = compLibs[i].getLibrary();
- status = checkForDupeArchiveFiles(jars, lib);
- if (!OK_STATUS.equals(status)){
- return status;
- }
- }
- return OK_STATUS;
+ JSFLibraryReference[] compLibs = (JSFLibraryReference[]) getProperty(IJSFFacetInstallDataModelProperties.COMPONENT_LIBRARIES);
+ if (compLibs != null){
+ for (int i=0;i<compLibs.length;i++){
+ JSFLibrary lib = compLibs[i].getLibrary();
+ status = checkForDupeArchiveFiles(jars, lib);
+ if (!OK_STATUS.equals(status)){
+ return status;
+ }
+ }
}
+ return OK_STATUS;
+ }
private IJavaProject getJavaProject() {
IProject proj = getProject();

Back to the top