Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/cdo/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/PapyrusRepository.java2
-rw-r--r--extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIResourceQuery.java8
2 files changed, 9 insertions, 1 deletions
diff --git a/extraplugins/cdo/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/PapyrusRepository.java b/extraplugins/cdo/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/PapyrusRepository.java
index 23bc477a31a..fd19e6edf68 100644
--- a/extraplugins/cdo/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/PapyrusRepository.java
+++ b/extraplugins/cdo/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/internal/core/PapyrusRepository.java
@@ -692,6 +692,8 @@ public class PapyrusRepository extends Container<CDOResourceNode> implements IIn
if((view != null) && !view.isClosed()) {
result = view.getRootResource();
}
+ } else if(adapter == CDOSession.class) {
+ result = getCDOSession();
} else {
result = Platform.getAdapterManager().getAdapter(this, adapter);
}
diff --git a/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIResourceQuery.java b/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIResourceQuery.java
index 8feb2644190..9e9e7ae8aa8 100644
--- a/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIResourceQuery.java
+++ b/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/src/org/eclipse/papyrus/cdo/internal/ui/views/DIResourceQuery.java
@@ -204,6 +204,7 @@ public class DIResourceQuery {
private IListener createCDOViewListener() {
return new IListener() {
+ @Override
public void notifyEvent(IEvent event) {
if(event instanceof ILifecycleEvent) {
ILifecycleEvent lifecycleEvent = (ILifecycleEvent)event;
@@ -223,6 +224,7 @@ public class DIResourceQuery {
private DisposeListener createViewerDisposeListener() {
return new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent e) {
dispose();
}
@@ -274,6 +276,7 @@ public class DIResourceQuery {
if(display != null) {
display.asyncExec(new Runnable() {
+ @Override
public void run() {
if((viewer != null) && (viewer.getControl() != null) && !viewer.getControl().isDisposed()) {
refresh();
@@ -293,7 +296,10 @@ public class DIResourceQuery {
CDOResourceFolder folder = resource.getFolder();
if(folder != null) {
- result = folder.getNodes().contains(resource);
+ // if we don't have read permission on the folder, then we shouldn't attempt to show any contents
+ if(folder.cdoPermission().isReadable()) {
+ result = folder.getNodes().contains(resource);
+ }
} else {
CDOResource root = resource.cdoResource();
if((root != null) && root.isRoot()) {

Back to the top