Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2014-05-30 15:15:40 +0000
committerChristian W. Damus2014-05-30 15:15:40 +0000
commitb768474b1b8308889303a150f5d17b6bcbfd8ce0 (patch)
treef48c378b3f7551a2af093d82ca1914913cc9286e /plugins
parent9dad7fe7b39ca22dee4d35d223df3e4cd22f961e (diff)
downloadcdo-b768474b1b8308889303a150f5d17b6bcbfd8ce0.tar.gz
cdo-b768474b1b8308889303a150f5d17b6bcbfd8ce0.tar.xz
cdo-b768474b1b8308889303a150f5d17b6bcbfd8ce0.zip
[436036] Generated Dawn Editor Wizards don't show resources inside the view
https://bugs.eclipse.org/bugs/show_bug.cgi?id=436036 Apply the same fix as in the DawnItemProvider (bug 404043) for the problem of not having tree nodes for the returned children.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/views/DawnWizardPageItemProvider.java24
1 files changed, 11 insertions, 13 deletions
diff --git a/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/views/DawnWizardPageItemProvider.java b/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/views/DawnWizardPageItemProvider.java
index 6b14246125..831511f7da 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/views/DawnWizardPageItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/views/DawnWizardPageItemProvider.java
@@ -1,18 +1,18 @@
/*
- * Copyright (c) 2010-2012 Eike Stepper (Berlin, Germany) and others.
+ * Copyright (c) 2010-2014 Eike Stepper (Berlin, Germany) 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:
* Martin Fluegge - initial API and implementation
+ * Christian W. Damus (CEA) - bug 436036
*/
package org.eclipse.emf.cdo.dawn.ui.views;
import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
import org.eclipse.emf.cdo.eresource.CDOResourceNode;
-import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.ui.CDOItemProvider;
import org.eclipse.emf.cdo.view.CDOView;
@@ -34,20 +34,18 @@ public class DawnWizardPageItemProvider<CONTAINER extends IContainer<Object>> ex
@Override
public Object[] getChildren(Object element)
{
- if (element instanceof CDOResourceFolder)
- {
- return ((CDOResourceFolder)element).getNodes().toArray();
- }
+ Object[] result = super.getChildren(element);
- if (element instanceof CDOSession)
+ if (result.length > 0 && result[0] instanceof CDOView)
{
- CDOSession session = (CDOSession)element;
- Object[] child = new Object[1];
- child[0] = session.getViews()[0];// .getView(dawnExplorer.getView().getViewID());
- return child;
+ // filter the views to show only the first view
+ if (result.length > 1)
+ {
+ result = new Object[] { result[0] };
+ }
}
- return super.getChildren(element);
+ return result;
}
@Override

Back to the top