Author: akazakov
Date: 2007-10-29 12:28:12 -0400 (Mon, 29 Oct 2007)
New Revision: 4559
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1057 Refresh package explorer after generating
seam artifacts by our wizards
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2007-10-29
16:24:58 UTC (rev 4558)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2007-10-29
16:28:12 UTC (rev 4559)
@@ -33,6 +33,8 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart;
+import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.ide.IDE;
@@ -156,10 +158,18 @@
IVirtualFile manifest =
webComp.getRootFolder().getFile("/META-INF/MANIFEST.MF");
manifest.getUnderlyingFile().getParent().touch(monitor);
manifest.getUnderlyingFile().touch(monitor);
-
+
// to keep workspace in sync
seamPrjSet.refreshLocal(monitor);
-
+
+ // We need refresh PackageExplorer because of bug of Eclipse. See
http://jira.jboss.com/jira/browse/JBIDE-1057
+ PackageExplorerPart p = PackageExplorerPart.getFromActivePerspective();
+ if(p!=null) {
+ TreeViewer tv = p.getTreeViewer();
+ if(tv!=null) {
+ tv.refresh();
+ }
+ }
} catch (CoreException e) {
result = new Status(IStatus.ERROR,SeamGuiPlugin.PLUGIN_ID,e.getMessage(),e);
}