[jbosstools-commits] JBoss Tools SVN: r44030 - in trunk/archives/plugins: org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model and 1 other directories.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Wed Sep 26 06:20:29 EDT 2012
Author: rob.stryker at jboss.com
Date: 2012-09-26 06:20:29 -0400 (Wed, 26 Sep 2012)
New Revision: 44030
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/WorkspaceChangeListener.java
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModel.java
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ProjectArchivesCommonView.java
Log:
JBIDE-12721 to trunk
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/WorkspaceChangeListener.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/WorkspaceChangeListener.java 2012-09-26 10:16:31 UTC (rev 44029)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/WorkspaceChangeListener.java 2012-09-26 10:20:29 UTC (rev 44030)
@@ -28,7 +28,6 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
import org.jboss.ide.eclipse.archives.core.model.ArchivesModel;
import org.jboss.ide.eclipse.archives.core.model.ArchivesModelException;
import org.jboss.ide.eclipse.archives.core.model.IArchiveModel;
@@ -97,11 +96,11 @@
try {
if( p.getSessionProperty(new QualifiedName(ArchivesCorePlugin.PLUGIN_ID, "localname")) == null ) { //$NON-NLS-1$
try {
- ArchivesModel.instance().registerProject(p.getLocation(), new NullProgressMonitor());
- new Job(ArchivesCore.bind(ArchivesCoreMessages.RefreshProject, p.getName())) {
- protected IStatus run(IProgressMonitor monitor) {
- try {
- p.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ new WorkspaceJob(ArchivesCore.bind(ArchivesCoreMessages.RefreshProject, p.getName())) {
+ public IStatus runInWorkspace(IProgressMonitor monitor) {
+ try {
+ ArchivesModel.instance().registerProject(p.getLocation(), new NullProgressMonitor());
+ p.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
} catch( CoreException e ) {
IStatus status = new Status(IStatus.WARNING, ArchivesCorePlugin.PLUGIN_ID,
ArchivesCore.bind(ArchivesCoreMessages.RefreshProjectFailed, p.getName()),e);
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModel.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModel.java 2012-09-26 10:16:31 UTC (rev 44029)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModel.java 2012-09-26 10:20:29 UTC (rev 44030)
@@ -163,7 +163,8 @@
public IArchiveModelRootNode registerProject(IPath projectPath, String file, IProgressMonitor monitor) throws ArchivesModelException {
XbPackages packages;
ArchiveModelNode modelNode;
-
+ if( projectPath == null )
+ return null;
IPath packagesFile = projectPath.append(file);
if (packagesFile.toFile().exists()) {
try {
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ProjectArchivesCommonView.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ProjectArchivesCommonView.java 2012-09-26 10:16:31 UTC (rev 44029)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ProjectArchivesCommonView.java 2012-09-26 10:20:29 UTC (rev 44030)
@@ -82,6 +82,10 @@
if( part == instance )
return;
if (selection == null || selection.isEmpty()) {
+ if( currentProject != null && !currentProject.isAccessible()) {
+ currentProject = null;
+ jiggleViewerInput();
+ }
return;
}
if (!(selection instanceof IStructuredSelection))
More information about the jbosstools-commits
mailing list