mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 08:48:55 +00:00
[xtext] added @Singleton annotations
This commit is contained in:
parent
3c441be3e3
commit
c9a2f51cce
3 changed files with 6 additions and 0 deletions
|
@ -12,6 +12,7 @@ import java.util.List;
|
|||
import org.eclipse.xtext.util.Strings;
|
||||
|
||||
import com.google.inject.ImplementedBy;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
/**
|
||||
* Converts {@link QualifiedName}s to strings and back.
|
||||
|
@ -28,6 +29,7 @@ public interface IQualifiedNameConverter {
|
|||
|
||||
QualifiedName toQualifiedName(String qualifiedNameAsText);
|
||||
|
||||
@Singleton
|
||||
static class DefaultImpl implements IQualifiedNameConverter {
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,6 +18,7 @@ import org.eclipse.xtext.util.IResourceScopeCache;
|
|||
import org.eclipse.xtext.util.RuntimeIOException;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -26,6 +27,7 @@ import com.google.inject.Inject;
|
|||
* @author Sven Efftinge - Initial contribution and API
|
||||
* @since 2.1
|
||||
*/
|
||||
@Singleton
|
||||
public class DerivedStateAwareResourceDescriptionManager extends DefaultResourceDescriptionManager {
|
||||
|
||||
private final static Logger log = Logger.getLogger(DerivedStateAwareResourceDescriptionManager.class);
|
||||
|
|
|
@ -25,12 +25,14 @@ import org.eclipse.xtext.resource.IReferenceDescription;
|
|||
import org.eclipse.xtext.util.IAcceptor;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
/**
|
||||
* By default, all elements with a not null <code>name</code> feature and all cross-resource crossrefs are indexed.
|
||||
*
|
||||
* @author Jan Koehnlein - Initial contribution and API
|
||||
*/
|
||||
@Singleton
|
||||
public class DefaultResourceDescriptionStrategy implements IDefaultResourceDescriptionStrategy {
|
||||
|
||||
private final static Logger LOG = Logger.getLogger(DefaultResourceDescriptionStrategy.class);
|
||||
|
|
Loading…
Reference in a new issue