Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dtp-dev] CCE during Annotated Java Import

Anthos,

I'm not sure you can extend an EMF model using annotated Java (never tried
though).

I would recommend creating an ecore file from scratch (file->new->emf
model).  You can then define the objects which are required for your
extension.  If you are extending existing model elements, you will need to
make sure the base model is loaded into your editor instance (right
click->load resource... then specify the sql model base ecore file).  This
will allow you to see the objects defined within the base model within your
model (e.g. setting the base object type, etc.).

As for your specific problem, you might try the EMF news group.  (I'm
knowledgeable about EMF but am certainly not an expert.)

Hope that helps,
Rob


dtp-dev-bounces@xxxxxxxxxxx wrote on 05/22/2006 01:35:54 PM:

> Hi
>
> I get the following ClassCastException when I try to create a model using
> File->New->EMF Model->Annotated Java
>
> I have one java source on the src tree which is attached here. This
> source is exactly same as in case of Derby where Synonym is added to
> Derby model.
>
> Anyone tried creating a EMF model for DTP from Annotated Java source ?
>
> Regards
> Anthos
>
> !ENTRY org.eclipse.emf.importer.java 2 0 2006-05-23 05:08:05.640
> !MESSAGE org.eclipse.emf.ecore.impl.EFactoryImpl
> !STACK 0
> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EFactoryImpl
>    at
> org.eclipse.emf.importer.java.builder.JavaEcoreBuilder.
> used(JavaEcoreBuilder.java:485)
>    at
> org.eclipse.emf.importer.java.builder.JavaEcoreBuilder.
> used(JavaEcoreBuilder.java:508)
>    at
> org.eclipse.emf.importer.java.builder.JavaEcoreBuilder.
> analyseProject(JavaEcoreBuilder.java:306)
>    at
> org.eclipse.emf.importer.java.builder.JavaEcoreBuilder.
> computeEPackages(JavaEcoreBuilder.java:456)
>    at
> org.eclipse.emf.importer.java.JavaImporter.
> doComputeEPackages(JavaImporter.java:82)
>    at
> org.eclipse.emf.importer.ModelImporter.
> computeEPackages(ModelImporter.java:482)
>    at
> org.eclipse.emf.importer.java.ui.JavaPackagePage.
> computeEPackages(JavaPackagePage.java:106)
>    at
> org.eclipse.emf.importer.java.ui.JavaPackagePage$2.
> execute(JavaPackagePage.java:81)
>    at
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.
> run(WorkspaceModifyOperation.java:101)
>    at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1737)
>    at
> org.eclipse.ui.actions.WorkspaceModifyOperation.
> run(WorkspaceModifyOperation.java:113)
>    at
> org.eclipse.jface.operation.ModalContext.
> runInCurrentThread(ModalContext.java:369)
>    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
>    at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:851)
>    at
> org.eclipse.emf.importer.java.ui.JavaPackagePage.
> computeEPackages(JavaPackagePage.java:96)
>    at
> org.eclipse.emf.importer.java.ui.JavaPackagePage$1.
> run(JavaPackagePage.java:59)
>    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
>    at
>
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)

>    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3325)
>    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
>    at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
>    at org.eclipse.jface.window.Window.open(Window.java:796)
>    at
org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:181)
>    at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
>    at
> org.eclipse.jface.action.ActionContributionItem.
> handleWidgetSelection(ActionContributionItem.java:539)
>    at
> org.eclipse.jface.action.ActionContributionItem.
> access$2(ActionContributionItem.java:488)
>    at
> org.eclipse.jface.action.ActionContributionItem$5.
> handleEvent(ActionContributionItem.java:400)
>    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
>    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
>    at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
>    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
>    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
>    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
>    at
>
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
>    at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
>    at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
>    at
> org.eclipse.core.internal.runtime.PlatformActivator$1.
> run(PlatformActivator.java:78)
>    at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.
> runApplication(EclipseAppLauncher.java:92)
>    at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.
> start(EclipseAppLauncher.java:68)
>    at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)

>    at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)

>    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.core.launcher.Main.invokeFramework(Main.java:336)
>    at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
>    at org.eclipse.core.launcher.Main.run(Main.java:977)
>    at org.eclipse.core.launcher.Main.main(Main.java:952)
>
>
>
> package oracle.dbtools.modelbase;
>
> import org.eclipse.datatools.modelbase.sql.schema.SQLObject;
> import org.eclipse.datatools.modelbase.sql.tables.ViewTable;
>
> /**
>  * @model
>  */
> public interface MaterializedView extends ViewTable, SQLObject {
>    /**
>     * @model
>     */
>    ViewTable getView();
>
>    /**
>     * @model
>     */
>    void setView(ViewTable value);
> }
>
> _______________________________________________
> dtp-dev mailing list
> dtp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/dtp-dev



Back to the top