Java Code Examples for org.eclipse.emf.common.notify.Notifier#eAdapters()

The following examples show how to use org.eclipse.emf.common.notify.Notifier#eAdapters() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
public static GModelIdAdpater getGModelIdAdapter(Notifier notifier) {
	List<Adapter> adapters = notifier.eAdapters();
	for (int i = 0, size = adapters.size(); i < size; ++i) {
		Object adapter = adapters.get(i);
		if (adapter instanceof GModelIdAdpater) {
			return (GModelIdAdpater) adapter;
		}
	}
	return null;
}
 
Example 2
public static GeneratorConfigAdapter findInEmfObject(Notifier emfObject) {
	for (Adapter adapter : emfObject.eAdapters()) {
		if (adapter instanceof GeneratorConfigAdapterAdapter) {
			return ((GeneratorConfigAdapterAdapter) adapter).get();
		}
	}
	return null;
}
 
Example 3
public static GeneratorConfigAdapter removeFromEmfObject(Notifier emfObject) {
	List<Adapter> adapters = emfObject.eAdapters();
	for (int i = 0, max = adapters.size(); i < max; i++) {
		Adapter adapter = adapters.get(i);
		if (adapter instanceof GeneratorConfigAdapterAdapter) {
			emfObject.eAdapters().remove(i);
			return ((GeneratorConfigAdapterAdapter) adapter).get();
		}
	}
	return null;
}
 
Example 4
Source Project: xtext-extras   File: JavaConfig.java    License: Eclipse Public License 2.0 5 votes vote down vote up
public static JavaConfig removeFromEmfObject(Notifier emfObject) {
	List<Adapter> adapters = emfObject.eAdapters();
	for (int i = 0, max = adapters.size(); i < max; i++) {
		Adapter adapter = adapters.get(i);
		if (adapter instanceof JavaConfig.JavaConfigAdapter) {
			emfObject.eAdapters().remove(i);
			return ((JavaConfig.JavaConfigAdapter) adapter).get();
		}
	}
	return null;
}
 
Example 5
public static ClassFileCache removeFromEmfObject(Notifier emfObject) {
	List<Adapter> adapters = emfObject.eAdapters();
	for (int i = 0, max = adapters.size(); i < max; i++) {
		Adapter adapter = adapters.get(i);
		if (adapter instanceof ClassFileCache.ClassFileCacheAdapter) {
			emfObject.eAdapters().remove(i);
			return ((ClassFileCache.ClassFileCacheAdapter) adapter).get();
		}
	}
	return null;
}
 
Example 6
public static RuleWithParameterValues findInEmfObject(Notifier emfObject) {
	for (Adapter adapter : emfObject.eAdapters()) {
		if (adapter instanceof RuleWithParameterValues.RuleWithParameterValuesAdapter) {
			return ((RuleWithParameterValues.RuleWithParameterValuesAdapter) adapter).get();
		}
	}
	return null;
}
 
Example 7
public static RuleWithParameterValues removeFromEmfObject(Notifier emfObject) {
	List<Adapter> adapters = emfObject.eAdapters();
	for (int i = 0, max = adapters.size(); i < max; i++) {
		Adapter adapter = adapters.get(i);
		if (adapter instanceof RuleWithParameterValues.RuleWithParameterValuesAdapter) {
			emfObject.eAdapters().remove(i);
			return ((RuleWithParameterValues.RuleWithParameterValuesAdapter) adapter).get();
		}
	}
	return null;
}
 
Example 8
public static OriginalElement findInEmfObject(Notifier emfObject) {
	for (Adapter adapter : emfObject.eAdapters()) {
		if (adapter instanceof OriginalElement.OriginalElementAdapter) {
			return ((OriginalElement.OriginalElementAdapter) adapter).get();
		}
	}
	return null;
}
 
Example 9
public static OriginalElement removeFromEmfObject(Notifier emfObject) {
	List<Adapter> adapters = emfObject.eAdapters();
	for (int i = 0, max = adapters.size(); i < max; i++) {
		Adapter adapter = adapters.get(i);
		if (adapter instanceof OriginalElement.OriginalElementAdapter) {
			emfObject.eAdapters().remove(i);
			return ((OriginalElement.OriginalElementAdapter) adapter).get();
		}
	}
	return null;
}
 
