Permalink
Browse files

Removed further viatra references from code base #359

  • Loading branch information...
ujhelyiz committed Nov 29, 2012
1 parent 0fb2a73 commit c235e24deb64eeddf1c22cc8ab709f13baab56d4
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: org.eclipse.viatra2.emf.incquery.runtime.graphiti
+Bundle-Name: org.eclipse.incquery.runtime.graphiti
Bundle-SymbolicName: org.eclipse.incquery.runtime.graphiti;singleton:=true
Bundle-Version: 0.7.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
@@ -5,36 +5,36 @@
point="org.eclipse.ui.handlers">
<handler
class="org.eclipse.incquery.runtime.graphiti.handlers.GraphitiEditorLoadModelHandler"
- commandId="org.eclipse.viatra2.emf.incquery.tooling.gui.loadmodel">
+ commandId="org.eclipse.incquery.tooling.ui.loadmodel">
<activeWhen>
<reference
- definitionId="org.eclipse.viatra2.emf.incquery.runtime.graphiti.editorDefinition">
+ definitionId="org.eclipse.incquery.runtime.graphiti.editorDefinition">
</reference>
</activeWhen>
</handler>
<handler
class="org.eclipse.incquery.runtime.graphiti.handlers.GraphitiEditorLoadResourceHandler"
- commandId="org.eclipse.viatra2.emf.incquery.tooling.gui.loadresource">
+ commandId="org.eclipse.incquery.tooling.ui.loadresource">
<activeWhen>
<reference
- definitionId="org.eclipse.viatra2.emf.incquery.runtime.graphiti.editorDefinition">
+ definitionId="org.eclipse.incquery.runtime.graphiti.editorDefinition">
</reference>
</activeWhen>
</handler>
<handler
class="org.eclipse.incquery.runtime.graphiti.handlers.GraphitiEditorLoadModelHandler"
- commandId="org.eclipse.viatra2.emf.incquery.tooling.gui.loadresourceset">
+ commandId="org.eclipse.incquery.tooling.ui.loadresourceset">
<activeWhen>
<reference
- definitionId="org.eclipse.viatra2.emf.incquery.runtime.graphiti.editorDefinition">
+ definitionId="org.eclipse.incquery.runtime.graphiti.editorDefinition">
</reference>
</activeWhen>
</handler>
</extension>
<extension
point="org.eclipse.core.expressions.definitions">
<definition
- id="org.eclipse.viatra2.emf.incquery.runtime.graphiti.editorDefinition">
+ id="org.eclipse.incquery.runtime.graphiti.editorDefinition">
<with variable="activeEditorId">
<equals
value="org.eclipse.graphiti.ui.editor.DiagramEditor">
@@ -187,8 +187,8 @@ class SampleUIGenerator implements IGenerationFragment {
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.handlers.HandlerUtil;
- import org.eclipse.viatra2.emf.incquery.gui.dialog.SampleUIDialogCreator;
- import org.eclipse.viatra2.emf.incquery.runtime.exception.IncQueryException;
+ import org.eclipse.incquery.tooling.ui.dialog.SampleUIDialogCreator;
+ import org.eclipse.incquery.runtime.exception.IncQueryException;
import «pattern.packageName + "." + pattern.matcherClassName»;
import «pattern.packageName + "." + pattern.matchClassName»;
@@ -237,7 +237,8 @@ public void menuAboutToShow(IMenuManager mgr) {
// Create menu for tree viewer
Menu matcherTreeViewerMenu = matcherTreeViewerMenuManager.createContextMenu(matcherTreeViewer.getControl());
matcherTreeViewer.getControl().setMenu(matcherTreeViewerMenu);
- getSite().registerContextMenu("org.eclipse.viatra2.emf.incquery.queryexplorer.QueryExplorer.treeViewerMenu", matcherTreeViewerMenuManager, matcherTreeViewer);
+ getSite().registerContextMenu("org.eclipse.incquery.queryexplorer.QueryExplorer.treeViewerMenu",
+ matcherTreeViewerMenuManager, matcherTreeViewer);
MenuManager patternsViewerMenuManager = new MenuManager();
patternsViewerMenuManager.setRemoveAllWhenShown(true);
@@ -250,7 +251,8 @@ public void menuAboutToShow(IMenuManager mgr) {
// Create menu for patterns viewer
Menu patternsViewerMenu = patternsViewerMenuManager.createContextMenu(patternsTreeViewer.getControl());
patternsTreeViewer.getControl().setMenu(patternsViewerMenu);
- getSite().registerContextMenu("org.eclipse.viatra2.emf.incquery.queryexplorer.QueryExplorer.patternsViewerMenu", patternsViewerMenuManager, patternsTreeViewer);
+ getSite().registerContextMenu("org.eclipse.incquery.queryexplorer.QueryExplorer.patternsViewerMenu",
+ patternsViewerMenuManager, patternsTreeViewer);
//tableView configuration
Table table = detailsTableViewer.getTable();
@@ -68,7 +68,7 @@ protected void setSelectionToXTextEditor(Pattern pattern) {
for (IEditorReference ref : PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences()) {
String id = ref.getId();
IEditorPart editor = ref.getEditor(true);
- if(id.equals("org.eclipse.viatra2.patternlanguage.EMFPatternLanguage")) {
+ if (id.equals("org.eclipse.incquery.patternlanguage.emf.EMFPatternLanguage")) {
//The editor id always registers an Xtext editor
assert editor instanceof XtextEditor;
XtextEditor providerEditor = (XtextEditor) editor;
@@ -13,6 +13,6 @@
public class PreferenceConstants {
- public static final String WILDCARD_MODE = "org.eclipse.viatra2.emf.incquery.tooling.gui.queryexplorer.WildcardMode";
+ public static final String WILDCARD_MODE = "org.eclipse.incquery.tooling.gui.queryexplorer.WildcardMode";
}
@@ -16,6 +16,6 @@
*/
public class CommandConstants {
- public static String SHOW_LOCATION_COMMAND_ID = "org.eclipse.viatra2.emf.incquery.tooling.gui.showlocation";
+ public static String SHOW_LOCATION_COMMAND_ID = "org.eclipse.incquery.tooling.ui.showlocation";
}
@@ -71,7 +71,11 @@
@Singleton
public class DatabindingUtil {
- private static Map<URI, AdapterFactoryLabelProvider> registeredItemProviders = new HashMap<URI, AdapterFactoryLabelProvider>();
+ /**
+ *
+ */
+ private static final String DATABINDING_EXTENSION = "org.eclipse.incquery.databinding.runtime.databinding";
+ private static Map<URI, AdapterFactoryLabelProvider> registeredItemProviders = new HashMap<URI, AdapterFactoryLabelProvider>();
private static Map<URI, IConfigurationElement> uriConfElementMap = null;
private static ILog logger = IncQueryGUIPlugin.getDefault().getLog();
private static Map<String, IMarker> orderByPatternMarkers = new HashMap<String, IMarker>();
@@ -270,7 +274,6 @@ public static String getMessage(
String filtered = isFiltered ? " - Filtered" : "";
- //return this.matcher.getPatternName() + (isGeneratedString +" [size of matchset: "+matches.size()+"]");
return String.format("%s - %s %s %s", matcher.getPatternName(), matchString, filtered, isGeneratedString);
}
}
@@ -295,7 +298,7 @@ private static String getMessageForGeneratedMatcher(IPatternMatch match) {
try {
IExtensionRegistry reg = Platform.getExtensionRegistry();
IExtensionPoint ep = reg
- .getExtensionPoint("org.eclipse.viatra2.emf.incquery.databinding.runtime.databinding");
+.getExtensionPoint(DATABINDING_EXTENSION);
for (IExtension e : ep.getExtensions()) {
for (IConfigurationElement ce : e.getConfigurationElements()) {
String[] tokens = patternName.split("\\.");
@@ -383,7 +386,7 @@ private static String getMessageForGenericMatcher(IPatternMatch match) {
private static DatabindingAdapter<IPatternMatch> getDatabindingAdapterForGeneratedMatcher(String patternName) {
try {
IExtensionRegistry reg = Platform.getExtensionRegistry();
- IExtensionPoint ep = reg.getExtensionPoint("org.eclipse.viatra2.emf.incquery.databinding.runtime.databinding");
+ IExtensionPoint ep = reg.getExtensionPoint(DATABINDING_EXTENSION);
for (IExtension e : ep.getExtensions()) {
for (IConfigurationElement ce : e.getConfigurationElements()) {
String[] tokens = patternName.split("\\.");
@@ -41,11 +41,10 @@ class ValidationGenerator extends DatabindingGenerator implements IGenerationFra
private static String VALIDATIONEXTENSION_PREFIX = "validation.constraint."
private static String UI_VALIDATION_MENUS_PREFIX = "generated.incquery.validation.menu."
- private static String UI_VALIDATION_MENU_URI = "popup:org.eclipse.viatra2.emf.incquery.validation.runtime.ui.menu?after=additions"
- private static String VALIDATION_EXTENSION_POINT = "org.eclipse.viatra2.emf.incquery.validation.runtime.constraint"
+ private static String VALIDATION_EXTENSION_POINT = "org.eclipse.incquery.validation.runtime.constraint"
private static String ECLIPSE_MENUS_EXTENSION_POINT = "org.eclipse.ui.menus"
private static String annotationLiteral = "Constraint"
- private static String VALIDATION_ERROR_CODE = "org.eclipse.viatra2.emf.incquery.validation.error"
+ private static String VALIDATION_ERROR_CODE = "org.eclipse.incquery.validation.error"
override generateFiles(Pattern pattern, IFileSystemAccess fsa) {
@@ -101,8 +100,8 @@ class ValidationGenerator extends DatabindingGenerator implements IGenerationFra
}
override getProjectDependencies() {
- newArrayList("org.eclipse.viatra2.emf.incquery.runtime",
- "org.eclipse.viatra2.emf.incquery.validation.runtime"
+ newArrayList("org.eclipse.incquery.runtime",
+ "org.eclipse.incquery.validation.runtime"
)
}
@@ -144,58 +143,10 @@ class ValidationGenerator extends DatabindingGenerator implements IGenerationFra
}
]
)
- /*for(ann : pattern.annotations){
- if(ann.name == annotationLiteral){
- val editorIds = ann.getAnnotationParameterValue("targetEditorId")
- for (id : editorIds){
- val editorId = (id as StringValue).value
- editorId.createExtensionContributionForEditorId(exGen,extensionList)
- }
- }
- }
-
- if(pattern.hasAnnotationLiteral(annotationLiteral)){
- val patternModel = pattern.eContainer as PatternModel;
- for (imp : patternModel.importPackages) {
- val pack = imp.EPackage;
- val genPackage = eiqGenModelProvider.findGenPackage(pattern, pack);
-
- if (genPackage != null) {
- val editorId = genPackage.qualifiedEditorClassName+"ID";
- editorId.createExtensionContributionForEditorId(exGen,extensionList)
- }
- }
- }*/
return extensionList
}
- /*def createExtensionContributionForEditorId(String editorId, ExtensionGenerator exGen, List extensionList){
-
- if (!editorId.nullOrEmpty && !contributedEditorIds.contains(editorId)) {
- val editorMenuContribution = exGen.contribExtension(menuContributionId(editorId), ECLIPSE_MENUS_EXTENSION_POINT) [
- exGen.contribElement(it, "menuContribution") [
- exGen.contribAttribute(it, "locationURI", UI_VALIDATION_MENU_URI)
- exGen.contribElement(it, "command") [
- exGen.contribAttribute(it, "commandId", "org.eclipse.viatra2.emf.incquery.validation.runtime.ui.initValidatorsOnEditor")
- exGen.contribAttribute(it, "style", "push")
- exGen.contribElement(it, "visibleWhen") [
- exGen.contribAttribute(it, "checkEnabled", "false")
- exGen.contribElement(it, "with")[
- exGen.contribAttribute(it, "variable", "activeEditorId")
- exGen.contribElement(it, "equals")[
- exGen.contribAttribute(it, "value", editorId)
- ]
- ]
- ]
- ]
- ]
- ]
- extensionList.add(editorMenuContribution)
- contributedEditorIds.add(editorId)
- }
- }*/
-
def constraintClassName(Pattern pattern, Annotation annotation) {
String::format("%s.%s%s%s", pattern.packageName, pattern.realPatternName.toFirstUpper, annotationLiteral,pattern.annotations.indexOf(annotation))
}
@@ -240,10 +191,10 @@ class ValidationGenerator extends DatabindingGenerator implements IGenerationFra
import org.eclipse.emf.ecore.EObject;
- import org.eclipse.viatra2.emf.incquery.validation.runtime.Constraint;
- import org.eclipse.viatra2.emf.incquery.validation.runtime.ValidationUtil;
- import org.eclipse.viatra2.emf.incquery.runtime.api.impl.BaseGeneratedMatcherFactory;
- import org.eclipse.viatra2.emf.incquery.runtime.exception.IncQueryException;
+ import org.eclipse.incquery.validation.runtime.Constraint;
+ import org.eclipse.incquery.validation.runtime.ValidationUtil;
+ import org.eclipse.incquery.runtime.api.impl.BaseGeneratedMatcherFactory;
+ import org.eclipse.incquery.runtime.exception.IncQueryException;
import «pattern.packageName + "." + pattern.matchClassName»;
import «pattern.packageName + "." + pattern.matcherFactoryClassName»;

0 comments on commit c235e24

Please sign in to comment.