Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/PackageOnlyContentProvider.java')
-rw-r--r--plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/PackageOnlyContentProvider.java57
1 files changed, 0 insertions, 57 deletions
diff --git a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/PackageOnlyContentProvider.java b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/PackageOnlyContentProvider.java
deleted file mode 100644
index 9b8690f28..000000000
--- a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/PackageOnlyContentProvider.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jem.internal.beaninfo.ui;
-/*
-
-
- */
-
-
-import org.eclipse.jdt.ui.StandardJavaElementContentProvider;
-
-import org.eclipse.jdt.core.IPackageFragment;
-import java.util.*;
-/**
- * A content provider which will only go down to the package level,
- * it won't explore further. The advantage of this is so that plus signs ('+')
- * won't show up on packages. The Filter technique could be used to not
- * show the children, but this still shows the plus sign.
- *
- * Also, if the element is a java.util.List, then that list will be returned
- * as the children. This allows for a root to be composed instead of being
- * one of the standard Java Elements.
- */
-
-public class PackageOnlyContentProvider extends StandardJavaElementContentProvider {
-
- /**
- * If the element is a list, return the iterator on it.
- * Else send it up the chain.
- */
- public Object[] getChildren(Object element) {
- if (element instanceof List)
- return ((List) element).toArray();
- return super.getChildren(element);
- }
-
- /**
- * If the element is a list and it is not empty, it has children,
- * if it is a IPackageFragment it does not,
- * else send it up the chain.
- */
- public boolean hasChildren(Object element) {
- if (element instanceof List)
- return !((List) element).isEmpty();
- if (element instanceof IPackageFragment)
- return false;
- return super.hasChildren(element);
- }
-}

Back to the top