Search Results

Search found 8 results on 1 pages for 'gmf'.

Page 1/1 | 1 

  • OCL constraints intended prevent node creation in an GMF generated editor only makes it invisible

    - by TheMorph
    Hello, I am working on editors created with GMF and struggling with OCL right now. Is there a possibilty to prevent a node to be created if an OCL statement in the mapping evaluates to false? If tried adding an OCL statement to a node and all it does is making the node not visible in the editor, but it is created. There is also an OCL statement in the ecore file, but this way it is only evaluated when there should be something done with the created model. I does not prevent a user to construct an invalid model but this is what I intend to prevent. Thanks in advance, Morph

    Read the article

  • How to use OCL constraints to prevent node creation in an GMF generated editor

    - by TheMorph
    Hello, I am working on editors created with GMF and struggling with OCL right now. Is there a possibilty to prevent a node to be created if an OCL statement in the mapping evaluates to false? If tried adding an OCL statement to a node and all it does is making the node not visible in the editor, but it is created. There is also an OCL statement in the ecore file, but this way it is only evaluated when there should be something done with the created model. I does not prevent a user to construct an invalid model but this is what I intend to prevent. Thanks in advance, Morph

    Read the article

  • Exception seem in an eclipse GMF application when file not present in workspace

    - by rush00121
    I am developing a GMF application . In this situation , I start my workspace and load a file in the workspace . Then I close the workspace and then delete the file from the workspace . After that, I try to restart my application and restore the workspace . Of course , now since the file does not exist , there are going to be exceptions . I tried a lot to handle these exceptions but if I try to get rid of one exception , then another pops up . Does anyone know what methods do I have to override in order to handle this situation correctly . I am attaching the stacktrace that I get in this exception for a better picture . org.eclipse.core.runtime.CoreException: ERROR at org.eclipse.gmf.runtime.diagram.ui.resources.edito r.parts.DiagramDocumentEditor.createPartControl(Di agramDocumentEditor.java:1509) at com.fnfr.itest.topology.tbml.diagram.custom.part.S ingleFileTbmlDiagramEditor.createPartControl(Singl eFileTbmlDiagramEditor.java:120) at org.eclipse.ui.internal.EditorReference.createPart Helper(EditorReference.java:662) at org.eclipse.ui.internal.EditorReference.createPart (EditorReference.java:462) at org.eclipse.ui.internal.WorkbenchPartReference.get Part(WorkbenchPartReference.java:595) at org.eclipse.ui.internal.EditorAreaHelper.setVisibl eEditor(EditorAreaHelper.java:271) at org.eclipse.ui.internal.EditorManager.setVisibleEd itor(EditorManager.java:1417) at org.eclipse.ui.internal.EditorManager$5.runWithExc eption(EditorManager.java:942) at org.eclipse.ui.internal.StartupThreading$StartupRu nnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableL ock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessa ges(Synchronizer.java:134) at org.eclipse.swt.widgets.Display.runAsyncMessages(D isplay.java:3855) at org.eclipse.swt.widgets.Display.readAndDispatch(Di splay.java:3476) at org.eclipse.ui.application.WorkbenchAdvisor.openWi ndows(WorkbenchAdvisor.java:803) at org.eclipse.ui.internal.Workbench$28.runWithExcept ion(Workbench.java:1384) at org.eclipse.ui.internal.StartupThreading$StartupRu nnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableL ock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessa ges(Synchronizer.java:134) at org.eclipse.swt.widgets.Display.runAsyncMessages(D isplay.java:3855) at org.eclipse.swt.widgets.Display.readAndDispatch(Di splay.java:3476) at org.eclipse.ui.internal.Workbench.runUI(Workbench. java:2316) at org.eclipse.ui.internal.Workbench.access$4(Workben ch.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench. java:500) at org.eclipse.core.databinding.observable.Realm.runW ithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWork bench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Pl atformUI.java:149) at com.fnfr.svt.rcp.Application.runWorkbench(Applicat ion.java:205) at com.fnfr.svt.rcp.Application.start(Application.jav a:190) at org.eclipse.equinox.internal.app.EclipseAppHandle. run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.runApplication(EclipseAppLauncher.java: 110) at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.ru n(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.ru n(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework( Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.ja va:514) at org.eclipse.equinox.launcher.Main.run(Main.java:13 11) Add to rshah's Reputation

    Read the article

  • GMF - programmatically create connections without commands

    - by user1437515
    Hi I am developing an graphical editor with GMF and want to create a set of nodes (Resources in my project) and connections between them upon intialization of a new diagram. I do not want to use commands here because without the code is much slimmer, easier to read and also faster it seems to me. There is no problem creating nodes by calling my XXXFactory.eInstance.createResource() and adding them to the diagram model. My connection is contained as source-/targetConnections feature in the resource class. So I added a similarly created connection as source/target to the resources. But it will not show up in the diagram even though it exists in the ResourceImpl structural feature. Maybe I need to add it additionally to the diagram but since its contained by a feature contained by the diagram, I dont know how. Am i doing something wrong or missing something or is it just not possible to do this without commands. Any help would be much appreciated. Sample code is below. The output of it is the two nodes but no connection. Thanks Lars Example createInitialModel method: private static RDFEditor.ShapesDiagram createInitialModel() { ShapesDiagram diagram = >RDFEditor.RDFEditorFactory.eINSTANCE.createShapesDiagram(); RDFEditor.Resource res = RDFEditorFactory.eINSTANCE.createResource(); RDFEditor.Resource res2 = RDFEditorFactory.eINSTANCE.createResource(); Connection con = RDFEditorFactory.eINSTANCE.createConnection(); EStructuralFeature target = >res.eClass().getEStructuralFeature("targetConnections"); EStructuralFeature source = >res.eClass().getEStructuralFeature("sourceConnections"); res2.setName("rdfs:Resource"); res.setName("rdfs:Class"); con.setName("rdfs:type"); con.setSource(res); con.setTarget(res2); res.getSourceConnections().add(con); res.getTargetConnections().add(con); //res2.eSet(target, con); //res.eSet(source, con); List<? extends Shape> resList = Arrays.asList(res,res2); EStructuralFeature shapes = >diagram.eClass().getEStructuralFeature("shapes"); diagram.eSet(shapes, resList); return diagram; }

    Read the article

  • Can't find Localhost files

    - by GMF
    Hope you can help. This is my first time trying Ubuntu/Linux. I am logged in as root I have downloaded and installed LAMP and PHPMYADMIN. I get the test page under localhost say that It works and is installed Correctly. I have also put my files in the /var/www. they are PHP files When I put the address localhost/(page name.php) I get an error saying Not Found The requested URL /index.php was not found on this server. Apache/2.2.22 (Ubuntu) Server at localhost Port 80 I Have put the files in the wrong folder?? If I look in the "/etc/ap[ache2/sites-available/default", It tells my my DocumentRoot is /var/www Would love somehelp on this please Many thanks GF

    Read the article

  • Recursion in Ecore-File?!

    - by Dominik
    Hey guys, just tried to convert towards a Ecore-Model from a given UML-Model. After this I am trying to create a Generator Model. Everytime I try to do this I get the Error Message, that there is a "Unhandled event loop exception" with this log: org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:3884) at org.eclipse.swt.SWT.error(SWT.java:3799) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3885) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3506) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.gmf.internal.bridge.ui.dashboard.DashboardMediator$RunWizardAction.run(DashboardMediator.java:316) at org.eclipse.gmf.internal.bridge.ui.dashboard.HyperlinkFigure$1.mousePressed(HyperlinkFigure.java:63) at org.eclipse.draw2d.Figure.handleMousePressed(Figure.java:873) at org.eclipse.draw2d.SWTEventDispatcher.dispatchMousePressed(SWTEventDispatcher.java:214) at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown(LightweightSystem.java:513) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311) Caused by: java.lang.NullPointerException at org.eclipse.emf.converter.util.ConverterUtil.computeRequiredPackages(ConverterUtil.java:374) at org.eclipse.emf.converter.ui.contribution.base.ModelConverterPackagePage.validate(ModelConverterPackagePage.java:965) at org.eclipse.emf.importer.ui.contribution.base.ModelImporterPackagePage.validate(ModelImporterPackagePage.java:101) at org.eclipse.emf.converter.ui.contribution.base.ModelConverterPackagePage$1.run(ModelConverterPackagePage.java:155) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) ... 34 more After this there occurs another exception with this text: "Unable to create editor ID org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditorID:An unexpected exception was thrown." The session data says: eclipse.buildId=unknown java.version=1.6.0_13 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE Framework arguments: -product org.eclipse.epp.package.modeling.product Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.modeling.product -consoleLog With this long log: java.lang.NullPointerException at org.eclipse.emf.ecore.util.EcoreUtil.getURI(EcoreUtil.java:2887) at org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.diagnose(GenModelImpl.java:2930) at org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.validate(GenModelEditor.java:1773) at org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.initialize(GenModelEditor.java:596) at org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.createPages(GenModelEditor.java:1080) at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:357) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:662) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2857) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762) at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2668) at org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard.openEditor(ModelConverterWizard.java:318) at org.eclipse.emf.importer.ui.contribution.base.ModelImporterWizard.performFinish(ModelImporterWizard.java:167) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:752) at org.eclipse.gmf.internal.bridge.ui.dashboard.DashboardMediator$RunWizardAction$1.finishPressed(DashboardMediator.java:311) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.gmf.internal.bridge.ui.dashboard.DashboardMediator$RunWizardAction.run(DashboardMediator.java:316) at org.eclipse.gmf.internal.bridge.ui.dashboard.HyperlinkFigure$1.mousePressed(HyperlinkFigure.java:63) at org.eclipse.draw2d.Figure.handleMousePressed(Figure.java:873) at org.eclipse.draw2d.SWTEventDispatcher.dispatchMousePressed(SWTEventDispatcher.java:214) at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown(LightweightSystem.java:513) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311) Has anyone an idea what is going wrong? I looked a while at my model but were not able to find something wrong. I just thought there might be a recursion due to the "Unhandled event loop exception" but is this even possible? Thanks in advance, Dominik

    Read the article

  • Correct install of Android SDK, ADT with Eclipse 3.6.1

    - by macombej
    Following the posted instructions for Eclipse 3.6.1 Classic and Android SDK, ADT (where OS 2.3 is the most current) misses a few steps. Everything seems to work up until the point of loading the ADT in Eclipse. Prior to doing this add the following dependency sites to the list and enable them so that the ADT installer will pickup all the dependencies (thanks MissKaho for the concise list). Eclipse GEF - download.eclipse.org/tools/gef/updates/releases/ Eclipse EMF - download.eclipse.org/modeling/emf/updates/releases/ Eclipse GMF - download.eclipse.org/modeling/gmf/updates/releases Eclipse Webtools - download.eclipse.org/webtools/updates/ Google eclipse Plugin - dl.google.com/eclipse/plugin/3.6

    Read the article

  • Headless build of eclipse features - PDE Tools or Buckminster?

    - by Max
    I am trying to set up a headless build for a big eclipse feature, containing other features and plugins. As some needed plugins are generated using GMF and EMF, the build workflow must be something like this: SVN Check-out Invoke Generation Run Tests Build all Publish update-site Over the last couple of weeks, i played around with PDE Headless Build and Buckminster. Anyhow i still got problems with both and can't decide on which i should spent my effort. So what would you prefer? What experience you made? Anybody out there who needed to set up a similiar workflow before? Thank you for all answers :)

    Read the article

1