Bug Fix for Milestone 2006/05/09
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/META-INF/MANIFEST.MF b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/META-INF/MANIFEST.MF
index 5747a24..80dabce 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/META-INF/MANIFEST.MF
+++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/META-INF/MANIFEST.MF
@@ -35,7 +35,8 @@
org.eclipse.jst.jsf.facesconfig.edit,
org.eclipse.jem.util,
org.eclipse.jst.jsf.facesconfig.common,
- org.eclipse.jst.jsf.facesconfig
+ org.eclipse.jst.jsf.facesconfig,
+ org.eclipse.ui.cheatsheets
Eclipse-LazyStart: true
Export-Package: org.eclipse.jst.jsf.facesconfig.ui,
org.eclipse.jst.jsf.facesconfig.ui.dialog,
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/plugin.xml b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/plugin.xml
index 1242583..44cefe8 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/plugin.xml
+++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/plugin.xml
@@ -40,7 +40,7 @@
text="%pageflow.editor.intro.start.text"
hyperlink="%pageflow.editor.intro.start.link"/>
<introductionelement
- actionparameters="PageflowEditor.createCheatSheet"
+ actionparameters="FacesConfigEditor.CheatSheet"
icon="icons/FacesConfig_Tutorial.gif"
hyperlinkaction="org.eclipse.jst.jsf.facesconfig.common.actions.LoadCheatSheetAction"
text="%pageflow.editor.intro.cheatsheets.text"
@@ -72,4 +72,12 @@
<propertyCategory category="general"/>
</propertyContributor>
</extension>
+ <extension
+ point="org.eclipse.ui.cheatsheets.cheatSheetContent">
+ <cheatsheet
+ composite="false"
+ contentFile="cheatsheets/facesconfigeditor.xml"
+ id="FacesConfigEditor.CheatSheet"
+ name="FacesConfigEditor CheatSheet"/>
+ </extension>
</plugin>
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/FacesConfigEditor.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/FacesConfigEditor.java
index 3472c6a..8113d58 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/FacesConfigEditor.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/FacesConfigEditor.java
@@ -425,13 +425,13 @@
try {
IntroductionPage page1 = new IntroductionPage(this);
addPage(page1, null);
-
+
IFormPage overviewPage = new OverviewPage(this);
addPage(overviewPage, null);
-
+
// Page flow
createAndAddPageflowPage();
-
+
// pages
IFormPage managedBeanPage = new ManagedBeanPage(this);
managedBeanPageID = addPage(managedBeanPage, null);
@@ -452,7 +452,8 @@
} catch (PartInitException e) {
EditorPlugin.getDefault().getLog().log(
new Status(IStatus.ERROR, EditorPlugin.getPluginId(),
- IStatus.OK, e.getMessage(), e));
+ IStatus.OK, e.getMessage() == null ? "" : e
+ .getMessage(), e));
}
}
@@ -474,8 +475,7 @@
FC2PFTransformer.getInstance().setPageflow(pageflowPage.getPageflow());
boolean fornew = getFacesConfigAdapter()
.updatePageflowFromFacesConfig();
- pageflowPage.getGraphicalViewer().setContents(
- pageflowPage.getPageflow());
+ pageflowPage.setGraphicalViewerContents(pageflowPage.getPageflow());
if (fornew) {
PageflowLayoutManager.getInstance().layoutPageflow(
pageflowPage.getPageflow());
@@ -601,7 +601,7 @@
// // getFacesConfigAdapter(), inputStreamOfFacesConfig);
// //
// // updateCommand.execute();
- // }
+ // }
/**
* This class listens for command stack changes of the pages contained in
* this editor and decides if the editor is dirty or not.
@@ -855,8 +855,9 @@
} catch (Exception e) {
EditorPlugin.getDefault().getLog().log(
new Status(IStatus.ERROR, EditorPlugin
- .getPluginId(), IStatus.OK, e.getMessage(),
- e));
+ .getPluginId(), IStatus.OK,
+ e.getMessage() == null ? "" : e
+ .getMessage(), e));
}
}
};
@@ -969,20 +970,6 @@
}
- // /**
- // * Returns the <code>IContentOutlinePage</code> for this editor.
- // *
- // * @return - the <code>IContentOutlinePage</code>
- // */
- // protected IContentOutlinePage getOutlinePage() {
- // // return (IContentOutlinePage)
- // // _pageflowPage.getAdapter(IContentOutlinePage.class);
- // if (null == outlinePage) {
- // outlinePage = new MultiPageEditorOutlinePage();
- // }
- // return outlinePage;
- // }
-
/** the delegating ZoomManager */
private DelegatingZoomManager delegatingZoomManager = null;
@@ -1249,8 +1236,6 @@
super.pageChange(newPageIndex);
// refresh content depending on current page
-
- // ((MultiPageEditorPropertySheetPage)getPropertySheetPage()).pagechange(this.getActiveEditor());
currentPageChanged();
}
@@ -1305,16 +1290,16 @@
// }
public void dispose() {
FC2PFTransformer.getInstance().dispose();
- // Iterator contents = getFacesConfig().getNavigationRule().iterator();
- // while (contents.hasNext()) {
- // EObject next = ((EObject) contents.next());
- // TreeIterator children = next.eAllContents();
- // while (children.hasNext()) {
- // FC2PFTransformer.getInstance().unAdapt(
- // (EObject) children.next());
- // }
- // FC2PFTransformer.getInstance().unAdapt((EObject) next);
- // }
+// Iterator contents = getFacesConfig().getNavigationRule().iterator();
+// while (contents.hasNext()) {
+// EObject next = ((EObject) contents.next());
+// TreeIterator children = next.eAllContents();
+// while (children.hasNext()) {
+// FC2PFTransformer.getInstance().unAdapt(
+// (EObject) children.next());
+// }
+// FC2PFTransformer.getInstance().unAdapt((EObject) next);
+// }
// FC2PFTransformer.getInstance().unAdapt(getFacesConfig());
ResourcesPlugin.getWorkspace().removeResourceChangeListener(
@@ -1369,15 +1354,10 @@
* @return - the <code>IContentOutlinePage</code>
*/
protected IContentOutlinePage getOutlinePage() {
- // return (IContentOutlinePage)
- // _pageflowPage.getAdapter(IContentOutlinePage.class);
if (null == outlinePage) {
outlinePage = new MultiPageEditorOutlinePage();
}
return outlinePage;
- // use the source page's outline.
- // return (IContentOutlinePage) this.getEditor(sourcePageId).getAdapter(
- // IContentOutlinePage.class);
}
public void addSelectionChangedListener(ISelectionChangedListener listener) {
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/PageflowEditor.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/PageflowEditor.java
index 165897f..1d08b95 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/PageflowEditor.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/PageflowEditor.java
@@ -308,7 +308,7 @@
addEditPartAction(new ShowPropertyViewAction((IWorkbenchPart) this));
// Allows showing property view for the pageflow
- addEditPartAction(new ShowPaletteViewAction((IWorkbenchPart) this));
+ // addEditPartAction(new ShowPaletteViewAction((IWorkbenchPart) this));
// register alignment actions
addEditPartAction(new AlignmentAction((IWorkbenchPart) this,
@@ -430,7 +430,7 @@
});
// apply Editor's preferences
- propertyChange(null);
+// propertyChange(null);
// add listener to Editor's preferences changing
EditorPlugin.getDefault().getPreferenceStore()
.addPropertyChangeListener(this);
@@ -809,6 +809,11 @@
public GraphicalViewer getGraphicalViewer() {
return viewer;
}
+
+ public void setGraphicalViewerContents(Object contents){
+ viewer.setContents(contents);
+ propertyChange(null);
+ }
/*
* (non-Javadoc)
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/PageflowEditorContextMenuProvider.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/PageflowEditorContextMenuProvider.java
index 86ce278..4679a89 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/PageflowEditorContextMenuProvider.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/PageflowEditorContextMenuProvider.java
@@ -95,11 +95,11 @@
submenu.add(action);
}
- action = getActionRegistry().getAction(
- ShowPaletteViewAction.SHOW_PALETTE_VIEW);
- if (null != action && action.isEnabled()) {
- submenu.add(action);
- }
+// action = getActionRegistry().getAction(
+// ShowPaletteViewAction.SHOW_PALETTE_VIEW);
+// if (null != action && action.isEnabled()) {
+// submenu.add(action);
+// }
if (!submenu.isEmpty()) {
menuManager.appendToGroup(GEFActionConstants.GROUP_REST, submenu);
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/PageflowMessages.properties b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/PageflowMessages.properties
index bbb29d9..4e26800 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/PageflowMessages.properties
+++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/PageflowMessages.properties
@@ -95,6 +95,9 @@
Pageflow.Model.Attributes.outcome = from-outcome
Pageflow.Model.Attributes.redirect = redirect
+Pageflow.Model.Attributes.fromaction = from-action
+Pageflow.Model.Attributes.referenceLink = reference
+
Pageflow.Model.Items.Pageflow = File
Pageflow.Model.Items.PFBegin = Begin
Pageflow.Model.Items.PFEnd = End
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/synchronization/FC2PFTransformer.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/synchronization/FC2PFTransformer.java
index 2608900..2f755de 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/synchronization/FC2PFTransformer.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/synchronization/FC2PFTransformer.java
@@ -398,25 +398,32 @@
switch (featureId) {
case PageflowPackage.PF_PAGE:
removePage(notification, element);
+ updateAndNotify(notification);
break;
case PageflowPackage.PAGEFLOW_NODE__OUTLINKS:
removeOutLink(notification, element);
+ updateAndNotify(notification);
break;
case PageflowPackage.PAGEFLOW_NODE__INLINKS:
removeInLink(notification, element);
+ updateAndNotify(notification);
break;
- case PageflowPackage.PAGEFLOW:
- break;
+ // case PageflowPackage.PAGEFLOW:
+ // updateAndNotify(notification);
+ // break;
}
break;
}
}
+ isInEvent = false;
+ }
+
+ private void updateAndNotify(Notification notification) {
pageflow.notifyModelChanged(new ENotificationImpl(
(InternalEObject) notification.getNotifier(),
Notification.SET, PageflowPackage.PAGEFLOW, null, null));
refreshPFAdapter(pageflow);
refreshFCAdapter(facesConfig);
- isInEvent = false;
}
public void dispose() {
@@ -481,17 +488,25 @@
switch (type) {
case Notification.ADD: {
processAdd(notification);
+ updateAndNotify(notification);
break;
}
case Notification.SET: {
processSet(notification);
+ updateAndNotify(notification);
break;
}
case Notification.REMOVE:
processRemove(notification);
+ updateAndNotify(notification);
break;
}
}
+
+ isInEvent = false;
+ }
+
+ private void updateAndNotify(Notification notification) {
Assert
.isTrue(notification.getNotifier() instanceof InternalEObject);
refreshFCAdapter((EObject) notification.getNotifier());
@@ -499,8 +514,6 @@
pageflow.notifyModelChanged(new ENotificationImpl(
(InternalEObject) notification.getNotifier(),
Notification.SET, PageflowPackage.PAGEFLOW, null, null));
-
- isInEvent = false;
}
/**
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/ConfigurationManager.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/ConfigurationManager.java
deleted file mode 100644
index a38c0f6..0000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/ConfigurationManager.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 Sybase, Inc. and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Sybase, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facesconfig.ui.pageflow.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-
-/**
- * Manages the files that comprise the Java Server Faces Configuration
- *
- * @author Jane Cantz, Xiao-guang Zhang
- * @version 1.0
- */
-public class ConfigurationManager {
-
- /** The current project reference */
- private IProject currentProject = null;
-
- /** Create the logger for this class */
- // private static final Logger log = EditorPlugin
- // .getLogger(ConfigurationManager.class);
- /** List of all the Faces Configuration Types */
- private List configs = null;
-
- /** An array of the managed beans List from the configuration set */
- private List[] managedBeans = null;
-
- // private IFacesConfigManager facesConfigManagerAdapter;
-
- /**
- * Manages the Faces Configuration set, which could be a single
- * <i>faces-config.xml</i> file or a set of config files defined in
- * <i>web.xml</i>.
- *
- * @param project -
- * the current project
- */
- public ConfigurationManager(IProject project) {
- super();
- // log.setResourceBundle(EditorPlugin.getDefault().getResourceBundle());
- currentProject = project;
- }
-
- /**
- * get the current project
- *
- * @return
- */
- public IProject getProject() {
- return currentProject;
- }
-
- /**
- * @return List[] - a derived list of managed beans from the configuration
- * set. The list is derived from reading the configuration files and
- * extracting the bean references. Every element of the retruned
- * list is a list, which contains
- * <code>org.eclipse.jst.jsf.facesconfig.ui.model.xml.ManagedBean</code>.
- */
-// public List[] deriveManagedBeans() {
-// if (configs == null || configs.size() == 0) {
-// return null;
-// }
-// managedBeans = new ArrayList[configs.size()];
-//
-// // Loop thru all the configuration types
-// for (int x = 0; x < configs.size(); x++) {
-// IFile aConfigFile = (IFile) configs.get(x);
-//
-// // List beans = ((FacesConfigType) configs.get(x)).getManagedBean();
-//
-// managedBeans[x] = getManagedBeanListFromFile(aConfigFile);
-// }
-// return managedBeans;
-// }
-
- // private List getManagedBeanListFromFile(IFile facesConfigFile) {
- //
- // if (facesConfigFile == null || !facesConfigFile.exists()) {
- // return null;
- // }
- // List managedBeanList = new ArrayList(0);
- // IStructuredModel sModel = StructuredModelManager.getModelManager()
- // .getExistingModelForRead(facesConfigFile);
- // if (sModel != null) {
- // IDOMDocument document = ((IDOMModel) sModel).getDocument();
- // FacesConfigDocumentWrap facesConfigWrap = new FacesConfigDocumentWrap(
- // document);
- // if (facesConfigWrap.getFacesConfig() != null) {
- // managedBeanList = facesConfigWrap.getFacesConfig()
- // .getManagedBeanList();
- // }
- // sModel.releaseFromRead();
- // }
- // return managedBeanList;
- // }
-
- /**
- * @return String[] - An array of the configuration files
- */
- // public Object[] getConfigs() {
- // return configs.toArray();
- // }
- /**
- * @return List[] - a derived list of managed beans from the configuration
- * set. The list is derived from reading the configuration files and
- * extracting the bean references. Every element of the retruned
- * list is a list, which contains
- * <code>org.eclipse.jst.jsf.facesconfig.ui.model.xml.ManagedBean</code>.
-// */
-// public List[] getManagedBeans() {
-// deriveManagedBeans();
-// return managedBeans;
-// }
-
- /**
- * Determine what files comprise the Java Server Faces configuration
- *
- * @param project -
- * the project to look for configuration files in
- */
- public void loadConfiguration(IProject project) {
- currentProject = project;
-
- if (currentProject == null) {
- return;
- }
-
- IFacesConfigManager facesConfigManager = getFacesConfigurationManager(project);
-
- if (facesConfigManager == null) {
- return;
- }
-
- IFile[] facesConfigFiles = facesConfigManager.getFacesConfigs();
-
- if (facesConfigFiles != null && facesConfigFiles.length > 0) {
- configs = new ArrayList();
- for (int i = 0; i < facesConfigFiles.length; i++) {
- configs.add(facesConfigFiles[i]);
- }
- }
- }
-
- private IFacesConfigManager getFacesConfigurationManager(IProject project) {
- // facesConfigManagerAdapter = (IFacesConfigManager) Platform
- // .getAdapterManager().getAdapter(project,
- // IFacesConfigManager.class);
- //
- // return facesConfigManagerAdapter;
- FacesConfigManager configManager = new FacesConfigManager(project);
- configManager.loadConfiguration();
- return configManager;
- }
-
- /**
- * Loads a single configuration file
- *
- * @param config -
- * the faces configuration file to load. Just the file name only.
- */
- // public void loadConfiguration(String config) {
- // if (currentProject == null) {
- // return;
- // }
- //
- // IFacesConfigManager facesConfigManager =
- // getFacesConfigurationManager(currentProject);
- //
- // if (facesConfigManager == null) {
- // return;
- // }
- //
- // FacesConfigType[] facesConfigs = facesConfigManager.getFacesConfigs();
- //
- // if (facesConfigs != null) {
- // IFile file = currentProject
- // .getFile(IFileFolderConstants.PATH_SEPARATOR
- // + WEBINF_FOLDER
- // + IFileFolderConstants.PATH_SEPARATOR + config);
- //
- // for (int i = 0; i < facesConfigs.length; i++) {
- // if (URIHelper.getPlatformURI(file).equalsIgnoreCase(
- // facesConfigs[i].eResource().getURI().toString())) {
- // configs = new ArrayList();
- // configs.add(facesConfigs[i]);
- // break;
- // }
- // }
- // }
- // }
- /**
- * Saves all the configuration resources to the local file system
- */
- // public void save() {
- // IFacesConfigManager facesConfigManager =
- // getFacesConfigurationManager(currentProject);
- //
- // if (facesConfigManager != null) {
- // facesConfigManager.endModify();
- // }
- // }
- /**
- * Update the managed bean type's scope value
- *
- * @param mbt -
- * the managed bean type
- * @param scopeValue -
- * the scope value to set
- */
- // public void updateBeanScope(ManagedBeanTypeImpl mbt, String scopeValue) {
- // ManagedBeanScopeType mbst = mbt.getManagedBeanScope();
- // mbst.setValue(scopeValue);
- // Resource resource = mbt.eResource();
- // resource.setModified(true);
- // }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/FC2PFTransformer.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/FC2PFTransformer.java
deleted file mode 100644
index ec603a5..0000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/FC2PFTransformer.java
+++ /dev/null
@@ -1 +0,0 @@
-package org.eclipse.jst.jsf.facesconfig.ui.pageflow.util;
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/FacesConfigManager.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/FacesConfigManager.java
deleted file mode 100644
index 9133efd..0000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/FacesConfigManager.java
+++ /dev/null
@@ -1,457 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 Sybase, Inc. and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Sybase, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facesconfig.ui.pageflow.util;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jface.util.ListenerList;
-import org.eclipse.jst.j2ee.common.ParamValue;
-import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-import org.eclipse.jst.jsf.facesconfig.common.IFileFolderConstants;
-import org.eclipse.jst.jsf.facesconfig.ui.util.WebrootUtil;
-
-/**
- * This class traces changes in the web.xml file, and then traces faces-config
- * files declared in the web.xml file (or the default faces config file).
- * Providing access method for all the faces-config files as a group.
- *
- * @author Yang Liu
- * @version
- */
-// Part of this file is refactored from the old ConfigurationManager.
-public class FacesConfigManager implements IFacesConfigManager // , ILifecycle
-{
- // private static final Logger _log =
- // ModelsPlugin.getLogger(FacesConfigManager.class);
-
- // private String WEBINF_FOLDER = IFileFolderConstants.FOLDER_WEBROOT
- // + IFileFolderConstants.PATH_SEPARATOR
- // + IFileFolderConstants.FOLDER_WEBINF;
-
- private IProject currentProject;
-
- /** The Adaptor Factory */
- // protected ComposedAdapterFactory _adapterFactory;
- ListenerList listenerList = new ListenerList(1);
-
- // ------------------------------------------------------------------------
- // _editingDomain need refresh each time re-read the configs.
- /** The Faces Configuration Editing Domain */
- // protected AdapterFactoryEditingDomain _editingDomain;
- // ------------------------------------------------------------------------
- // following are things need to re-read each refresh.
- /** List of all the Faces Configuration Files */
- // private List _configs = null;
- //
- // private FacesConfigType[] _facesConfigs = null;
- private List facesConfigFileList;
-
- // class ResourceTracker implements IResourceChangeListener,
- // IResourceDeltaVisitor {
- // boolean _configChanged;
- //
- // public void resourceChanged(IResourceChangeEvent event) {
- // switch (event.getType()) {
- // case IResourceChangeEvent.POST_CHANGE:
- // try {
- // _configChanged = false;
- // event.getDelta().accept(this);
- // } catch (CoreException exception) {
- // _log.error("common.error", exception);
- // } finally {
- // if (_configChanged) {
- // refresh();
- // }
- // }
- // break;
- // }
- // }
- //
- // public boolean visit(IResourceDelta delta) {
- // if (_configChanged) {
- // return false; // we only need to set the flag, if it is
- // // already set, then no need to process
- // }
- // IResource res = delta.getResource();
- // if (res instanceof IProject && res != currentProject) {
- // return false;
- // }
- //
- // if (res instanceof IProject && res == currentProject) {
- // if (delta.getKind() == IResourceDelta.REMOVED) {
- // return false;
- // } else if (delta.getKind() == IResourceDelta.CHANGED) {
- // if ((delta.getFlags() & IResourceDelta.OPEN) != 0) {
- // if (currentProject.isOpen()) {
- // _configChanged = true;
- // }
- // return false;
- // }
- // }
- // }
- //
- // if (!(res instanceof IFile)) {
- // return true; // visit the children
- // }
- //
- // if (_configs != null) {
- // // See if the changed resource is a faces configuration file
- // for (int x = 0, size = _configs.size(); x < size; x++) {
- // IFile configFile = currentProject
- // .getFile((String) _configs.get(x));
- // if (configFile.equals(res)) {
- // if (delta.getKind() == IResourceDelta.REMOVED
- // || delta.getKind() == IResourceDelta.ADDED) {
- // _configChanged = true;
- // return false;
- // }
- //
- // int flags = delta.getFlags();
- // if (((flags & IResourceDelta.CONTENT) != 0)
- // || ((flags & IResourceDelta.REPLACED) != 0)) {
- // _configChanged = true;
- // return false;
- // }
- // break;
- // }
- // }
- // }
- //
- // if (res.getName().equalsIgnoreCase(
- // IFileFolderConstants.FILE_WEB_XML)) {
- // _configChanged = true;
- // }
- // return false;
- // }
- // }
-
- // ResourceTracker _tracker = new ResourceTracker();
-
- /**
- *
- */
- public FacesConfigManager(IProject project) {
- this.currentProject = project;
- }
-
- // public EditingDomain getEditingDomain()
- // {
- // return _editingDomain;
- // }
-
- /*
- * (non-Javadoc)
- *
- * @see com.sybase.stf.jmt.models.IFacesConfigManager#getProject()
- */
- public IProject getProject() {
- return currentProject;
- }
-
- // public void configurate()
- // {
- // List factories = new ArrayList();
- // factories.add(new ResourceItemProviderAdapterFactory());
- // factories.add(new FacesConfig10ItemProviderAdapterFactory());
- // factories.add(new ReflectiveItemProviderAdapterFactory());
- // _adapterFactory = new ComposedAdapterFactory(factories);
- //
- // BasicCommandStack commandStack = new BasicCommandStack();
- // _editingDomain = new AdapterFactoryEditingDomain(_adapterFactory,
- // commandStack);
- //
- // // read everything from scratch
- // refresh();
- //
- // ResourcesPlugin.getWorkspace().addResourceChangeListener(_tracker);
- // }
-
- // public void deconfigurate()
- // {
- // ResourcesPlugin.getWorkspace().removeResourceChangeListener(_tracker);
- // // XXX: do we need to do anything here?
- // }
-
- /*
- * (non-Javadoc)
- *
- * @see com.sybase.stf.jmt.models.IFacesConfigManager#getFacesConfigs()
- */
- // public FacesConfigType[] getFacesConfigs() {
- // if (this._facesConfigs == null) {
- // this._facesConfigs = new FacesConfigType[0];
- // }
- // return this._facesConfigs;
- // }
- public IFile[] getFacesConfigs() {
- if (facesConfigFileList == null || facesConfigFileList.size() == 0) {
- loadConfiguration();
- }
- IFile[] files = new IFile[facesConfigFileList.size()];
- facesConfigFileList.toArray(files);
- return files;
- }
-
- public void refresh() {
- if (currentProject == null) {
- return;
- }
- // Clear the current resources from the set
- // ResourceSet rset = _editingDomain.getResourceSet();
- // rset.getResources().clear();
- // _configs = null;
- // _facesConfigs = null;
-
- loadConfiguration();
- // Loop thru all the configuration files
- // for (int x = 0; x < _configs.size(); x++) {
- // URI fileURI = null;
- // Resource resource = null;
- // if (currentProject.getFolder(WEBINF_FOLDER).exists()) {
- // IFile file = currentProject.getFile((String) _configs.get(x));
- // if (file != null && file.exists()) {
- // fileURI = URI.createURI("platform:/resource/"
- // + currentProject.getName() + _configs.get(x)); //$NON-NLS-1$
- // resource = new FacesConfig10ResourceFactoryImpl()
- // .createResource(fileURI);
- // } else {
- // // missing config file. skip this one
- // // FIXME: log it.
- // }
- // }
- //
- // if (resource != null) {
- // try {
- // resource.unload();
- // FacesConfig config = new FacesConfig(resource);
- // config.load();
- // } catch (Exception ex) {
- // _log.error("common.error", ex);
- // // String name = resource.getURI().path();
- // // _log.error("DBView.LoadResourceError", name, ex);
- // // //$NON-NLS-1$ //$NON-NLS-2$
- // // DataBindingPlugin.getAlerts().detailError("DBView.ResourceTitle",
- // // "DBView.LoadResourceError", name, ex); //$NON-NLS-1$
- // // //$NON-NLS-2$
- // // return null;
- // }
- //
- // if (resource.isLoaded()) {
- // rset.getResources().add(resource);
- // } else {
- // // FIXME: log
- // }
- // }
- // }
- //
- // int count = rset.getResources().size();
- // List configs = new ArrayList();
- // for (int i = 0; i < count; i++) {
- // Resource resource = (Resource) rset.getResources().get(i);
- // if (resource.getContents() == null
- // || resource.getContents().size() == 0) {
- // continue;
- // }
- //
- // try {
- // DocumentRoot root = (DocumentRoot) resource.getContents()
- // .get(0);
- // FacesConfigType sts = root.getFacesConfig();
- // if (sts != null) {
- // configs.add(sts);
- // }
- // } catch (Exception ex) {
- // _log.error("common.error", ex);
- // }
- // }
- // this._facesConfigs = new FacesConfigType[configs.size()];
- // configs.toArray(this._facesConfigs);
-
- this.fireFacesConfigChanged();
-
- }
-
- /**
- * check whether the config file is existed in all registered config files
- * or not.
- *
- * @param configFileName
- * @return
- */
- // private boolean isDuplicateConfigFile(String configFileName) {
- // boolean isDuplicated = false;
- // // See if all the configuration files exist
- // for (int x = 0; x < _configs.size(); x++) {
- // if (configFileName.equalsIgnoreCase((String) _configs.get(x))) {
- // isDuplicated = true;
- // }
- // }
- // return isDuplicated;
- // }
- /**
- * check whether the config file is existed in all registered config files
- * or not.
- *
- * @param facesConfigFile
- * @return
- */
- private boolean isDuplicateConfigFile(IFile facesConfigFile) {
-
- // See if all the configuration files exist
- if (facesConfigFileList != null
- && facesConfigFileList.contains(facesConfigFile)) {
- return true;
- }
- return false;
- }
-
- private void registerConfigFile(IFile facesConfigFile) {
- if (facesConfigFile != null && !isDuplicateConfigFile(facesConfigFile)) {
- facesConfigFileList.add(facesConfigFile);
- }
-
- }
-
- /**
- * Determine what files comprise the Java Server Faces configuration
- *
- * @param project -
- * the project to look for configuration files in
- */
- public void loadConfiguration() {
-
- String paramValue = null;
- WebArtifactEdit web = WebArtifactEdit
- .getWebArtifactEditForRead(currentProject);
- if (web != null) {
- WebApp webApp = web.getWebApp();
-
- EList contextParams = webApp.getContextParams();
- for (int i = 0, n = contextParams.size(); i < n; i++) {
- ParamValue aParam = (ParamValue) contextParams.get(i);
- if (WebDotXMLTagConstants.CONFIG_FILES_CONTEXT_PARAM
- .equals(aParam.getName())
- || WebDotXMLTagConstants.APPLICATION_CONFIG_FILES_CONTEXT_PARAM
- .equals(aParam.getName())) {
- paramValue = aParam.getValue();
- break;
- }
- }
- web.dispose();
- }
-
- // _configs = new ArrayList();
-
- facesConfigFileList = new ArrayList();
-
- IFolder webrootFolder = WebrootUtil
- .getWebContentFolder(this.currentProject);
- IFile defaultFacesConfigFile = webrootFolder
- .getFile(IFileFolderConstants.FOLDER_WEBINF
- + IFileFolderConstants.PATH_SEPARATOR
- + IFileFolderConstants.FILE_FACES_CONFIG_XML);
- registerConfigFile(defaultFacesConfigFile);
-
- if (paramValue != null) {
- // Parse the list to an array of files
- StringTokenizer tokenizer = new StringTokenizer(paramValue, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens()) {
- IFile aConifgFile = webrootFolder.getFile(tokenizer.nextToken()
- .trim());
- registerConfigFile(aConifgFile);
- }
- }
- }
-
- // ---------------------------------------------------------------------------------------
- // methods for change events.
- protected void fireFacesConfigChanged() {
- Object[] listeners = this.listenerList.getListeners();
- for (int i = 0; i < listeners.length; i++) {
- IFacesConfigChangeListener l = (IFacesConfigChangeListener) listeners[i];
- if (l != null) {
- l.facesConfigChanged();
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.sybase.stf.jmt.models.IFacesConfigManager#addFacesConfigChangeListener(com.sybase.stf.jmt.models.IFacesConfigChangeListener)
- */
- public void addFacesConfigChangeListener(IFacesConfigChangeListener listener) {
- listenerList.add(listener);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.sybase.stf.jmt.models.IFacesConfigManager#removeFacesConfigChangeListener(com.sybase.stf.jmt.models.IFacesConfigChangeListener)
- */
- public void removeFacesConfigChangeListener(
- IFacesConfigChangeListener listener) {
- listenerList.remove(listener);
- }
-
- // ------------------------------------------------------------------------------------------------------
- /**
- * Saves all the configuration resources to the local file system
- */
- // public void save()
- // {
- // ResourceSet rset = _editingDomain.getResourceSet();
- // EList resources = rset.getResources();
- // for (int r = 0; r < resources.size(); r++)
- // {
- // Resource resource = (Resource)resources.get(r);
- // if (resource.isModified())
- // {
- // FacesConfig config = new FacesConfig(resource);
- // try
- // {
- // config.save();
- // }
- // catch (IOException e)
- // {
- // _log.error("FacesConfig.SaveError", e);
- // }
- // }
- // }
- // this.fireFacesConfigChanged();
- // }
- /*
- * (non-Javadoc)
- *
- * @see com.sybase.stf.jmt.models.IFacesConfigManager#beginModify()
- */
- // public void beginModify()
- // {
- // // do nothing for now.
- // }
- /*
- * (non-Javadoc)
- *
- * @see com.sybase.stf.jmt.models.IFacesConfigManager#endModify()
- */
- // public void endModify()
- // {
- // save();
- // }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/FacesConfigUtil.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/FacesConfigUtil.java
index a6d9c5e..1743a38 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/FacesConfigUtil.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/FacesConfigUtil.java
@@ -16,7 +16,6 @@
import java.util.List;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -30,7 +29,7 @@
*/
public class FacesConfigUtil {
/** the singleton instance of face-config files manager */
- private static ConfigurationManager facesConfigManager;
+// private static ConfigurationManager facesConfigManager;
// private static final Logger log = EditorPlugin
// .getLogger(FacesConfigUtil.class);
@@ -194,16 +193,16 @@
*
* @return - configuration manager.
*/
- public static ConfigurationManager getConfigurationManager(IProject project) {
- if (facesConfigManager == null) {
- facesConfigManager = new ConfigurationManager(project);
- }
-
- facesConfigManager.loadConfiguration(project);
- // facesConfigManager.deriveManagedBeans();
-
- return facesConfigManager;
- }
+// public static ConfigurationManager getConfigurationManager(IProject project) {
+// if (facesConfigManager == null) {
+// facesConfigManager = new ConfigurationManager(project);
+// }
+//
+// facesConfigManager.loadConfiguration(project);
+// // facesConfigManager.deriveManagedBeans();
+//
+// return facesConfigManager;
+// }
// public static void addXMLNavigationRuleFromEMFModel(IStructuredModel
// model,
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/IFacesConfigChangeEvent.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/IFacesConfigChangeEvent.java
deleted file mode 100644
index 0766fd7..0000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/IFacesConfigChangeEvent.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.jsf.facesconfig.ui.pageflow.util;
-
-/**
- * @author xnjiang
- *
- */
-public interface IFacesConfigChangeEvent {
-
- public boolean isManagedBeanChanged();
- public boolean isNavigationRuleChanged();
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/IFacesConfigChangeListener.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/IFacesConfigChangeListener.java
deleted file mode 100644
index 59ed20f..0000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/IFacesConfigChangeListener.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 Sybase, Inc. and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Sybase, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facesconfig.ui.pageflow.util;
-
-import java.util.EventListener;
-
-/**
- * @author Yang Liu
- * @version
- */
-public interface IFacesConfigChangeListener extends EventListener {
- public void facesConfigChanged();
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/IFacesConfigManager.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/IFacesConfigManager.java
deleted file mode 100644
index 922116f..0000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/IFacesConfigManager.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 Sybase, Inc. and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Sybase, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facesconfig.ui.pageflow.util;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-
-/**
- * @author Yang Liu
- * @version
- */
-public interface IFacesConfigManager // extends ILifecycle
-{
- public IProject getProject();
-
- /**
- *
- * @return the array of the faces config files, it will not return null
- */
- public IFile[] getFacesConfigs();
-
- public void addFacesConfigChangeListener(IFacesConfigChangeListener listener);
-
- public void removeFacesConfigChangeListener(
- IFacesConfigChangeListener listener);
-
- /**
- * if the clients wants to change any of the faces-config file, should call
- * this method.
- *
- */
- // public void beginModify();
- //
- // /**
- // * after the client finish modify should call this method. The config
- // manager will save the
- // * config files and fire out change event to other clients.
- // *
- // */
- // public void endModify();
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/LinkNavigationRule.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/LinkNavigationRule.java
deleted file mode 100644
index e1d75b1..0000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/pageflow/util/LinkNavigationRule.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 Sybase, Inc. and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Sybase, Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jst.jsf.facesconfig.ui.pageflow.util;
-
-import org.eclipse.jst.jsf.facesconfig.emf.NavigationCaseType;
-import org.eclipse.jst.jsf.facesconfig.emf.NavigationRuleType;
-import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowLink;
-
-/**
- * This class stores the relationship between link and navigation rules.
- *
- * @author Xiao-guang Zhang
- */
-public class LinkNavigationRule {
- /** related the navigation rule and case */
- private NavigationRuleType navigationRule = null;
-
- private NavigationCaseType navigationCase = null;
-
- /** the first pflink */
- private PageflowLink firstLink = null;
-
- /** the second pflink, maybe is null */
- private PageflowLink secondLink = null;
-
- /**
- * get the generated navigation rule for this link.
- *
- * @return - the generated navigation rule for this link
- */
- public NavigationRuleType getNavigationRule() {
- return navigationRule;
- }
-
- /**
- * get the generated navigation case for this link.
- *
- * @return - the generated navigation case for this link
- */
- public NavigationCaseType getNavigationCase() {
- return navigationCase;
- }
-
- /**
- * set the generated navigation rule and case for this link.
- *
- * @param navigationRule
- * @param navigationCase
- */
- public void setNavigationRule(NavigationRuleType navigationRule,
- NavigationCaseType navigationCase) {
- this.navigationRule = navigationRule;
- this.navigationCase = navigationCase;
- }
-
- /**
- * set two links for the navigation rules
- *
- * @param link
- * @param nextLink
- */
- public void setLinks(PageflowLink firstlink, PageflowLink secondLink) {
- this.firstLink = firstlink;
- this.secondLink = secondLink;
- }
-
- /**
- * get the first link
- *
- * @return - the first link
- */
- public PageflowLink getFirstLink() {
- return firstLink;
- }
-
- /**
- * get the second link
- *
- * @return - the second link
- */
- public PageflowLink getSecondLink() {
- return secondLink;
- }
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ManagedBeanScopeTreeItem.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ManagedBeanScopeTreeItem.java
index 4537fd2..69f6016 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ManagedBeanScopeTreeItem.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/section/ManagedBeanScopeTreeItem.java
@@ -66,9 +66,11 @@
for (Iterator it = managedBeans.iterator(); it.hasNext();) {
ManagedBeanType managedBean = (ManagedBeanType) it.next();
- if (scope
- .equals(managedBean.getManagedBeanScope().getTextContent())) {
- result.add(managedBean);
+ if (managedBean.getManagedBeanScope() != null) {
+ if (scope.equals(managedBean.getManagedBeanScope()
+ .getTextContent())) {
+ result.add(managedBean);
+ }
}
}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/util/WebrootUtil.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/util/WebrootUtil.java
index 590c3b7..a7a9f45 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/util/WebrootUtil.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig.ui/src/org/eclipse/jst/jsf/facesconfig/ui/util/WebrootUtil.java
@@ -19,7 +19,6 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
/**
* This utility class is used to make a bridge between the relative path from