Package: AcceleoSourceLookupDirector

AcceleoSourceLookupDirector

nameinstructionbranchcomplexitylinemethod
AcceleoSourceLookupDirector()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
initializeParticipants()
M: 11 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
static {...}
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
supportsSourceContainerType(ISourceContainerType)
M: 9 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2008, 2012 Obeo.
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: * Obeo - initial API and implementation
10: *******************************************************************************/
11: package org.eclipse.acceleo.internal.ide.ui.launching;
12:
13: import java.util.Set;
14:
15: import org.eclipse.acceleo.common.utils.CompactHashSet;
16: import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector;
17: import org.eclipse.debug.core.sourcelookup.ISourceContainerType;
18: import org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant;
19: import org.eclipse.jdt.launching.sourcelookup.containers.JavaProjectSourceContainer;
20:
21: /**
22: * Acceleo source lookup director. Directs source lookup among a collection of source lookup participants, and
23: * a common collection of source containers.
24: *
25: * @author <a href="mailto:jonathan.musset@obeo.fr">Jonathan Musset</a>
26: */
27: public class AcceleoSourceLookupDirector extends AbstractSourceLookupDirector {
28:
29:         /**
30:          * Filtered types.
31:          */
32:         private static Set<String> fFilteredTypes;
33:
34:         static {
35:                 fFilteredTypes = new CompactHashSet<String>();
36:                 fFilteredTypes.add(JavaProjectSourceContainer.TYPE_ID);
37:         }
38:
39:         /**
40:          * {@inheritDoc}
41:          *
42:          * @see org.eclipse.debug.core.sourcelookup.ISourceLookupDirector#initializeParticipants()
43:          */
44:         public void initializeParticipants() {
45:                 addParticipants(new ISourceLookupParticipant[] {new AcceleoSourceLookupParticipant() });
46:         }
47:
48:         /**
49:          * {@inheritDoc}
50:          *
51:          * @see org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector#supportsSourceContainerType(org.eclipse.debug.core.sourcelookup.ISourceContainerType)
52:          */
53:         @Override
54:         public boolean supportsSourceContainerType(ISourceContainerType type) {
55:•                return !fFilteredTypes.contains(type.getId());
56:         }
57: }