KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > ui > sourcelookup > AbstractSourceContainerBrowser


1 /*******************************************************************************
2  * Copyright (c) 2004, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.debug.ui.sourcelookup;
12
13 import org.eclipse.debug.core.sourcelookup.ISourceContainer;
14 import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
15 import org.eclipse.swt.widgets.Shell;
16
17 /**
18  * Common implementation for source container browsers.
19  * <p>
20  * Clients implementing <code>ISourceContainerBrowser</code> should
21  * subclass this class.
22  * </p>
23  * @since 3.0
24  */

25 public class AbstractSourceContainerBrowser implements ISourceContainerBrowser {
26     /* (non-Javadoc)
27      * @see org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser#addSourceContainers(org.eclipse.swt.widgets.Shell, org.eclipse.debug.core.sourcelookup.ISourceLookupDirector)
28      */

29     public ISourceContainer[] addSourceContainers(Shell shell, ISourceLookupDirector director) {
30         return new ISourceContainer[0];
31     }
32     /* (non-Javadoc)
33      *
34      * Generally, a source container browser can add source containers. Subclasses
35      * should override as required.
36      *
37      * @see org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser#canAddSourceContainers(org.eclipse.debug.core.sourcelookup.ISourceLookupDirector)
38      */

39     public boolean canAddSourceContainers(ISourceLookupDirector director) {
40         return true;
41     }
42     /* (non-Javadoc)
43      * @see org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser#editSourceContainers(org.eclipse.swt.widgets.Shell, org.eclipse.debug.core.sourcelookup.ISourceLookupDirector, org.eclipse.debug.core.sourcelookup.ISourceContainer[])
44      */

45     public ISourceContainer[] editSourceContainers(Shell shell, ISourceLookupDirector director, ISourceContainer[] containers) {
46         return new ISourceContainer[0];
47     }
48     /* (non-Javadoc)
49      *
50      * Not all source containers can be edited. Subclasses should override
51      * as required.
52      *
53      * @see org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser#canEditSourceContainers(org.eclipse.debug.core.sourcelookup.ISourceLookupDirector, org.eclipse.debug.core.sourcelookup.ISourceContainer[])
54      */

55     public boolean canEditSourceContainers(ISourceLookupDirector director, ISourceContainer[] containers) {
56         return false;
57     }
58 }
59
Popular Tags