package org.simantics.sysdyn.ui.wizards.functions;\r
\r
import java.io.File;\r
-import java.io.IOException;\r
-import java.util.ArrayList;\r
\r
+import org.eclipse.core.runtime.IStatus;\r
import org.eclipse.core.runtime.Path;\r
+import org.eclipse.core.runtime.Status;\r
import org.eclipse.jface.layout.GridDataFactory;\r
import org.eclipse.jface.layout.PixelConverter;\r
import org.eclipse.jface.viewers.ISelection;\r
import org.simantics.browsing.ui.swt.AdaptableHintContext;\r
import org.simantics.browsing.ui.swt.widgets.GraphExplorerComposite;\r
import org.simantics.databoard.Bindings;\r
-import org.simantics.databoard.Files;\r
-import org.simantics.databoard.binding.error.RuntimeBindingConstructionException;\r
import org.simantics.db.ReadGraph;\r
import org.simantics.db.Resource;\r
import org.simantics.db.common.primitiverequest.PossibleRelatedValue;\r
import org.simantics.db.common.request.ReadRequest;\r
import org.simantics.db.common.utils.NameUtils;\r
import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.layer0.util.TransferableGraphRequest2;\r
+import org.simantics.db.layer0.util.ModelTransferableGraphSourceRequest;\r
+import org.simantics.db.layer0.util.TransferableGraphConfiguration2;\r
import org.simantics.db.request.Read;\r
-import org.simantics.graph.representation.TransferableGraph1;\r
+import org.simantics.graph.db.TGStatusMonitor;\r
+import org.simantics.graph.db.TransferableGraphSource;\r
+import org.simantics.graph.db.TransferableGraphs;\r
import org.simantics.layer0.Layer0;\r
import org.simantics.sysdyn.SysdynResource;\r
+import org.simantics.sysdyn.ui.Activator;\r
import org.simantics.ui.SimanticsUI;\r
import org.simantics.utils.datastructures.ArrayMap;\r
-import org.simantics.utils.datastructures.Pair;\r
\r
public class WizardFunctionsExportPage extends WizardPage {\r
\r
Label title = new Label(workArea, SWT.NONE);\r
title.setText("Select Function Library to export:");\r
\r
- try {\r
- Resource input = SimanticsUI.getSession().syncRequest(new Read<Resource>() {\r
+ Resource input = SimanticsUI.getProject().get();\r
\r
- @Override\r
- public Resource perform(ReadGraph graph)\r
- throws DatabaseException {\r
- Resource model = SimanticsUI.getProject().get();\r
- return model;\r
- }\r
+ functionLibraryExplorer = new GraphExplorerComposite(ArrayMap.keys(\r
+ "displaySelectors", "displayFilter").values(false, false), null, workArea, SWT.BORDER | SWT.SINGLE);\r
\r
- });\r
+ functionLibraryExplorer\r
+ .setBrowseContexts(SysdynResource.URIs.FunctionTree);\r
\r
- functionLibraryExplorer = new GraphExplorerComposite(ArrayMap.keys(\r
- "displaySelectors", "displayFilter").values(false, false), null, workArea, SWT.BORDER | SWT.SINGLE);\r
+ functionLibraryExplorer.finish();\r
\r
- functionLibraryExplorer\r
- .setBrowseContexts(SysdynResource.URIs.FunctionTree);\r
+ functionLibraryExplorer.setInput(null, input);\r
\r
- functionLibraryExplorer.finish();\r
-\r
- functionLibraryExplorer.setInput(null, input);\r
-\r
- GridDataFactory.fillDefaults().grab(true, true).applyTo(\r
- functionLibraryExplorer);\r
- \r
- ((Tree)functionLibraryExplorer.getExplorer().getControl()).addSelectionListener(new SelectionListener() {\r
- \r
- @Override\r
- public void widgetSelected(SelectionEvent e) {\r
- setMessage(null);\r
- selectionMade = true;\r
- validatePage();\r
- }\r
- @Override\r
- public void widgetDefaultSelected(SelectionEvent e) {\r
- setMessage(null);\r
- selectionMade = true;\r
- validatePage();\r
- }\r
- });\r
-\r
- } catch (DatabaseException e) {\r
- e.printStackTrace();\r
- }\r
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(\r
+ functionLibraryExplorer);\r
\r
+ ((Tree)functionLibraryExplorer.getExplorer().getControl()).addSelectionListener(new SelectionListener() {\r
\r
+ @Override\r
+ public void widgetSelected(SelectionEvent e) {\r
+ setMessage(null);\r
+ selectionMade = true;\r
+ validatePage();\r
+ }\r
+ @Override\r
+ public void widgetDefaultSelected(SelectionEvent e) {\r
+ setMessage(null);\r
+ selectionMade = true;\r
+ validatePage();\r
+ }\r
+ });\r
}\r
\r
//Set filePathField active\r
}\r
\r
});\r
- } catch (DatabaseException e1) {\r
- e1.printStackTrace();\r
+ } catch (DatabaseException ex) {\r
+ Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID,\r
+ "Failed to read name of function library " + functionLibrary + ", see exception for details.", ex));\r
}\r
if(name == null) return false;\r
- \r
+\r
SimanticsUI.getSession().asyncRequest(new ReadRequest() {\r
- \r
@Override\r
public void run(ReadGraph graph) throws DatabaseException {\r
- Layer0 l0 = Layer0.getInstance(graph);\r
- String name = graph.syncRequest(new PossibleRelatedValue<String>(functionLibrary, l0.HasName, Bindings.STRING ));\r
- ArrayList<Pair<Resource, String>> roots = new ArrayList<Pair<Resource, String>>();\r
- roots.add(Pair.make(functionLibrary, name));\r
- TransferableGraph1 tg = graph.syncRequest(new TransferableGraphRequest2(roots, functionLibrary));\r
-\r
- try {\r
- Files.createFile(new File(selected), Bindings.getBindingUnchecked(TransferableGraph1.class), tg);\r
- } catch (RuntimeBindingConstructionException e) {\r
- e.printStackTrace();\r
- } catch (IOException e) {\r
- e.printStackTrace();\r
+ TransferableGraphConfiguration2 conf = new TransferableGraphConfiguration2(graph, functionLibrary);\r
+ try (TransferableGraphSource tgs = graph.syncRequest( new ModelTransferableGraphSourceRequest(conf) )) {\r
+ TransferableGraphs.writeTransferableGraph(graph, tgs, new File(selected), TGStatusMonitor.NULL_MONITOR);\r
+ } catch (Exception e) {\r
+ Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID,\r
+ "Failed to export function library, see exception for details.", e));\r
}\r
-\r
- \r
}\r
});\r
\r
return;\r
}\r
} catch (DatabaseException e) {\r
- e.printStackTrace();\r
+ Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID,\r
+ "Failed to validate wizard page contents, see exception for details.", e));\r
}\r
}\r
\r
package org.simantics.sysdyn.ui.wizards.models;\r
\r
import java.io.File;\r
-import java.io.IOException;\r
-import java.util.ArrayList;\r
\r
+import org.eclipse.core.runtime.IStatus;\r
import org.eclipse.core.runtime.Path;\r
+import org.eclipse.core.runtime.Status;\r
import org.eclipse.jface.layout.GridDataFactory;\r
import org.eclipse.jface.layout.PixelConverter;\r
import org.eclipse.jface.viewers.ISelection;\r
import org.eclipse.swt.widgets.Tree;\r
import org.simantics.browsing.ui.swt.AdaptableHintContext;\r
import org.simantics.browsing.ui.swt.widgets.GraphExplorerComposite;\r
-import org.simantics.databoard.Bindings;\r
-import org.simantics.databoard.Files;\r
-import org.simantics.databoard.binding.error.RuntimeBindingConstructionException;\r
import org.simantics.db.ReadGraph;\r
import org.simantics.db.Resource;\r
-import org.simantics.db.common.primitiverequest.PossibleRelatedValue;\r
import org.simantics.db.common.request.ReadRequest;\r
import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.layer0.util.TransferableGraphRequest2;\r
-import org.simantics.db.request.Read;\r
-import org.simantics.graph.representation.TransferableGraph1;\r
-import org.simantics.layer0.Layer0;\r
+import org.simantics.db.layer0.util.ModelTransferableGraphSourceRequest;\r
+import org.simantics.db.layer0.util.TransferableGraphConfiguration2;\r
+import org.simantics.graph.db.TGStatusMonitor;\r
+import org.simantics.graph.db.TransferableGraphSource;\r
+import org.simantics.graph.db.TransferableGraphs;\r
import org.simantics.sysdyn.SysdynResource;\r
+import org.simantics.sysdyn.ui.Activator;\r
import org.simantics.ui.SimanticsUI;\r
import org.simantics.utils.datastructures.ArrayMap;\r
-import org.simantics.utils.datastructures.Pair;\r
\r
public class WizardModelsExportPage extends WizardPage {\r
\r
});\r
\r
}\r
- \r
+\r
private void createTree(Composite workArea){\r
- \r
+\r
//set label for tree\r
Label title = new Label(workArea, SWT.NONE);\r
title.setText("Select Model to export:");\r
\r
- try {\r
- Resource input = SimanticsUI.getSession().syncRequest(new Read<Resource>() {\r
+ Resource input = SimanticsUI.getProject().get();\r
\r
- @Override\r
- public Resource perform(ReadGraph graph)\r
- throws DatabaseException {\r
- Resource model = SimanticsUI.getProject().get();\r
- return model;\r
- }\r
+ modelExplorer = new GraphExplorerComposite(ArrayMap.keys(\r
+ "displaySelectors", "displayFilter").values(false, false), null, workArea, SWT.BORDER | SWT.SINGLE);\r
\r
- });\r
+ modelExplorer\r
+ .setBrowseContexts(SysdynResource.URIs.ImportModuleTree);\r
\r
- modelExplorer = new GraphExplorerComposite(ArrayMap.keys(\r
- "displaySelectors", "displayFilter").values(false, false), null, workArea, SWT.BORDER | SWT.SINGLE);\r
+ modelExplorer.finish();\r
\r
- modelExplorer\r
- .setBrowseContexts(SysdynResource.URIs.ImportModuleTree);\r
+ modelExplorer.setInput(null, input);\r
\r
- modelExplorer.finish();\r
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(\r
+ modelExplorer);\r
\r
- modelExplorer.setInput(null, input);\r
-\r
- GridDataFactory.fillDefaults().grab(true, true).applyTo(\r
- modelExplorer);\r
- \r
- ((Tree)modelExplorer.getExplorer().getControl()).addSelectionListener(new SelectionListener() {\r
- \r
- @Override\r
- public void widgetSelected(SelectionEvent e) {\r
- selectionMade = true;\r
- validatePage();\r
- }\r
- @Override\r
- public void widgetDefaultSelected(SelectionEvent e) {\r
- selectionMade = true;\r
- validatePage();\r
- }\r
- });\r
- \r
-\r
- } catch (DatabaseException e) {\r
- e.printStackTrace();\r
- }\r
+ ((Tree)modelExplorer.getExplorer().getControl()).addSelectionListener(new SelectionListener() {\r
\r
+ @Override\r
+ public void widgetSelected(SelectionEvent e) {\r
+ selectionMade = true;\r
+ validatePage();\r
+ }\r
+ @Override\r
+ public void widgetDefaultSelected(SelectionEvent e) {\r
+ selectionMade = true;\r
+ validatePage();\r
+ }\r
+ });\r
}\r
- \r
+\r
//Set filePathField active\r
public void setVisible(boolean visible) {\r
super.setVisible(visible);\r
\r
File path = new File(dirName);\r
if (path.exists()) {\r
- dialog.setFilterPath(new Path(dirName).toOSString()); \r
+ dialog.setFilterPath(new Path(dirName).toOSString());\r
}\r
\r
String selectedFile = dialog.open();\r
final String selected = previouslyBrowsedFile;\r
if(selected == null) return false;\r
\r
- selectedModel= getExplorerResource(modelExplorer, Resource.class);\r
+ selectedModel = getExplorerResource(modelExplorer, Resource.class);\r
if(selectedModel == null)\r
return false;\r
\r
\r
@Override\r
public void run(ReadGraph graph) throws DatabaseException {\r
- Layer0 l0 = Layer0.getInstance(graph);\r
- String name = graph.syncRequest(new PossibleRelatedValue<String>(selectedModel, l0.HasName, Bindings.STRING ));\r
- ArrayList<Pair<Resource, String>> roots = new ArrayList<Pair<Resource, String>>();\r
- roots.add(Pair.make(selectedModel, name));\r
- TransferableGraph1 tg = graph.syncRequest(new TransferableGraphRequest2(roots, selectedModel));\r
-\r
- try {\r
- Files.createFile(new File(selected), Bindings.getBindingUnchecked(TransferableGraph1.class), tg);\r
- } catch (RuntimeBindingConstructionException e) {\r
- e.printStackTrace();\r
- } catch (IOException e) {\r
- e.printStackTrace();\r
+ TransferableGraphConfiguration2 conf = new TransferableGraphConfiguration2(graph, selectedModel);\r
+ try (TransferableGraphSource tgs = graph.syncRequest( new ModelTransferableGraphSourceRequest(conf) )) {\r
+ TransferableGraphs.writeTransferableGraph(graph, tgs, new File(selected), TGStatusMonitor.NULL_MONITOR);\r
+ } catch (Exception e) {\r
+ Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID,\r
+ "Failed to export model, see exception for details.", e));\r
}\r
- \r
}\r
});\r
\r
package org.simantics.sysdyn.ui.wizards.modules;\r
\r
import java.io.File;\r
-import java.io.IOException;\r
import java.util.ArrayList;\r
import java.util.Collection;\r
\r
+import org.eclipse.core.runtime.IStatus;\r
import org.eclipse.core.runtime.Path;\r
+import org.eclipse.core.runtime.Status;\r
import org.eclipse.jface.layout.GridDataFactory;\r
import org.eclipse.jface.layout.PixelConverter;\r
import org.eclipse.jface.viewers.ISelection;\r
import org.simantics.browsing.ui.swt.AdaptableHintContext;\r
import org.simantics.browsing.ui.swt.widgets.GraphExplorerComposite;\r
import org.simantics.databoard.Bindings;\r
-import org.simantics.databoard.Files;\r
-import org.simantics.databoard.binding.error.RuntimeBindingConstructionException;\r
import org.simantics.db.ReadGraph;\r
import org.simantics.db.Resource;\r
import org.simantics.db.WriteGraph;\r
-import org.simantics.db.common.primitiverequest.PossibleRelatedValue;\r
import org.simantics.db.common.request.ObjectsWithType;\r
import org.simantics.db.common.request.ReadRequest;\r
import org.simantics.db.common.request.WriteRequest;\r
import org.simantics.db.common.utils.NameUtils;\r
import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.layer0.util.TransferableGraphRequest2;\r
+import org.simantics.db.layer0.util.ModelTransferableGraphSourceRequest;\r
+import org.simantics.db.layer0.util.TransferableGraphConfiguration2;\r
import org.simantics.db.request.Read;\r
-import org.simantics.graph.representation.TransferableGraph1;\r
+import org.simantics.graph.db.TGStatusMonitor;\r
+import org.simantics.graph.db.TransferableGraphSource;\r
+import org.simantics.graph.db.TransferableGraphs;\r
import org.simantics.layer0.Layer0;\r
import org.simantics.modeling.ModelingResources;\r
import org.simantics.structural.stubs.StructuralResource2;\r
import org.simantics.sysdyn.SysdynResource;\r
+import org.simantics.sysdyn.ui.Activator;\r
import org.simantics.ui.SimanticsUI;\r
import org.simantics.utils.datastructures.ArrayMap;\r
import org.simantics.utils.datastructures.Pair;\r
Label title = new Label(workArea, SWT.NONE);\r
title.setText("Select Module to export:");\r
\r
- try {\r
- Resource input = SimanticsUI.getSession().syncRequest(new Read<Resource>() {\r
+ Resource input = SimanticsUI.getProject().get();\r
\r
- @Override\r
- public Resource perform(ReadGraph graph)\r
- throws DatabaseException {\r
- Resource model = SimanticsUI.getProject().get();\r
- return model;\r
- }\r
+ modelExplorer = new GraphExplorerComposite(ArrayMap.keys(\r
+ "displaySelectors", "displayFilter").values(false, false), null, workArea, SWT.BORDER | SWT.SINGLE);\r
\r
- });\r
+ modelExplorer\r
+ .setBrowseContexts(SysdynResource.URIs.ExportModuleTree);\r
\r
- modelExplorer = new GraphExplorerComposite(ArrayMap.keys(\r
- "displaySelectors", "displayFilter").values(false, false), null, workArea, SWT.BORDER | SWT.SINGLE);\r
+ modelExplorer.finish();\r
\r
- modelExplorer\r
- .setBrowseContexts(SysdynResource.URIs.ExportModuleTree);\r
+ modelExplorer.setInput(null, input);\r
\r
- modelExplorer.finish();\r
- \r
- modelExplorer.setInput(null, input);\r
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(\r
+ modelExplorer);\r
\r
- GridDataFactory.fillDefaults().grab(true, true).applyTo(\r
- modelExplorer);\r
- \r
- ((Tree)modelExplorer.getExplorer().getControl()).addSelectionListener(new SelectionListener() {\r
- \r
- @Override\r
- public void widgetSelected(SelectionEvent e) {\r
- setMessage(null);\r
- selectionMade = true;\r
- validatePage();\r
- }\r
- @Override\r
- public void widgetDefaultSelected(SelectionEvent e) {\r
- setMessage(null);\r
- selectionMade = true;\r
- validatePage();\r
- }\r
- });\r
-\r
- } catch (DatabaseException e) {\r
- e.printStackTrace();\r
- }\r
+ ((Tree)modelExplorer.getExplorer().getControl()).addSelectionListener(new SelectionListener() {\r
\r
+ @Override\r
+ public void widgetSelected(SelectionEvent e) {\r
+ setMessage(null);\r
+ selectionMade = true;\r
+ validatePage();\r
+ }\r
+ @Override\r
+ public void widgetDefaultSelected(SelectionEvent e) {\r
+ setMessage(null);\r
+ selectionMade = true;\r
+ validatePage();\r
+ }\r
+ });\r
}\r
- \r
+\r
//Set filePathField active\r
public void setVisible(boolean visible) {\r
super.setVisible(visible);\r
ArrayList<String> dependencies = null;\r
for(Resource r : graph.syncRequest(new ObjectsWithType(configuration, l0.ConsistsOf, sr.Module))) {\r
if(dependencies == null)\r
- dependencies = new ArrayList<String>();\r
+ dependencies = new ArrayList<>();\r
String name = NameUtils.getSafeName(graph, r);\r
String instanceOf = NameUtils.getSafeName(graph, graph.getSingleObject(r, l0.InstanceOf));\r
dependencies.add(name + " : " + instanceOf);\r
\r
@Override\r
public void run(ReadGraph graph) throws DatabaseException {\r
- Layer0 l0 = Layer0.getInstance(graph);\r
- \r
final Resource component = selectedModule;\r
//final Resource component = graph.getPossibleObject(modulesymbol, mr.SymbolToComponentType);\r
if (component == null || !graph.hasStatement(component, Layer0.getInstance(graph).PartOf))\r
return;\r
- String name = graph.syncRequest(new PossibleRelatedValue<String>(component, l0.HasName, Bindings.STRING ));\r
- final ArrayList<Pair<Resource, String>> roots = new ArrayList<Pair<Resource, String>>();\r
- roots.add(Pair.make(component, name));\r
\r
graph.asyncRequest(new WriteRequest() {\r
\r
graph.claim(configuration, l0.PartOf, l0.ConsistsOf, component);\r
graph.claim(modulesymbol, l0.PartOf, l0.ConsistsOf, component);\r
\r
- export(graph, selected, roots, component);\r
+ export(graph, selected, component);\r
\r
graph.deny(configuration, l0.PartOf);\r
graph.deny(modulesymbol, l0.PartOf);\r
graph.claim(modulesymbol, l0.PartOf, l0.ConsistsOf, previousPartof);\r
} else {\r
// Normal export\r
- export(graph, selected, roots, component);\r
+ export(graph, selected, component);\r
}\r
}\r
+ }, e -> {\r
+ Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Failed to export module, see exception for details.", e));\r
});\r
\r
}\r
return true;\r
}\r
\r
- private void export(WriteGraph graph, String path, ArrayList<Pair<Resource, String>> roots, Resource component) {\r
- \r
+ private void export(WriteGraph graph, String path, Resource component) throws DatabaseException {\r
// FIXME: Enumeration replacement handling like this is not suitable.\r
- try {\r
- Layer0 l0 = Layer0.getInstance(graph);\r
- SysdynResource sr = SysdynResource.getInstance(graph);\r
- StructuralResource2 sr2 = StructuralResource2.getInstance(graph);\r
\r
- Resource configuration = graph.getPossibleObject(component, sr2.IsDefinedBy);\r
- ArrayList<Pair<Resource, Resource>> replacements = new ArrayList<Pair<Resource, Resource>>();\r
+ Layer0 l0 = Layer0.getInstance(graph);\r
+ SysdynResource sr = SysdynResource.getInstance(graph);\r
+ StructuralResource2 sr2 = StructuralResource2.getInstance(graph);\r
\r
- for(Resource enumeration : graph.syncRequest(new ObjectsWithType(configuration, l0.ConsistsOf, sr.Enumeration))) {\r
- if(graph.hasStatement(enumeration, sr.Redeclaration_replacedEnumeration_Inverse)) {\r
- for(Resource replacement : graph.getObjects(enumeration, sr.Redeclaration_replacedEnumeration_Inverse)) {\r
- replacements.add(new Pair<Resource, Resource>(enumeration, replacement));\r
- }\r
+ Resource configuration = graph.getPossibleObject(component, sr2.IsDefinedBy);\r
+ ArrayList<Pair<Resource, Resource>> replacements = new ArrayList<>();\r
+\r
+ for(Resource enumeration : graph.syncRequest(new ObjectsWithType(configuration, l0.ConsistsOf, sr.Enumeration))) {\r
+ if(graph.hasStatement(enumeration, sr.Redeclaration_replacedEnumeration_Inverse)) {\r
+ for(Resource replacement : graph.getObjects(enumeration, sr.Redeclaration_replacedEnumeration_Inverse)) {\r
+ replacements.add(Pair.make(enumeration, replacement));\r
}\r
}\r
- \r
- for(Pair<Resource,Resource> replacement : replacements)\r
- graph.deny(replacement.first, sr.Redeclaration_replacedEnumeration_Inverse, replacement.second);\r
- \r
- TransferableGraph1 tg = graph.syncRequest(new TransferableGraphRequest2(roots, component));\r
- Files.createFile(new File(path), Bindings.getBindingUnchecked(TransferableGraph1.class), tg);\r
- \r
- for(Pair<Resource,Resource> replacement : replacements)\r
- graph.claim(replacement.first, sr.Redeclaration_replacedEnumeration_Inverse, replacement.second);\r
+ }\r
\r
- } catch (RuntimeBindingConstructionException e) {\r
- e.printStackTrace();\r
- } catch (IOException e) {\r
- e.printStackTrace();\r
+ for(Pair<Resource,Resource> replacement : replacements)\r
+ graph.deny(replacement.first, sr.Redeclaration_replacedEnumeration_Inverse, replacement.second);\r
+\r
+ try {\r
+ TransferableGraphConfiguration2 conf = new TransferableGraphConfiguration2(graph, component);\r
+ try (TransferableGraphSource tgs = graph.syncRequest( new ModelTransferableGraphSourceRequest(conf) )) {\r
+ TransferableGraphs.writeTransferableGraph(graph, tgs, new File(path), TGStatusMonitor.NULL_MONITOR);\r
+ } catch (Exception e) {\r
+ Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID,\r
+ "Failed to export module, see exception for details.", e));\r
+ }\r
} catch (DatabaseException e) {\r
- e.printStackTrace();\r
+ throw e;\r
+ } catch (Exception e) {\r
+ throw new DatabaseException(e);\r
+ } finally {\r
+ for(Pair<Resource,Resource> replacement : replacements)\r
+ graph.claim(replacement.first, sr.Redeclaration_replacedEnumeration_Inverse, replacement.second);\r
}\r
}\r
- \r
+\r
class ContainsDependenciesException extends DatabaseException {\r
private static final long serialVersionUID = -1533706136673146020L;\r
\r
return;\r
}\r
} catch (DatabaseException e) {\r
- e.printStackTrace();\r
+ Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID,\r
+ "Failed to validate wizard page contents, see exception for details.", e));\r
}\r
}\r
\r