Author: dazarov
Date: 2008-02-13 11:46:26 -0500 (Wed, 13 Feb 2008)
New Revision: 6302
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/OpenSeamComponentDialog.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-518
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/OpenSeamComponentDialog.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/OpenSeamComponentDialog.java 2008-02-13
16:14:55 UTC (rev 6301)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/OpenSeamComponentDialog.java 2008-02-13
16:46:26 UTC (rev 6302)
@@ -43,10 +43,15 @@
*
*/
public class OpenSeamComponentDialog extends FilteredItemsSelectionDialog {
-
+ private static SeamComponentSelectionHistory history = null;
+
public OpenSeamComponentDialog(Shell shell) {
super(shell);
- setSelectionHistory(new SeamComponentSelectionHistory());
+
+ if(history == null)
+ history = new SeamComponentSelectionHistory();
+
+ setSelectionHistory(history);
setListLabelProvider(new SeamComponentLabelProvider());
setDetailsLabelProvider(new SeamComponentLabelProvider());
}
@@ -70,7 +75,7 @@
for(int i = 0; i < projects.length; i++){
IProject project = projects[i];
progressMonitor.subTask(project.getName());
- progressMonitor.worked(1);
+
ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
if(seamProject != null){
Iterator<ISeamComponent> iter = seamProject.getComponents().iterator();
@@ -81,6 +86,7 @@
contentProvider.add(component, itemsFilter);
}
}
+ progressMonitor.worked(1);
}
progressMonitor.done();
}
@@ -173,7 +179,6 @@
}
protected Object restoreItemFromMemento(IMemento memento) {
- System.out.println("restoreItemFromMemento memento - "+memento.getClass());
XMLMemento mem = (XMLMemento)memento;
String projectName = mem.getString("ProjectName");
if(projectName == null) return null;
@@ -188,8 +193,6 @@
@Override
protected void storeItemToMemento(Object item, IMemento memento) {
-
- System.out.println("storeItemToMemento item - "+item.getClass()+"
memento - "+memento.getClass());
SeamComponent component = (SeamComponent)item;
XMLMemento mem = (XMLMemento)memento;
mem.putString("ProjectName",
component.getSeamProject().getProject().getName());