Example 10
public static FlattenedGrammarAccess findInEmfObject(Notifier emfObject) {
	for (Adapter adapter : emfObject.eAdapters()) {
		if (adapter instanceof FlattenedGrammarAccessAdapter)
			return ((FlattenedGrammarAccessAdapter) adapter).get();
	}
	return null;
}
 
Example 11
public static FlattenedGrammarAccess removeFromEmfObject(Notifier emfObject) {
	List<Adapter> adapters = emfObject.eAdapters();
	for (int i = 0; i < adapters.size(); i++) {
		Adapter adapter = adapters.get(i);
		if (adapter instanceof FlattenedGrammarAccessAdapter)
			return ((FlattenedGrammarAccessAdapter) emfObject.eAdapters().remove(i)).get();
	}
	return null;
}
 
Example 12
public static OriginalGrammar findInEmfObject(Notifier emfObject) {
	for (Adapter adapter : emfObject.eAdapters()) {
		if (adapter instanceof OriginalGrammar.OriginalGrammarAdapter) {
			return ((OriginalGrammar.OriginalGrammarAdapter) adapter).get();
		}
	}
	return null;
}
 
Example 13
public static PreferenceValuesByLanguage removeFromEmfObject(Notifier emfObject) {
	List<Adapter> adapters = emfObject.eAdapters();
	for (int i = 0; i < adapters.size(); i++) {
		Adapter adapter = adapters.get(i);
		if (adapter instanceof PreferenceValuesByLanguageAdapter)
			return ((PreferenceValuesByLanguageAdapter) emfObject.eAdapters().remove(i)).get();
	}
	return null;
}
 
Example 14
public static ChunkedResourceDescriptions findInEmfObject(Notifier emfObject) {
	for (Adapter adapter : emfObject.eAdapters()) {
		if (adapter instanceof ChunkedResourceDescriptionsAdapter)
			return ((ChunkedResourceDescriptionsAdapter) adapter).get();
	}
	return null;
}
 
Example 15
public static CombinedGrammarMarker removeFromEmfObject(Notifier emfObject) {
	List<Adapter> adapters = emfObject.eAdapters();
	for (int i = 0, max = adapters.size(); i < max; i++) {
		Adapter adapter = adapters.get(i);
		if (adapter instanceof CombinedGrammarMarker.CombinedGrammarMarkerAdapter) {
			emfObject.eAdapters().remove(i);
			return ((CombinedGrammarMarker.CombinedGrammarMarkerAdapter) adapter).get();
		}
	}
	return null;
}
 
Example 16
public static CombinedGrammarMarker findInEmfObject(Notifier emfObject) {
	for (Adapter adapter : emfObject.eAdapters()) {
		if (adapter instanceof CombinedGrammarMarker.CombinedGrammarMarkerAdapter) {
			return ((CombinedGrammarMarker.CombinedGrammarMarkerAdapter) adapter).get();
		}
	}
	return null;
}
 
Example 17
public static ProjectDescription removeFromEmfObject(Notifier emfObject) {
	List<Adapter> adapters = emfObject.eAdapters();
	for (int i = 0; i < adapters.size(); i++) {
		Adapter adapter = adapters.get(i);
		if (adapter instanceof ProjectDescriptionAdapter)
			return ((ProjectDescriptionAdapter) emfObject.eAdapters().remove(i)).get();
	}
	return null;
}
 
Example 18
public static ProjectConfigAdapter removeFromEmfObject(Notifier emfObject) {
	List<Adapter> adapters = emfObject.eAdapters();
	for (int i = 0, max = adapters.size(); i < max; i++) {
		Adapter adapter = adapters.get(i);
		if (adapter instanceof ProjectConfigAdapterAdapter) {
			emfObject.eAdapters().remove(i);
			return ((ProjectConfigAdapterAdapter) adapter).get();
		}
	}
	return null;
}
 
Example 19
public static ProjectConfigAdapter findInEmfObject(Notifier emfObject) {
	for (Adapter adapter : emfObject.eAdapters()) {
		if (adapter instanceof ProjectConfigAdapterAdapter) {
			return ((ProjectConfigAdapterAdapter) adapter).get();
		}
	}
	return null;
}
 
Example 20
public static PreferenceValuesByLanguage findInEmfObject(Notifier emfObject) {
	for (Adapter adapter : emfObject.eAdapters())
		if (adapter instanceof PreferenceValuesByLanguageAdapter)
			return ((PreferenceValuesByLanguageAdapter) adapter).get();
	return null;
}