Skip to main content
summaryrefslogtreecommitdiffstats
blob: 62e463287fb44f901f8eab9a9b79bccbfb50ed9e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*******************************************************************************
 * Copyright (c) 2005-2009 itemis AG (http://www.itemis.eu) 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
 *
 *******************************************************************************/
package org.eclipse.internal.xtend.expression.debug;

import org.eclipse.emf.mwe.core.debug.model.SyntaxElement;
import org.eclipse.internal.xtend.expression.ast.ISyntaxElement;
import org.eclipse.xtend.expression.ExecutionContext;

/**
 * Base class for all special treatments for element adapters.
 * 
 * @author Clemens Kadura (zAJKa)
 */
public abstract class BaseSpecialTreatment {

	public boolean shallNotSuspend(Object element, int flag, ExecutionContext context) {
		return false;
	}

	public void adaptSyntaxElement(SyntaxElement to, Object element) {
		// empty implementation
	}

	/**
	 * add syntax element specific content to the element name that will be shown in Launch view
	 * @param se the syntax element
	 * @param context the execution context
	 * @return the special text to add to the name
	 */
	public String adaptElementName(ISyntaxElement se, ExecutionContext context){
		return "";
	}

	public ISyntaxElement getSpecialEndSyntaxElement(ISyntaxElement se){
		return null;
	}

	public int getElementNameLength(ISyntaxElement se) {
		return -1;
	}

}

Back to the top